Windows in Win32 API GUI Programming

I am starting GUI programming and I have a question about windows. I have read some tutorials and they create a window by making a new WNDCLASS, calling RegisterClass and then doing CreateWindow with the name of the new class. I also have seen that to create a Button or something, you use the class name Button when you CreateWindow. So this leads me to this conclusion: to create a window (the kind with a border and minimize/maximize buttons, etc.) you create a new WNDCLASS. Otherwise, you don't need to make a WNDCLASS and you use one of the predefined class names, such as BUTTON. Is this correct?


Correct. The main reason you need to define your own WNDCLASS for your windows is to assign your own window procedure that handles messages sent to your window. Standard controls such as buttons and edit controls already have well-defined behaviour as defined by their standard window procedures, hence you can just use the pre-defined class names.

Need Your Help

Image to appear behind link with hover

html css hover

I found several related articles that helped, but I've hit a wall.

for_each_process - Does it iterate over the threads and the processes as well?

c linux linux-kernel embedded-linux

I would like to iterate all the tasks in the kernel (threads and processes) and print tid/pid and name using for_each_process macro: