Handle HWND Data Type

Source: Internet
Author: User

In VC ++ 6, right-click to go to definition and view HWND step by step

1,

1
HWND
2,
1
# Ifndef WIN_INTERNAL
2
DECLARE_HANDLE (HWND); // <-Here
3
DECLARE_HANDLE (HHOOK );
4
# Ifdef WINABLE
5
DECLARE_HANDLE (HEVENT );
6
# Endif
7
# Endif
3,

01
# Ifdef STRICT // # ifndef STRICT
02
// # Define STRICT 1
03
// # Endif
04
Typedef void * HANDLE;
05
# Define DECLARE_HANDLE (name) struct name ##__ {int unused;}; typedef struct name #__* name // <-Here
06
# Else
07
Typedef pvoid handle; // typedef void * PVOID;
08
# Define DECLARE_HANDLE (name) typedef HANDLE name // <-Here
09
# Endif
10
Typedef HANDLE * PHANDLE;
Sort it out

Struct HWND __{

Int unused;

};

Typedef struct HWND _ * HWND; www.2cto.com

Therefore, HWND _ is an HWND _ pointer, and HWND _ is a struct containing an int-type data structure.

HWND is a void pointer only when STRICT is not defined.

PS: However, we don't know much about the undefined STRICT.


Author: TMDJoJo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.