• Advertisement

Archived

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

learning about the HWND and other (Win) data types

This topic is 5511 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

i did a search on HWND but didn''t find anything that i could understand. I also looked on GameTutorials but their explanation has much to be desired. So I''m wondering does anyone know of a basic tutorial(s) that explains HWND and other similar types of data types? Thanks, in advance.

Share this post


Link to post
Share on other sites
Advertisement
Don''t know about tutorials, but you might try this book:

Programming Windows, The Definitive Guide to the Win32 API
by Charles Petzold

Share this post


Link to post
Share on other sites
What''s there to explain?

A ''HANDLE'' is just an ID number for a windows object.

A HWND is a ''handle to a window.'' A HEVENT is a ''handle to an event.'' A HPEN is a handle to a GDI Pen. Etcetera.

Share this post


Link to post
Share on other sites
A HWND is just a Handle.
For Example, you cannot move a window, close a window, or do
anything to a window unless you have a HWND to that window.

The function FindWindow returns a handle to a window.
Ex.

HWND MySolitaireHandle=NULL;
/* Above, I created a handle object, and I named it
MySolitaireHandle */ /* At this point the HWND is empty,
and does not point to any window */


MySolitaireHandle=FindWindow("Solitare",NULL);
/* Now you can use MySolitaireHandle to manipulate
the window you are using, in this case Solitaire */

I have a tutorial on my site about Basic Windows Programming.
Here''s a tip, at first don''t worry about what everything means
Use Window Skeletons, to write programs.
Honestly, I can''t just type the Windows Skeleton, and
then write a program. But I can create a major application,
because I know my way around the Windows Skeleton.

You just have to know where to plug in the code, and
soon everything else comes natural.

Check out my site.
Good Luck

href="http://www.geocities.com/cplusplusordie">src="http://www.geocities.com/cplusplusordie/SignatureLogo.jpg">

Share this post


Link to post
Share on other sites

  • Advertisement