Click here to Skip to main content
15,893,486 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Explain the terms HWND , DWORD of windows.h (C++11 Classes). The program is in borland C++ 5.5.
Posted
Comments
Sergey Alexandrovich Kryukov 30-Nov-12 23:49pm    
This question makes some sense but -- what, Google did not help you to find the answers? Bing? MSDN? Did they all ban you? :-)
--SA
CPallini 1-Dec-12 4:03am    
Nothing you cannot find yourself: just Google for.

1 solution

Those are the types used in Windows API. HWND is used for Windows handles, and it gets different size, depending on the size of the pointer of the given OS platform, which, it turns, depends on the target CPU instruction-set architecture: 32-bits, 64-bits (in historical Windows versions is was also 16-bits, when Windows was not yes a OS). This type is the same as HANDLE, but different name is used in API specs to indicate that some parameter is a window handle; that is, HWND is more specific term as HANDLE. This way, application source code can be platform-independent.

DWORD is double word, always 32-bit. This is also platform-independed, in the opposite sense: it is always 32-bits, regardless of the target CPU instruction-set arhitecture. Please see:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v=vs.85%29.aspx[^].

See also: http://en.wikipedia.org/wiki/Instruction_set_architecture[^].

—SA
 
Share this answer
 
Comments
CPallini 1-Dec-12 4:02am    
5.
Sergey Alexandrovich Kryukov 1-Dec-12 18:00pm    
Thank you, Carlo.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900