Strict principle

zhaozj2021-02-16  98

// Excerpted from WINDEF.H 14th line

#ifndef strict

#define strict 1

#ENDIF

// From Winnt.h 106th line

TypeDef void * pvoid;

// from Winnt.h 206th line

#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

// below is the type of deflarit_handle () macro that I collected from WINDEF.H

// Excerpted from WINDEF.H 221

#ifdef strict

Typedef void near * hgdiobj;

#ELSE

Declare_handle (hgdiobj);

#ENDIF

// from WINDEF.H 228 line

#if! defined (_mac) ||! defined (win_internal)

Declare_handle (Haccel);

#ENDIF

#if! defined (_mac) ||! defined (gdi_internal)

Declare_handle (hbitmap);

Declare_handle (hbrush);

#ENDIF

// Excerpted from WINDEF.H 238 line

#if! defined (_mac) ||! defined (gdi_internal)

Declare_handle (HDC);

#ENDIF

// is taken from WINDEF.H 244 line

#if! defined (_mac) ||! defined (gdi_internal)

Declare_handle (hfont);

#ENDIF

Declare_handle (hic);

#if! defined (_mac) ||! defined (win_internal)

Declare_handle (HMENU);

#ENDIF

// Excerpt from WINDEF.H 252 line

Declare_handle (hinstance);

Typedef hinstance hmodule; / * hModules can be used in place of hinstances * /

转载请注明原文地址:https://www.9cbs.com/read-13714.html

New Post(0)