]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/winundef.h
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 /* THIS SHOULD NOT BE USED since you might include it once e.g. in window.h,
13 * then again _AFTER_ you've included windows.h, in which case it won't work
15 #ifndef _WX_WINUNDEF_H_
16 #define _WX_WINUNDEF_H_
19 // windows.h #defines the following identifiers which are also used in wxWin
25 inline BOOL
GetCharWidth(HDC dc
, UINT first
, UINT last
, LPINT buffer
)
28 return GetCharWidthW(dc
, first
, last
, buffer
);
30 return GetCharWidthA(dc
, first
, last
, buffer
);
40 inline HWND
FindWindow(LPCWSTR classname
, LPCWSTR windowname
)
42 return FindWindowW(classname
, windowname
);
45 inline HWND
FindWindow(LPCSTR classname
, LPCSTR windowname
)
47 return FindWindowA(classname
, windowname
);
57 inline int GetClassName(HWND h
, LPWSTR classname
, int maxcount
)
59 return GetClassNameW(h
, classname
, maxcount
);
62 inline int GetClassName(HWND h
, LPSTR classname
, int maxcount
)
64 return GetClassNameA(h
, classname
, maxcount
);
74 inline BOOL
GetClassInfo(HINSTANCE h
, LPCWSTR name
, LPWNDCLASSW winclass
)
76 return GetClassInfoW(h
, name
, winclass
);
79 inline BOOL
GetClassInfo(HINSTANCE h
, LPCSTR name
, LPWNDCLASSA winclass
)
81 return GetClassInfoA(h
, name
, winclass
);
88 #ifdef LoadAccelerators
89 #undef LoadAccelerators
91 inline HACCEL
LoadAccelerators(HINSTANCE h
, LPCWSTR name
)
93 return LoadAcceleratorsW(h
, name
);
96 inline HACCEL
LoadAccelerators(HINSTANCE h
, LPCSTR name
)
98 return LoadAcceleratorsA(h
, name
);
108 inline int DrawText(HDC h
, LPCWSTR str
, int count
, LPRECT rect
, UINT format
)
110 return DrawTextW(h
, str
, count
, rect
, format
);
113 inline int DrawText(HDC h
, LPCSTR str
, int count
, LPRECT rect
, UINT format
)
115 return DrawTextA(h
, str
, count
, rect
, format
);
125 #define DOCINFOW DOCINFO
126 #define DOCINFOA DOCINFO
129 inline int StartDoc(HDC h
, CONST DOCINFOW
* info
)
131 return StartDocW(h
, info
);
134 inline int StartDoc(HDC h
, CONST DOCINFOA
* info
)
136 return StartDocA(h
, info
);
145 inline int GetObject(HGDIOBJ h
, int i
, LPVOID buffer
)
148 return GetObjectW(h
, i
, buffer
);
150 return GetObjectA(h
, i
, buffer
);
158 inline int GetMessage(LPMSG lpMsg
, HWND hWnd
, UINT wMsgFilterMin
, UINT wMsgFilterMax
)
161 return GetMessageW(lpMsg
, hWnd
, wMsgFilterMin
, wMsgFilterMax
);
163 return GetMessageA(lpMsg
, hWnd
, wMsgFilterMin
, wMsgFilterMax
);
170 #if defined(GetWindowStyle) || defined(__WXWINE__)
171 #undef GetWindowStyle
174 // For ming and cygwin
179 inline HWND
GetFirstChild(HWND h
)
181 return GetTopWindow(h
);
187 #ifdef GetNextSibling
188 #undef GetNextSibling
189 inline HWND
GetNextSibling(HWND h
)
191 return GetWindow(h
, GW_HWNDNEXT
);
196 //ifdef GetWindowProc
197 // #undef GetWindowProc
200 // #undef GetNextChild
203 // #endif // _WX_WINUNDEF_H_