MessageProc of a global WindowsClass

Started by
3 comments, last by Oluseyi 19 years, 3 months ago
Can you set the message proc of a global windows class like "button" or the like to your own message proc? or can you create a windows class that has the same functions as those global window classes?
Advertisement
If you set a window to use the button class it will use that class's default wndproc.
You can set your own with setwindowlong function.
[size="2"]I like the Walrus best.
But if i do that to a "button" or other premade thingy, it ceases to be a button...
Quote:Original post by Axiverse
But if i do that to a "button" or other premade thingy, it ceases to be a button...


not if you call the original wndproc for the messages you don't want to handle. A pointer to it is returned by setwindowlong.

at the end of your custom wndproc add a

return CallWindowProc(OriginalWindowProcedure, hwnd, message, wParam, lParam );
[size="2"]I like the Walrus best.
Subclassing a Window

This topic is closed to new replies.

Advertisement