Skip to main content
gamedev.net
🔒 Locked

Win32 Objects

Started by ANSI2000 4 replies 300+ views
Original Post
ANSI2000
ANSI2000
Is it safe to assume that all win32 objects (windows, buttons, scroll bars, etc...) use all the same structure WNDCLASS or WNDCLASSEX and they all have there wndProc(...)??
Shannon Barber
Shannon Barber
er, I don''t think so. You can put a button right into a parent form without creating a child window for it, and it doesn''t have it''s own wndProc... is that what you meant?
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
LessBread
LessBread
Window objects use wndclassex structures and wndproc callbacks. Other objects don''t, such as Kernel objects (processes, semaphores, mutexes, files, sockets etc...).

‘But truth's a menace, science a public danger.’ Brave New World, Aldous Huxley
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
ANSI2000
ANSI2000
Less answered my question thanks... It just that i want to create a class thatw ill wrap all the creation of objects such as buttons, windows, scroll bars etc...

As for file object, sockets, semaphores, I know they use there handles etc....
Brannon
Brannon
If you can get a window handle to the object, then somewhere, there was a WNDCLASSEX for it, and there is a WndProc for it. There are APIs that you can use to retrieve the class name given a window handle, and then from that class name, retrieve the information associated with that class (ie. the WNDCLASSEX structure). You can also retrieve the WndProc using the GetWindowLong[Ptr] function. This is how subclassing windows works.


-Brannon
-Brannon
ANSI2000
ANSI2000
I already have a sub class of my window object. Just that am not to happy the way it is implemented. So am looking to clean it up a bit etc....

Edited by - ANSI2000 on January 6, 2002 6:39:30 PM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.