-
WindowProcs And The Like
I have created an application using CreateWindowEx etc to make all of the main windows, however. upon creating buttons, the window messages from them get sent to the parent window in the form of WM_COMMAND, param(BN_CLICKED). i need to move one of the buttons of my form and into another window, which i do not own. i have seen a WindowProc made especially for a button, (named buttonProc), however i cannot remember how to do it. can anyone help???
many thanks
-
You should post this under Windows Programming section, not here.
-
look into windows subclassing as a possible solution.
-
Oops!!! 1 more question
I realised where i had i was when i posted it!!! one q. though. i had an idea of subclassing, however, isn't C++ one big subclassing...thing? when you register a wndclass, you supply a windowproc which i assume is the same as using SetWindowLong? replies appreciated.
-
I'm just starting with Windows API, but my understanding at the moment is that each independent Window has it's own procedure function called WindowProc(), or whatever. Each program is based on a main Window, and therefore, has it's WindowProc(). All child and owned windows derived from this main Window use this WindowProc(). However, you program may use stock/presupplied Windows, which MS has written or you have written befoe, whatever, too. These Windows have their own procedure functions, but they are not called WindowProc(), they are called things like BtnProc(), LBProc(), or whatever. You can get the handle for these procedure functions so your program can process procedures/events/commands for these Windows without relying on the prewritten code by called SetWindowLong(). At least that's my curent understanding. You will get a more educated reply by posting in the Windows board, however.