]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/winundef.h
25bcb7d67ed6a1dba616b5a9dca4becf384b5440
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: undefine the common symbols #define'd by <windows.h>
4 // Author: Vadim Zeitlin
8 // Copyright: (c) wxWindows team
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_WINUNDEF_H_
13 #define _WX_WINUNDEF_H_
15 // windows.h #defines the following identifiers which are also used in wxWin
21 inline BOOL
GetCharWidth(HDC dc
, UINT first
, UINT last
, LPINT buffer
)
24 return GetCharWidthW(dc
, first
, last
, buffer
);
26 return GetCharWidthA(dc
, first
, last
, buffer
);
36 inline HWND
FindWindow(LPCWSTR classname
, LPCWSTR windowname
)
38 return FindWindowW(classname
, windowname
);
41 inline HWND
FindWindow(LPCSTR classname
, LPCSTR windowname
)
43 return FindWindowA(classname
, windowname
);
53 inline int GetClassName(HWND h
, LPWSTR classname
, int maxcount
)
55 return GetClassNameW(h
, classname
, maxcount
);
58 inline int GetClassName(HWND h
, LPSTR classname
, int maxcount
)
60 return GetClassNameA(h
, classname
, maxcount
);
70 inline BOOL
GetClassInfo(HINSTANCE h
, LPCWSTR name
, LPWNDCLASSW winclass
)
72 return GetClassInfoW(h
, name
, winclass
);
75 inline BOOL
GetClassInfo(HINSTANCE h
, LPCSTR name
, LPWNDCLASSA winclass
)
77 return GetClassInfoA(h
, name
, winclass
);
84 #ifdef LoadAccelerators
85 #undef LoadAccelerators
87 inline HACCEL
LoadAccelerators(HINSTANCE h
, LPCWSTR name
)
89 return LoadAcceleratorsW(h
, name
);
92 inline HACCEL
LoadAccelerators(HINSTANCE h
, LPCSTR name
)
94 return LoadAcceleratorsA(h
, name
);
104 inline int DrawText(HDC h
, LPCWSTR str
, int count
, LPRECT rect
, UINT format
)
106 return DrawTextW(h
, str
, count
, rect
, format
);
109 inline int DrawText(HDC h
, LPCSTR str
, int count
, LPRECT rect
, UINT format
)
111 return DrawTextA(h
, str
, count
, rect
, format
);
121 #define DOCINFOW DOCINFO
122 #define DOCINFOA DOCINFO
125 inline int StartDoc(HDC h
, CONST DOCINFOW
* info
)
127 return StartDocW(h
, info
);
130 inline int StartDoc(HDC h
, CONST DOCINFOA
* info
)
132 return StartDocA(h
, info
);
141 inline int GetObject(HGDIOBJ h
, int i
, LPVOID buffer
)
144 return GetObjectW(h
, i
, buffer
);
146 return GetObjectA(h
, i
, buffer
);
154 inline int GetMessage(LPMSG lpMsg
, HWND hWnd
, UINT wMsgFilterMin
, UINT wMsgFilterMax
)
157 return GetMessageW(lpMsg
, hWnd
, wMsgFilterMin
, wMsgFilterMax
);
159 return GetMessageA(lpMsg
, hWnd
, wMsgFilterMin
, wMsgFilterMax
);
165 // For ming and cygwin
170 inline HWND
GetFirstChild(HWND h
)
172 return GetTopWindow(h
);
178 #ifdef GetNextSibling
179 #undef GetNextSibling
180 inline HWND
GetNextSibling(HWND h
)
182 return GetWindow(h
, GW_HWNDNEXT
);
187 //ifdef GetWindowProc
188 // #undef GetWindowProc
191 // #undef GetNextChild
194 #endif // _WX_WINUNDEF_H_