Archived

This topic is now archived and is closed to further replies.

structure definitions

This topic is 6019 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I''m trying to find the EXACT struct definitions for items such as..HWND, HDC..etc.. I tried looking in the win32 SDK that came with VC++ 6.0, but it really wasn''t any help. Does anyone know where of a reference (preferably online and..hehe ... free) that lists that definitions of some or even al the structs? or at least the more important ones? also, does anyone know of a good article or something that explains (better than the bok im reading now) more about GDI Device contexts or rather simply device contexts in general?? Thanks! any help would be greatly appreciated!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The structure layouts differ among the various strains of Windows, and there also are differences between retail and debug builds of a given version. Many internal structures are documented in the DDKs (device driver development kits), some of which can be downloaded for free from Microsoft''s web site. You might want to look at the ''Undocumented $FOO'' books by Andrew Shulman and Matt Pietrek, who did a good job of dissecting Windows (95) internals and describing the inner workings - including WND and DC layouts. The books have gathered a bit of dust over the years but they give you lots of inside info. A similar resource is the Undocumented Corner in DDJ.

What are you trying to do - reinvent WinG?

Share this post


Link to post
Share on other sites
read through windef.h in your compiler''s source include directory. all those are described by "DECLARE_HANDLE". This is a macro in (for me) winnt.h:

  
#ifdef STRICT
typedef void *HANDLE;
#define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
#else
typedef PVOID HANDLE;
#define DECLARE_HANDLE(name) typedef HANDLE name
#endif
typedef HANDLE *PHANDLE;

Share this post


Link to post
Share on other sites