I am playing around with Win32, and have got past the basic make a simple window, all in the c++ file.
I now want to encapsulate my window inside a class, so I can simply create different kinds of window from a common base.
Am I correct in assuming that each window I create needs it’s own wndproc to handle messages and events?
If so, I guess that all I need to do to create a type of window is to fill in a window structure with the appropriate data, and add to it a function pointer to the wndproc contained in my window class?
How then is the best way to handle multiple windows? (such as having my main frame displaying data in the form of a graph, and having other windows that are acting as dialog and text editing boxes that float above the graph.)
Would you have the main application control all the creation and deletion of these other windows, or would you delegate it to the main graph window? And if a window was active, and a message occurred that is meant for a different window, how can I control that (eg if the graph is constantly updating in the background from real time data, but the user has had a text box window open)
Thanks
K
I now want to encapsulate my window inside a class, so I can simply create different kinds of window from a common base.
Am I correct in assuming that each window I create needs it’s own wndproc to handle messages and events?
If so, I guess that all I need to do to create a type of window is to fill in a window structure with the appropriate data, and add to it a function pointer to the wndproc contained in my window class?
How then is the best way to handle multiple windows? (such as having my main frame displaying data in the form of a graph, and having other windows that are acting as dialog and text editing boxes that float above the graph.)
Would you have the main application control all the creation and deletion of these other windows, or would you delegate it to the main graph window? And if a window was active, and a message occurred that is meant for a different window, how can I control that (eg if the graph is constantly updating in the background from real time data, but the user has had a text box window open)
Thanks
K