wnd.h (19339B)
1/** 2 * WinPR: Windows Portable Runtime 3 * Window Notification System 4 * 5 * Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com> 6 * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com> 7 * 8 * Licensed under the Apache License, Version 2.0 (the "License"); 9 * you may not use this file except in compliance with the License. 10 * You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, software 15 * distributed under the License is distributed on an "AS IS" BASIS, 16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 * See the License for the specific language governing permissions and 18 * limitations under the License. 19 */ 20 21#ifndef WINPR_WND_H 22#define WINPR_WND_H 23 24#include <winpr/winpr.h> 25#include <winpr/wtypes.h> 26#include <winpr/windows.h> 27 28#ifndef _WIN32 29 30#define WM_NULL 0x0000 31#define WM_CREATE 0x0001 32#define WM_DESTROY 0x0002 33#define WM_MOVE 0x0003 34#define WM_SIZE 0x0005 35#define WM_ACTIVATE 0x0006 36#define WM_SETFOCUS 0x0007 37#define WM_KILLFOCUS 0x0008 38#define WM_ENABLE 0x000A 39#define WM_SETREDRAW 0x000B 40#define WM_SETTEXT 0x000C 41#define WM_GETTEXT 0x000D 42#define WM_GETTEXTLENGTH 0x000E 43#define WM_PAINT 0x000F 44#define WM_CLOSE 0x0010 45#define WM_QUERYENDSESSION 0x0011 46#define WM_QUERYOPEN 0x0013 47#define WM_ENDSESSION 0x0016 48#define WM_QUIT 0x0012 49#define WM_ERASEBKGND 0x0014 50#define WM_SYSCOLORCHANGE 0x0015 51#define WM_SHOWWINDOW 0x0018 52#define WM_WININICHANGE 0x001A 53#define WM_SETTINGCHANGE 0x001A 54#define WM_DEVMODECHANGE 0x001B 55#define WM_ACTIVATEAPP 0x001C 56#define WM_FONTCHANGE 0x001D 57#define WM_TIMECHANGE 0x001E 58#define WM_CANCELMODE 0x001F 59#define WM_SETCURSOR 0x0020 60#define WM_MOUSEACTIVATE 0x0021 61#define WM_CHILDACTIVATE 0x0022 62#define WM_QUEUESYNC 0x0023 63#define WM_GETMINMAXINFO 0x0024 64#define WM_PAINTICON 0x0026 65#define WM_ICONERASEBKGND 0x0027 66#define WM_NEXTDLGCTL 0x0028 67#define WM_SPOOLERSTATUS 0x002A 68#define WM_DRAWITEM 0x002B 69#define WM_MEASUREITEM 0x002C 70#define WM_DELETEITEM 0x002D 71#define WM_VKEYTOITEM 0x002E 72#define WM_CHARTOITEM 0x002F 73#define WM_SETFONT 0x0030 74#define WM_GETFONT 0x0031 75#define WM_SETHOTKEY 0x0032 76#define WM_GETHOTKEY 0x0033 77#define WM_QUERYDRAGICON 0x0037 78#define WM_COMPAREITEM 0x0039 79#define WM_GETOBJECT 0x003D 80#define WM_COMPACTING 0x0041 81#define WM_COMMNOTIFY 0x0044 82#define WM_WINDOWPOSCHANGING 0x0046 83#define WM_WINDOWPOSCHANGED 0x0047 84#define WM_POWER 0x0048 85#define WM_COPYDATA 0x004A 86#define WM_CANCELJOURNAL 0x004B 87#define WM_NOTIFY 0x004E 88#define WM_INPUTLANGCHANGEREQUEST 0x0050 89#define WM_INPUTLANGCHANGE 0x0051 90#define WM_TCARD 0x0052 91#define WM_HELP 0x0053 92#define WM_USERCHANGED 0x0054 93#define WM_NOTIFYFORMAT 0x0055 94#define WM_CONTEXTMENU 0x007B 95#define WM_STYLECHANGING 0x007C 96#define WM_STYLECHANGED 0x007D 97#define WM_DISPLAYCHANGE 0x007E 98#define WM_GETICON 0x007F 99#define WM_SETICON 0x0080 100#define WM_NCCREATE 0x0081 101#define WM_NCDESTROY 0x0082 102#define WM_NCCALCSIZE 0x0083 103#define WM_NCHITTEST 0x0084 104#define WM_NCPAINT 0x0085 105#define WM_NCACTIVATE 0x0086 106#define WM_GETDLGCODE 0x0087 107#define WM_SYNCPAINT 0x0088 108#define WM_NCMOUSEMOVE 0x00A0 109#define WM_NCLBUTTONDOWN 0x00A1 110#define WM_NCLBUTTONUP 0x00A2 111#define WM_NCLBUTTONDBLCLK 0x00A3 112#define WM_NCRBUTTONDOWN 0x00A4 113#define WM_NCRBUTTONUP 0x00A5 114#define WM_NCRBUTTONDBLCLK 0x00A6 115#define WM_NCMBUTTONDOWN 0x00A7 116#define WM_NCMBUTTONUP 0x00A8 117#define WM_NCMBUTTONDBLCLK 0x00A9 118#define WM_NCXBUTTONDOWN 0x00AB 119#define WM_NCXBUTTONUP 0x00AC 120#define WM_NCXBUTTONDBLCLK 0x00AD 121#define WM_INPUT_DEVICE_CHANGE 0x00FE 122#define WM_INPUT 0x00FF 123#define WM_KEYFIRST 0x0100 124#define WM_KEYDOWN 0x0100 125#define WM_KEYUP 0x0101 126#define WM_CHAR 0x0102 127#define WM_DEADCHAR 0x0103 128#define WM_SYSKEYDOWN 0x0104 129#define WM_SYSKEYUP 0x0105 130#define WM_SYSCHAR 0x0106 131#define WM_SYSDEADCHAR 0x0107 132#define WM_UNICHAR 0x0109 133#define WM_KEYLAST 0x0109 134#define WM_IME_STARTCOMPOSITION 0x010D 135#define WM_IME_ENDCOMPOSITION 0x010E 136#define WM_IME_COMPOSITION 0x010F 137#define WM_IME_KEYLAST 0x010F 138#define WM_INITDIALOG 0x0110 139#define WM_COMMAND 0x0111 140#define WM_SYSCOMMAND 0x0112 141#define WM_TIMER 0x0113 142#define WM_HSCROLL 0x0114 143#define WM_VSCROLL 0x0115 144#define WM_INITMENU 0x0116 145#define WM_INITMENUPOPUP 0x0117 146#define WM_GESTURE 0x0119 147#define WM_GESTURENOTIFY 0x011A 148#define WM_MENUSELECT 0x011F 149#define WM_MENUCHAR 0x0120 150#define WM_ENTERIDLE 0x0121 151#define WM_MENURBUTTONUP 0x0122 152#define WM_MENUDRAG 0x0123 153#define WM_MENUGETOBJECT 0x0124 154#define WM_UNINITMENUPOPUP 0x0125 155#define WM_MENUCOMMAND 0x0126 156#define WM_CHANGEUISTATE 0x0127 157#define WM_UPDATEUISTATE 0x0128 158#define WM_QUERYUISTATE 0x0129 159#define WM_CTLCOLORMSGBOX 0x0132 160#define WM_CTLCOLOREDIT 0x0133 161#define WM_CTLCOLORLISTBOX 0x0134 162#define WM_CTLCOLORBTN 0x0135 163#define WM_CTLCOLORDLG 0x0136 164#define WM_CTLCOLORSCROLLBAR 0x0137 165#define WM_CTLCOLORSTATIC 0x0138 166#define WM_MOUSEFIRST 0x0200 167#define WM_MOUSEMOVE 0x0200 168#define WM_LBUTTONDOWN 0x0201 169#define WM_LBUTTONUP 0x0202 170#define WM_LBUTTONDBLCLK 0x0203 171#define WM_RBUTTONDOWN 0x0204 172#define WM_RBUTTONUP 0x0205 173#define WM_RBUTTONDBLCLK 0x0206 174#define WM_MBUTTONDOWN 0x0207 175#define WM_MBUTTONUP 0x0208 176#define WM_MBUTTONDBLCLK 0x0209 177#define WM_MOUSEWHEEL 0x020A 178#define WM_XBUTTONDOWN 0x020B 179#define WM_XBUTTONUP 0x020C 180#define WM_XBUTTONDBLCLK 0x020D 181#define WM_MOUSEHWHEEL 0x020E 182#define WM_MOUSELAST 0x020E 183#define WM_PARENTNOTIFY 0x0210 184#define WM_ENTERMENULOOP 0x0211 185#define WM_EXITMENULOOP 0x0212 186#define WM_NEXTMENU 0x0213 187#define WM_SIZING 0x0214 188#define WM_CAPTURECHANGED 0x0215 189#define WM_MOVING 0x0216 190#define WM_POWERBROADCAST 0x0218 191#define WM_DEVICECHANGE 0x0219 192#define WM_MDICREATE 0x0220 193#define WM_MDIDESTROY 0x0221 194#define WM_MDIACTIVATE 0x0222 195#define WM_MDIRESTORE 0x0223 196#define WM_MDINEXT 0x0224 197#define WM_MDIMAXIMIZE 0x0225 198#define WM_MDITILE 0x0226 199#define WM_MDICASCADE 0x0227 200#define WM_MDIICONARRANGE 0x0228 201#define WM_MDIGETACTIVE 0x0229 202#define WM_MDISETMENU 0x0230 203#define WM_ENTERSIZEMOVE 0x0231 204#define WM_EXITSIZEMOVE 0x0232 205#define WM_DROPFILES 0x0233 206#define WM_MDIREFRESHMENU 0x0234 207#define WM_POINTERDEVICECHANGE 0x0238 208#define WM_POINTERDEVICEINRANGE 0x0239 209#define WM_POINTERDEVICEOUTOFRANGE 0x023A 210#define WM_TOUCH 0x0240 211#define WM_NCPOINTERUPDATE 0x0241 212#define WM_NCPOINTERDOWN 0x0242 213#define WM_NCPOINTERUP 0x0243 214#define WM_POINTERUPDATE 0x0245 215#define WM_POINTERDOWN 0x0246 216#define WM_POINTERUP 0x0247 217#define WM_POINTERENTER 0x0249 218#define WM_POINTERLEAVE 0x024A 219#define WM_POINTERACTIVATE 0x024B 220#define WM_POINTERCAPTURECHANGED 0x024C 221#define WM_TOUCHHITTESTING 0x024D 222#define WM_POINTERWHEEL 0x024E 223#define WM_POINTERHWHEEL 0x024F 224#define WM_IME_SETCONTEXT 0x0281 225#define WM_IME_NOTIFY 0x0282 226#define WM_IME_CONTROL 0x0283 227#define WM_IME_COMPOSITIONFULL 0x0284 228#define WM_IME_SELECT 0x0285 229#define WM_IME_CHAR 0x0286 230#define WM_IME_REQUEST 0x0288 231#define WM_IME_KEYDOWN 0x0290 232#define WM_IME_KEYUP 0x0291 233#define WM_MOUSEHOVER 0x02A1 234#define WM_MOUSELEAVE 0x02A3 235#define WM_NCMOUSEHOVER 0x02A0 236#define WM_NCMOUSELEAVE 0x02A2 237#define WM_WTSSESSION_CHANGE 0x02B1 238#define WM_TABLET_FIRST 0x02c0 239#define WM_TABLET_LAST 0x02df 240#define WM_CUT 0x0300 241#define WM_COPY 0x0301 242#define WM_PASTE 0x0302 243#define WM_CLEAR 0x0303 244#define WM_UNDO 0x0304 245#define WM_RENDERFORMAT 0x0305 246#define WM_RENDERALLFORMATS 0x0306 247#define WM_DESTROYCLIPBOARD 0x0307 248#define WM_DRAWCLIPBOARD 0x0308 249#define WM_PAINTCLIPBOARD 0x0309 250#define WM_VSCROLLCLIPBOARD 0x030A 251#define WM_SIZECLIPBOARD 0x030B 252#define WM_ASKCBFORMATNAME 0x030C 253#define WM_CHANGECBCHAIN 0x030D 254#define WM_HSCROLLCLIPBOARD 0x030E 255#define WM_QUERYNEWPALETTE 0x030F 256#define WM_PALETTEISCHANGING 0x0310 257#define WM_PALETTECHANGED 0x0311 258#define WM_HOTKEY 0x0312 259#define WM_PRINT 0x0317 260#define WM_PRINTCLIENT 0x0318 261#define WM_APPCOMMAND 0x0319 262#define WM_THEMECHANGED 0x031A 263#define WM_CLIPBOARDUPDATE 0x031D 264#define WM_DWMCOMPOSITIONCHANGED 0x031E 265#define WM_DWMNCRENDERINGCHANGED 0x031F 266#define WM_DWMCOLORIZATIONCOLORCHANGED 0x0320 267#define WM_DWMWINDOWMAXIMIZEDCHANGE 0x0321 268#define WM_DWMSENDICONICTHUMBNAIL 0x0323 269#define WM_DWMSENDICONICLIVEPREVIEWBITMAP 0x0326 270#define WM_GETTITLEBARINFOEX 0x033F 271#define WM_HANDHELDFIRST 0x0358 272#define WM_HANDHELDLAST 0x035F 273#define WM_AFXFIRST 0x0360 274#define WM_AFXLAST 0x037F 275#define WM_PENWINFIRST 0x0380 276#define WM_PENWINLAST 0x038F 277#define WM_APP 0x8000 278#define WM_USER 0x0400 279 280#define HWND_BROADCAST ((HWND)0xFFFF) 281#define HWND_MESSAGE ((HWND)-3) 282#define HWND_DESKTOP ((HWND)0) 283#define HWND_TOP ((HWND)0) 284#define HWND_BOTTOM ((HWND)1) 285#define HWND_TOPMOST ((HWND)-1) 286#define HWND_NOTOPMOST ((HWND)-2) 287 288typedef WORD ATOM; 289typedef UINT_PTR WPARAM; 290typedef LONG_PTR LPARAM; 291typedef LONG_PTR LRESULT; 292 293typedef FARPROC SENDASYNCPROC; 294typedef LRESULT(CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM); 295 296typedef struct tagWNDCLASSA 297{ 298 UINT style; 299 WNDPROC lpfnWndProc; 300 int cbClsExtra; 301 int cbWndExtra; 302 HINSTANCE hInstance; 303 HICON hIcon; 304 HCURSOR hCursor; 305 HBRUSH hbrBackground; 306 LPCSTR lpszMenuName; 307 LPCSTR lpszClassName; 308} WNDCLASSA, *PWNDCLASSA, NEAR *NPWNDCLASSA, FAR *LPWNDCLASSA; 309 310typedef struct tagWNDCLASSW 311{ 312 UINT style; 313 WNDPROC lpfnWndProc; 314 int cbClsExtra; 315 int cbWndExtra; 316 HINSTANCE hInstance; 317 HICON hIcon; 318 HCURSOR hCursor; 319 HBRUSH hbrBackground; 320 LPCWSTR lpszMenuName; 321 LPCWSTR lpszClassName; 322} WNDCLASSW, *PWNDCLASSW, NEAR *NPWNDCLASSW, FAR *LPWNDCLASSW; 323 324typedef struct tagWNDCLASSEXA 325{ 326 UINT cbSize; 327 UINT style; 328 WNDPROC lpfnWndProc; 329 int cbClsExtra; 330 int cbWndExtra; 331 HINSTANCE hInstance; 332 HICON hIcon; 333 HCURSOR hCursor; 334 HBRUSH hbrBackground; 335 LPCSTR lpszMenuName; 336 LPCSTR lpszClassName; 337 HICON hIconSm; 338} WNDCLASSEXA, *PWNDCLASSEXA, NEAR *NPWNDCLASSEXA, FAR *LPWNDCLASSEXA; 339 340typedef struct tagWNDCLASSEXW 341{ 342 UINT cbSize; 343 UINT style; 344 WNDPROC lpfnWndProc; 345 int cbClsExtra; 346 int cbWndExtra; 347 HINSTANCE hInstance; 348 HICON hIcon; 349 HCURSOR hCursor; 350 HBRUSH hbrBackground; 351 LPCWSTR lpszMenuName; 352 LPCWSTR lpszClassName; 353 HICON hIconSm; 354} WNDCLASSEXW, *PWNDCLASSEXW, NEAR *NPWNDCLASSEXW, FAR *LPWNDCLASSEXW; 355 356#ifdef UNICODE 357typedef WNDCLASSW WNDCLASS; 358typedef PWNDCLASSW PWNDCLASS; 359typedef NPWNDCLASSW NPWNDCLASS; 360typedef LPWNDCLASSW LPWNDCLASS; 361typedef WNDCLASSEXW WNDCLASSEX; 362typedef PWNDCLASSEXW PWNDCLASSEX; 363typedef NPWNDCLASSEXW NPWNDCLASSEX; 364typedef LPWNDCLASSEXW LPWNDCLASSEX; 365#else 366typedef WNDCLASSA WNDCLASS; 367typedef PWNDCLASSA PWNDCLASS; 368typedef NPWNDCLASSA NPWNDCLASS; 369typedef LPWNDCLASSA LPWNDCLASS; 370typedef WNDCLASSEXA WNDCLASSEX; 371typedef PWNDCLASSEXA PWNDCLASSEX; 372typedef NPWNDCLASSEXA NPWNDCLASSEX; 373typedef LPWNDCLASSEXA LPWNDCLASSEX; 374#endif 375 376typedef struct tagPOINT 377{ 378 LONG x; 379 LONG y; 380} POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT; 381 382typedef struct tagMSG 383{ 384 HWND hwnd; 385 UINT message; 386 WPARAM wParam; 387 LPARAM lParam; 388 DWORD time; 389 POINT pt; 390} MSG, *PMSG, NEAR *NPMSG, FAR *LPMSG; 391 392typedef struct tagCOPYDATASTRUCT 393{ 394 ULONG_PTR dwData; 395 DWORD cbData; 396 PVOID lpData; 397} COPYDATASTRUCT, *PCOPYDATASTRUCT; 398 399typedef struct tagWTSSESSION_NOTIFICATION 400{ 401 DWORD cbSize; 402 DWORD dwSessionId; 403} WTSSESSION_NOTIFICATION, *PWTSSESSION_NOTIFICATION; 404 405#define WTS_CONSOLE_CONNECT 0x1 406#define WTS_CONSOLE_DISCONNECT 0x2 407#define WTS_REMOTE_CONNECT 0x3 408#define WTS_REMOTE_DISCONNECT 0x4 409#define WTS_SESSION_LOGON 0x5 410#define WTS_SESSION_LOGOFF 0x6 411#define WTS_SESSION_LOCK 0x7 412#define WTS_SESSION_UNLOCK 0x8 413#define WTS_SESSION_REMOTE_CONTROL 0x9 414#define WTS_SESSION_CREATE 0xA 415#define WTS_SESSION_TERMINATE 0xB 416 417#ifdef __cplusplus 418extern "C" 419{ 420#endif 421 422 WINPR_API WORD WINAPI GetWindowWord(HWND hWnd, int nIndex); 423 424 WINPR_API WORD WINAPI SetWindowWord(HWND hWnd, int nIndex, WORD wNewWord); 425 426 WINPR_API LONG WINAPI GetWindowLongA(HWND hWnd, int nIndex); 427 WINPR_API LONG WINAPI GetWindowLongW(HWND hWnd, int nIndex); 428 429 WINPR_API LONG WINAPI SetWindowLongA(HWND hWnd, int nIndex, LONG dwNewLong); 430 WINPR_API LONG WINAPI SetWindowLongW(HWND hWnd, int nIndex, LONG dwNewLong); 431 432 WINPR_API LONG_PTR WINAPI GetWindowLongPtrA(HWND hWnd, int nIndex); 433 WINPR_API LONG_PTR WINAPI GetWindowLongPtrW(HWND hWnd, int nIndex); 434 435 WINPR_API LONG_PTR WINAPI SetWindowLongPtrA(HWND hWnd, int nIndex, LONG_PTR dwNewLong); 436 WINPR_API LONG_PTR WINAPI SetWindowLongPtrW(HWND hWnd, int nIndex, LONG_PTR dwNewLong); 437 438 WINPR_API BOOL WINAPI DestroyWindow(HWND hWnd); 439 440 WINPR_API VOID WINAPI PostQuitMessage(int nExitCode); 441 442 WINPR_API ATOM WINAPI RegisterClassA(CONST WNDCLASSA* lpWndClass); 443 WINPR_API ATOM WINAPI RegisterClassW(CONST WNDCLASSW* lpWndClass); 444 445 WINPR_API ATOM WINAPI RegisterClassExA(CONST WNDCLASSEXA* lpwcx); 446 WINPR_API ATOM WINAPI RegisterClassExW(CONST WNDCLASSEXW* lpwcx); 447 448 WINPR_API BOOL WINAPI UnregisterClassA(LPCSTR lpClassName, HINSTANCE hInstance); 449 WINPR_API BOOL WINAPI UnregisterClassW(LPCWSTR lpClassName, HINSTANCE hInstance); 450 451 WINPR_API HWND WINAPI CreateWindowExA(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, 452 DWORD dwStyle, int X, int Y, int nWidth, int nHeight, 453 HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, 454 LPVOID lpParam); 455 WINPR_API HWND WINAPI CreateWindowExW(DWORD dwExStyle, LPCWSTR lpClassName, 456 LPCWSTR lpWindowName, DWORD dwStyle, int X, int Y, 457 int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, 458 HINSTANCE hInstance, LPVOID lpParam); 459 460#ifndef WINPR_NO_CREATE_WINDOW 461#define CreateWindowA(lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, \ 462 hMenu, hInstance, lpParam) \ 463 CreateWindowExA(0L, lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, \ 464 hMenu, hInstance, lpParam) 465#define CreateWindowW(lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, \ 466 hMenu, hInstance, lpParam) \ 467 CreateWindowExW(0L, lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, \ 468 hMenu, hInstance, lpParam) 469#endif 470 471 WINPR_API HWND WINAPI FindWindowA(LPCSTR lpClassName, LPCSTR lpWindowName); 472 WINPR_API HWND WINAPI FindWindowW(LPCWSTR lpClassName, LPCWSTR lpWindowName); 473 474 WINPR_API HWND WINAPI FindWindowExA(HWND hWndParent, HWND hWndChildAfter, LPCSTR lpszClass, 475 LPCSTR lpszWindow); 476 WINPR_API HWND WINAPI FindWindowExW(HWND hWndParent, HWND hWndChildAfter, LPCWSTR lpszClass, 477 LPCWSTR lpszWindow); 478 479 WINPR_API BOOL WINAPI GetMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, 480 UINT wMsgFilterMax); 481 WINPR_API BOOL WINAPI GetMessageW(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, 482 UINT wMsgFilterMax); 483 484 WINPR_API DWORD WINAPI GetMessagePos(VOID); 485 486 WINPR_API LONG WINAPI GetMessageTime(VOID); 487 488 WINPR_API LPARAM WINAPI GetMessageExtraInfo(VOID); 489 490 WINPR_API LPARAM WINAPI SetMessageExtraInfo(LPARAM lParam); 491 492 WINPR_API BOOL WINAPI SetMessageQueue(int cMessagesMax); 493 494 WINPR_API LRESULT WINAPI SendMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 495 WINPR_API LRESULT WINAPI SendMessageW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 496 497 WINPR_API LRESULT WINAPI SendMessageTimeoutA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, 498 UINT fuFlags, UINT uTimeout, 499 PDWORD_PTR lpdwResult); 500 WINPR_API LRESULT WINAPI SendMessageTimeoutW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, 501 UINT fuFlags, UINT uTimeout, 502 PDWORD_PTR lpdwResult); 503 504 WINPR_API BOOL WINAPI SendNotifyMessageA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 505 WINPR_API BOOL WINAPI SendNotifyMessageW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 506 507 WINPR_API BOOL WINAPI SendMessageCallbackA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, 508 SENDASYNCPROC lpResultCallBack, ULONG_PTR dwData); 509 WINPR_API BOOL WINAPI SendMessageCallbackW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, 510 SENDASYNCPROC lpResultCallBack, ULONG_PTR dwData); 511 512 WINPR_API BOOL WINAPI TranslateMessage(CONST MSG* lpMsg); 513 514 WINPR_API LRESULT WINAPI DispatchMessageA(CONST MSG* lpMsg); 515 WINPR_API LRESULT WINAPI DispatchMessageW(CONST MSG* lpMsg); 516 517 WINPR_API BOOL WINAPI PeekMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, 518 UINT wMsgFilterMax, UINT wRemoveMsg); 519 WINPR_API BOOL WINAPI PeekMessageW(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, 520 UINT wMsgFilterMax, UINT wRemoveMsg); 521 522 WINPR_API BOOL WINAPI ReplyMessage(LRESULT lResult); 523 524 WINPR_API BOOL WINAPI WaitMessage(VOID); 525 526 WINPR_API LRESULT WINAPI CallWindowProcA(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, 527 WPARAM wParam, LPARAM lParam); 528 WINPR_API LRESULT WINAPI CallWindowProcW(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, 529 WPARAM wParam, LPARAM lParam); 530 531 WINPR_API LRESULT WINAPI DefWindowProcA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 532 WINPR_API LRESULT WINAPI DefWindowProcW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 533 534#ifdef UNICODE 535#define GetWindowLong GetWindowLongW 536#define SetWindowLong SetWindowLongW 537#define GetWindowLongPtr GetWindowLongPtrW 538#define SetWindowLongPtr SetWindowLongPtrW 539#define RegisterClass RegisterClassW 540#define RegisterClassEx RegisterClassExW 541#define UnregisterClass UnregisterClassW 542#ifndef WINPR_NO_CREATE_WINDOW 543#define CreateWindow CreateWindowW 544#endif 545#define CreateWindowEx CreateWindowExW 546#define FindWindow FindWindowW 547#define FindWindowEx FindWindowExW 548#define GetMessage GetMessageW 549#define SendMessage SendMessageW 550#define SendMessageTimeout SendMessageTimeoutW 551#define SendNotifyMessage SendNotifyMessageW 552#define SendMessageCallback SendMessageCallbackW 553#define DispatchMessage DispatchMessageW 554#define PeekMessage PeekMessageW 555#define CallWindowProc CallWindowProcW 556#define DefWindowProc DefWindowProcW 557#else 558#define GetWindowLong GetWindowLongA 559#define SetWindowLong SetWindowLongA 560#define GetWindowLongPtr GetWindowLongPtrA 561#define SetWindowLongPtr SetWindowLongPtrA 562#define RegisterClass RegisterClassA 563#define RegisterClassEx RegisterClassExA 564#define UnregisterClass UnregisterClassA 565#ifndef WINPR_NO_CREATE_WINDOW 566#define CreateWindow CreateWindowA 567#endif 568#define CreateWindowEx CreateWindowExA 569#define FindWindow FindWindowA 570#define FindWindowEx FindWindowExA 571#define GetMessage GetMessageA 572#define SendMessage SendMessageA 573#define SendMessageTimeout SendMessageTimeoutA 574#define SendNotifyMessage SendNotifyMessageA 575#define SendMessageCallback SendMessageCallbackA 576#define DispatchMessage DispatchMessageA 577#define PeekMessage PeekMessageA 578#define CallWindowProc CallWindowProcA 579#define DefWindowProc DefWindowProcA 580#endif 581 582#ifdef __cplusplus 583} 584#endif 585 586#endif 587 588#ifndef WTS_SESSION_CREATE 589#define WTS_SESSION_CREATE 0xA 590#endif 591 592#ifndef WTS_SESSION_TERMINATE 593#define WTS_SESSION_TERMINATE 0xB 594#endif 595 596#endif /* WINPR_WND_H */