ReactOS 0.4.16-dev-1305-ge26ad0d
regcontrol.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  builtin_class_descr
 

Functions

BOOL WINAPI RegisterSystemControls (VOID)
 
ATOM WINAPI RegisterClassExWOWW (WNDCLASSEXW *, LPDWORD, WORD, DWORD, BOOL)
 
BOOL FASTCALL VersionRegisterClass (PCWSTR, LPCWSTR, HANDLE, HMODULE *)
 
LRESULT WINAPI ImeWndProc_common (HWND, UINT, WPARAM, LPARAM, BOOL)
 
LRESULT WINAPI ImeWndProcA (HWND, UINT, WPARAM, LPARAM)
 
LRESULT WINAPI ImeWndProcW (HWND, UINT, WPARAM, LPARAM)
 
BOOL WINAPI RegisterIMEClass (VOID)
 

Variables

DWORD RegisterDefaultClasses
 
const struct builtin_class_descr BUTTON_builtin_class
 
const struct builtin_class_descr COMBO_builtin_class
 
const struct builtin_class_descr COMBOLBOX_builtin_class
 
const struct builtin_class_descr DIALOG_builtin_class
 
const struct builtin_class_descr POPUPMENU_builtin_class
 
const struct builtin_class_descr DESKTOP_builtin_class
 
const struct builtin_class_descr EDIT_builtin_class
 
const struct builtin_class_descr ICONTITLE_builtin_class
 
const struct builtin_class_descr LISTBOX_builtin_class
 
const struct builtin_class_descr MDICLIENT_builtin_class
 
const struct builtin_class_descr MENU_builtin_class
 
const struct builtin_class_descr SCROLL_builtin_class
 
const struct builtin_class_descr STATIC_builtin_class
 
const struct builtin_class_descr GHOST_builtin_class
 

Function Documentation

◆ ImeWndProc_common()

LRESULT WINAPI ImeWndProc_common ( HWND  hwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam,
BOOL  unicode 
)

Definition at line 989 of file imm.c.

990{
991 PWND pWnd;
992 PIMEUI pimeui;
993 LRESULT ret;
994
995 pWnd = ValidateHwnd(hwnd);
996 if (pWnd == NULL)
997 {
998 ERR("hwnd was %p\n", hwnd);
999 return 0;
1000 }
1001
1002 if (!pWnd->fnid)
1003 {
1005 }
1006 else if (pWnd->fnid != FNID_IME)
1007 {
1008 ERR("fnid was 0x%x\n", pWnd->fnid);
1009 return 0;
1010 }
1011
1012 pimeui = (PIMEUI)GetWindowLongPtrW(hwnd, 0);
1013 if (pimeui == NULL)
1014 {
1015 pimeui = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IMEUI));
1016 if (pimeui == NULL)
1017 {
1018 ERR("HeapAlloc failed\n");
1021 return 0;
1022 }
1023
1024 SetWindowLongPtrW(hwnd, 0, (LONG_PTR)pimeui);
1025 pimeui->spwnd = pWnd;
1026 }
1027
1028 if (IS_CICERO_MODE())
1029 {
1031 if (ret)
1032 return ret;
1033 }
1034
1035 if (pimeui->nCntInIMEProc > 0)
1036 {
1037 switch (msg)
1038 {
1039 case WM_IME_CHAR:
1041 case WM_IME_CONTROL:
1042 case WM_IME_REQUEST:
1043 case WM_IME_SELECT:
1044 case WM_IME_SETCONTEXT:
1045 case WM_IME_STARTCOMPOSITION:
1046 case WM_IME_COMPOSITION:
1047 case WM_IME_ENDCOMPOSITION:
1048 return 0;
1049
1050 case WM_IME_NOTIFY:
1051 if (wParam < IMN_PRIVATE || IS_IME_HKL(pimeui->hKL) || !IS_CICERO_MODE())
1052 return 0;
1053 break;
1054
1055 case WM_IME_SYSTEM:
1056 switch (wParam)
1057 {
1058 case 0x03:
1059 case 0x10:
1060 case 0x13:
1061 break;
1062
1063 default:
1064 return 0;
1065 }
1066 break;
1067
1068 default:
1069 goto Finish;
1070 }
1071 }
1072
1073 if ((pWnd->state2 & WNDS2_INDESTROY) || (pWnd->state & WNDS_DESTROYED))
1074 {
1075 switch (msg)
1076 {
1077 case WM_DESTROY:
1078 case WM_NCDESTROY:
1079 case WM_FINALDESTROY:
1080 break;
1081
1082 default:
1083 return 0;
1084 }
1085 }
1086
1087 switch (msg)
1088 {
1089 case WM_CREATE:
1090 return ImeWnd_OnCreate(pimeui, (LPCREATESTRUCT)lParam);
1091
1092 case WM_DESTROY:
1094 return 0;
1095
1096 case WM_NCDESTROY:
1097 case WM_FINALDESTROY:
1098 pimeui->spwnd = NULL;
1099 HeapFree(GetProcessHeap(), 0, pimeui);
1101 break;
1102
1103 case WM_ERASEBKGND:
1104 return TRUE;
1105
1106 case WM_PAINT:
1107 return 0;
1108
1109 case WM_IME_STARTCOMPOSITION:
1110 case WM_IME_COMPOSITION:
1111 case WM_IME_ENDCOMPOSITION:
1112 return User32SendImeUIMessage(pimeui, msg, wParam, lParam, unicode);
1113
1114 case WM_IME_CONTROL:
1115 return ImeWnd_OnImeControl(pimeui, wParam, lParam, unicode);
1116
1117 case WM_IME_NOTIFY:
1118 return ImeWnd_OnImeNotify(pimeui, wParam, lParam);
1119
1120 case WM_IME_REQUEST:
1121 return 0;
1122
1123 case WM_IME_SELECT:
1125 return (LRESULT)pimeui;
1126
1127 case WM_IME_SETCONTEXT:
1128 return ImeWnd_OnImeSetContext(pimeui, wParam, lParam);
1129
1130 case WM_IME_SYSTEM:
1131 return ImeWnd_OnImeSystem(pimeui, wParam, lParam);
1132
1133 default:
1134 break;
1135 }
1136
1137Finish:
1138 if (unicode)
1139 return DefWindowProcW(hwnd, msg, wParam, lParam);
1140 return DefWindowProcA(hwnd, msg, wParam, lParam);
1141}
#define msg(x)
Definition: auth_time.c:54
#define ERR(fmt,...)
Definition: precomp.h:57
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
LRESULT WINAPI CtfImmDispatchDefImeMessage(_In_ HWND hWnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam)
Definition: ctf.c:1417
#define IS_IME_HKL(hKL)
Definition: imm32_undoc.h:21
#define WM_IME_SYSTEM
Definition: imm32_undoc.h:32
#define IMN_PRIVATE
Definition: imm.h:385
#define FNID_DESTROY
Definition: ntuser.h:898
struct tagIMEUI * PIMEUI
#define WNDS_DESTROYED
Definition: ntuser.h:636
#define FNID_IME
Definition: ntuser.h:874
#define IS_CICERO_MODE()
Definition: ntuser.h:1213
#define WNDS2_INDESTROY
Definition: ntuser.h:648
BOOL NTAPI NtUserSetWindowFNID(HWND hWnd, WORD fnID)
Definition: window.c:4348
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
Definition: ntuser.h:694
DWORD state2
Definition: ntuser.h:702
DWORD fnid
Definition: ntuser.h:709
DWORD state
Definition: ntuser.h:701
HKL hKL
Definition: ntuser.h:1223
PWND spwnd
Definition: ntuser.h:1220
LONG nCntInIMEProc
Definition: ntuser.h:1225
#define WM_FINALDESTROY
Definition: undocuser.h:41
static VOID User32DestroyImeUIWindow(PIMEUI pimeui)
Definition: imm.c:365
LRESULT ImeWnd_OnImeSetContext(PIMEUI pimeui, WPARAM wParam, LPARAM lParam)
Definition: imm.c:834
static INT ImeWnd_OnCreate(PIMEUI pimeui, LPCREATESTRUCT lpCS)
Definition: imm.c:334
static LRESULT User32SendImeUIMessage(PIMEUI pimeui, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL unicode)
Definition: imm.c:167
static LRESULT ImeWnd_OnImeSystem(PIMEUI pimeui, WPARAM wParam, LPARAM lParam)
Definition: imm.c:679
static LRESULT ImeWnd_OnImeControl(PIMEUI pimeui, WPARAM wParam, LPARAM lParam, BOOL unicode)
Definition: imm.c:415
static VOID ImeWnd_OnImeSelect(PIMEUI pimeui, WPARAM wParam, LPARAM lParam)
Definition: imm.c:380
static LRESULT ImeWnd_OnImeNotify(PIMEUI pimeui, WPARAM wParam, LPARAM lParam)
Definition: imm.c:239
#define IMM_FN(name)
Definition: user32p.h:56
int ret
#define ValidateHwnd(hwnd)
Definition: precomp.h:101
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LRESULT
Definition: windef.h:209
#define WM_PAINT
Definition: winuser.h:1639
#define WM_ERASEBKGND
Definition: winuser.h:1644
#define WM_IME_REQUEST
Definition: winuser.h:1855
#define GetWindowLongPtrW
Definition: winuser.h:4905
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_IME_NOTIFY
Definition: winuser.h:1849
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_CREATE
Definition: winuser.h:1627
#define WM_IME_SETCONTEXT
Definition: winuser.h:1848
#define WM_IME_CHAR
Definition: winuser.h:1853
#define WM_IME_COMPOSITIONFULL
Definition: winuser.h:1851
#define WM_NCDESTROY
Definition: winuser.h:1703
#define WM_IME_CONTROL
Definition: winuser.h:1850
#define WM_IME_SELECT
Definition: winuser.h:1852
#define WM_DESTROY
Definition: winuser.h:1628
#define SetWindowLongPtrW
Definition: winuser.h:5431
BOOL WINAPI DestroyWindow(_In_ HWND)

Referenced by ImeWndProcA(), ImeWndProcW(), RealDefWindowProcA(), RealDefWindowProcW(), and RegisterClientPFN().

◆ ImeWndProcA()

LRESULT WINAPI ImeWndProcA ( HWND  hwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 1143 of file imm.c.

1144{
1146}
#define FALSE
Definition: types.h:117
LRESULT WINAPI ImeWndProc_common(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode)
Definition: imm.c:989

Referenced by RegisterClientPFN().

◆ ImeWndProcW()

LRESULT WINAPI ImeWndProcW ( HWND  hwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 1148 of file imm.c.

1149{
1151}

Referenced by RegisterClientPFN(), and RegisterIMEClass().

◆ RegisterClassExWOWW()

ATOM WINAPI RegisterClassExWOWW ( WNDCLASSEXW lpwcx,
LPDWORD  pdwWowData,
WORD  fnID,
DWORD  dwFlags,
BOOL  ChkRegCls 
)

Definition at line 1262 of file class.c.

1267{
1268 ATOM Atom;
1270 UNICODE_STRING ClassName;
1271 UNICODE_STRING ClassVersion;
1272 UNICODE_STRING MenuName = {0};
1273 CLSMENUNAME clsMenuName;
1274 ANSI_STRING AnsiMenuName;
1275 LPCWSTR lpszClsVersion;
1276
1277 if (lpwcx == NULL || lpwcx->cbSize != sizeof(*lpwcx) ||
1278 lpwcx->cbClsExtra < 0 || lpwcx->cbWndExtra < 0 ||
1279 lpwcx->lpszClassName == NULL)
1280 {
1281 TRACE("RegisterClassExWOWW Invalid Parameter Error!\n");
1283 return 0;
1284 }
1285
1286 if (ChkRegCls)
1287 {
1289 }
1290 /*
1291 * On real Windows this looks more like:
1292 * if (lpwcx->hInstance == User32Instance &&
1293 * *(PULONG)((ULONG_PTR)NtCurrentTeb() + 0x6D4) & 0x400)
1294 * But since I have no idea what the magic field in the
1295 * TEB structure means, I rather decided to omit that.
1296 * -- Filip Navara
1297
1298 GetWin32ClientInfo()->dwExpWinVer & (WINVER == 0x400)
1299 */
1300 if (lpwcx->hInstance == User32Instance)
1301 {
1302 TRACE("RegisterClassExWOWW User32Instance!\n");
1304 return 0;
1305 }
1306 /* Yes, this is correct. We should modify the passed structure. */
1307 if (lpwcx->hInstance == NULL)
1308 ((WNDCLASSEXW*)lpwcx)->hInstance = GetModuleHandleW(NULL);
1309
1310 RtlCopyMemory(&WndClass, lpwcx, sizeof(*lpwcx));
1311
1312 RtlInitEmptyAnsiString(&AnsiMenuName, NULL, 0);
1313 if (!IS_INTRESOURCE(WndClass.lpszMenuName))
1314 {
1315 if (WndClass.lpszMenuName[0])
1316 {
1317 RtlInitUnicodeString(&MenuName, WndClass.lpszMenuName);
1318 RtlUnicodeStringToAnsiString(&AnsiMenuName, &MenuName, TRUE);
1319 }
1320 }
1321 else
1322 {
1323 MenuName.Buffer = (LPWSTR)WndClass.lpszMenuName;
1324 AnsiMenuName.Buffer = (PCHAR)WndClass.lpszMenuName;
1325 }
1326
1327 if (WndClass.lpszClassName && !IS_ATOM(WndClass.lpszClassName))
1328 {
1329 RtlInitUnicodeString(&ClassName, WndClass.lpszClassName);
1330 }
1331 else
1332 {
1333 ClassName.Length = ClassName.MaximumLength = 0;
1334 ClassName.Buffer = (LPWSTR)WndClass.lpszClassName;
1335 }
1336
1337 ClassVersion = ClassName;
1338 if (fnID == 0)
1339 {
1340 lpszClsVersion = ClassNameToVersion(lpwcx->lpszClassName, NULL, NULL, NULL, FALSE);
1341 if (lpszClsVersion)
1342 {
1343 RtlInitUnicodeString(&ClassVersion, lpszClsVersion);
1344 }
1345 }
1346
1347 clsMenuName.pszClientAnsiMenuName = AnsiMenuName.Buffer;
1348 clsMenuName.pwszClientUnicodeMenuName = MenuName.Buffer;
1349 clsMenuName.pusMenuName = &MenuName;
1350
1352 &ClassName,
1353 &ClassVersion,
1354 &clsMenuName,
1355 fnID,
1356 dwFlags,
1357 pdwWowData);
1358
1359 TRACE("atom=%04x wndproc=%p hinst=%p bg=%p style=%08x clsExt=%d winExt=%d class=%p\n",
1360 Atom, lpwcx->lpfnWndProc, lpwcx->hInstance, lpwcx->hbrBackground,
1361 lpwcx->style, lpwcx->cbClsExtra, lpwcx->cbWndExtra, WndClass);
1362
1363 return Atom;
1364}
WCHAR WndClass[]
Definition: capicon.c:23
_Out_ RTL_ATOM * Atom
Definition: class.h:54
#define IS_ATOM(x)
Definition: class.h:3
WORD ATOM
Definition: dimm.idl:113
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
#define IS_INTRESOURCE(x)
Definition: loader.c:613
RTL_ATOM NTAPI NtUserRegisterClassExWOW(WNDCLASSEXW *lpwcx, PUNICODE_STRING pustrClassName, PUNICODE_STRING pustrCVersion, PCLSMENUNAME pClassMenuName, DWORD fnID, DWORD Flags, LPDWORD pWow)
Definition: class.c:2444
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
DWORD RegisterDefaultClasses
Definition: regcontrol.c:13
BOOL WINAPI RegisterSystemControls(VOID)
Definition: regcontrol.c:70
#define TRACE(s)
Definition: solgame.cpp:4
PUNICODE_STRING pusMenuName
Definition: ntuser.h:500
LPSTR pszClientAnsiMenuName
Definition: ntuser.h:498
LPWSTR pwszClientUnicodeMenuName
Definition: ntuser.h:499
USHORT MaximumLength
Definition: env_spec_w32.h:370
LPCWSTR lpszClassName
Definition: winuser.h:3302
HBRUSH hbrBackground
Definition: winuser.h:3300
WNDPROC lpfnWndProc
Definition: winuser.h:3294
UINT cbSize
Definition: winuser.h:3292
int cbWndExtra
Definition: winuser.h:3296
HINSTANCE hInstance
Definition: winuser.h:3297
UINT style
Definition: winuser.h:3293
int cbClsExtra
Definition: winuser.h:3295
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
char * PCHAR
Definition: typedefs.h:51
HINSTANCE User32Instance
Definition: dllmain.c:27
LPCWSTR FASTCALL ClassNameToVersion(const void *lpszClass, LPCWSTR lpszMenuName, LPCWSTR *plpLibFileName, HANDLE *pContext, BOOL bAnsi)
Definition: class.c:85
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by RegisterClassExA(), RegisterClassExW(), RegisterIMEClass(), and RegisterSystemControls().

◆ RegisterIMEClass()

BOOL WINAPI RegisterIMEClass ( VOID  )

Definition at line 1178 of file imm.c.

1179{
1180 ATOM atom;
1181 WNDCLASSEXW WndClass = { sizeof(WndClass) };
1182
1183 WndClass.lpszClassName = L"IME";
1184 WndClass.style = CS_GLOBALCLASS;
1185 WndClass.lpfnWndProc = ImeWndProcW;
1186 WndClass.cbWndExtra = sizeof(LONG_PTR);
1187 WndClass.hCursor = LoadCursorW(NULL, IDC_ARROW);
1188
1189 atom = RegisterClassExWOWW(&WndClass, 0, FNID_IME, 0, FALSE);
1190 if (!atom)
1191 {
1192 ERR("Failed to register IME Class!\n");
1193 return FALSE;
1194 }
1195
1197 TRACE("RegisterIMEClass atom = %u\n", atom);
1198 return TRUE;
1199}
#define ICLS_IME
Definition: ntuser.h:927
#define ICLASS_TO_MASK(iCls)
Definition: ntuser.h:902
#define L(x)
Definition: ntvdm.h:50
ATOM WINAPI RegisterClassExWOWW(WNDCLASSEXW *, LPDWORD, WORD, DWORD, BOOL)
Definition: class.c:1262
#define LONG_PTR
Definition: treelist.c:79
LRESULT WINAPI ImeWndProcW(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: imm.c:1148
#define IDC_ARROW
Definition: winuser.h:695
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2442
#define CS_GLOBALCLASS
Definition: winuser.h:660

Referenced by RegisterSystemControls().

◆ RegisterSystemControls()

BOOL WINAPI RegisterSystemControls ( VOID  )

Definition at line 70 of file regcontrol.c.

71{
73 UINT i;
74 ATOM atom;
75
76 if (RegisterDefaultClasses) return TRUE;
77
78 ZeroMemory(&WndClass, sizeof(WndClass));
79
80 WndClass.cbSize = sizeof(WndClass);
81
82 for (i = 0; i != sizeof(g_SysClasses) / sizeof(g_SysClasses[0]); i++)
83 {
84 WndClass.lpszClassName = g_SysClasses[i].desc->name;
85
86 // Set Global bit!
87 WndClass.style = g_SysClasses[i].desc->style|CS_GLOBALCLASS;
88 WndClass.lpfnWndProc = g_SysClasses[i].desc->procW;
89 WndClass.cbWndExtra = g_SysClasses[i].desc->extra;
90 WndClass.hCursor = LoadCursorW(NULL, g_SysClasses[i].desc->cursor);
91 WndClass.hbrBackground= g_SysClasses[i].desc->brush;
92
94 0,
96 0,
97 FALSE);
98 if (atom)
100 }
101
102 if ( //gpsi->dwSRVIFlags & SRVINFO_IMM32 && Not supported yet, need NlsMbCodePageTag working in Win32k.
103 !(RegisterDefaultClasses & ICLASS_TO_MASK(ICLS_IME))) // So, work like XP.
104 {
106 }
107
108 return TRUE;
109}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: ndis.h:50
const struct builtin_class_descr * desc
Definition: regcontrol.c:48
static const struct @5330 g_SysClasses[]
WORD fnid
Definition: regcontrol.c:49
WORD ClsId
Definition: regcontrol.c:50
BOOL WINAPI RegisterIMEClass(VOID)
Definition: imm.c:1178
#define ZeroMemory
Definition: winbase.h:1753

Referenced by CreateWindowExA(), CreateWindowExW(), GetClassInfoExA(), GetClassInfoExW(), RegisterClassExWOWW(), and User32CreateWindowEx().

◆ VersionRegisterClass()

BOOL FASTCALL VersionRegisterClass ( PCWSTR  pszClass,
LPCWSTR  lpLibFileName,
HANDLE  Contex,
HMODULE phLibModule 
)

Definition at line 195 of file class.c.

200{
201 BOOL Ret = FALSE;
203 PREGISTERCLASSNAMEW pRegisterClassNameW;
204 UNICODE_STRING ClassName;
205 WCHAR ClassNameBuf[MAX_PATH] = {0};
206 RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame = { sizeof(Frame), 1 };
207
208 ERR("VersionRegisterClass: Attempting to call RegisterClassNameW in %S.\n", lpLibFileName);
209
210 RtlActivateActivationContextUnsafeFast(&Frame, Contex);
211
213 {
214 hLibModule = LoadLibraryW(lpLibFileName);
215 if (hLibModule)
216 {
217 if ((pRegisterClassNameW = (void*)GetProcAddress(hLibModule, "RegisterClassNameW")))
218 {
219 if (IS_ATOM(pszClass))
220 {
221 RtlInitEmptyUnicodeString(&ClassName, ClassNameBuf, sizeof(ClassNameBuf));
222 if (!NtUserGetAtomName(LOWORD((DWORD_PTR)pszClass), &ClassName))
223 {
224 ERR("Error while verifying ATOM\n");
225 _SEH2_YIELD(goto Error_Exit);
226 }
227 pszClass = ClassName.Buffer;
228 }
229 Ret = pRegisterClassNameW(pszClass);
230 }
231 else
232 {
233 WARN("No RegisterClassNameW PROC\n");
234 }
235 }
236 }
238 {
239 ERR("Got exception while trying to call RegisterClassNameW!\n");
240 }
242
243Error_Exit:
244 if (Ret || !hLibModule)
245 {
246 if (phLibModule) *phLibModule = hLibModule;
247 }
248 else
249 {
250 DWORD dwLastError = GetLastError();
252 SetLastError(dwLastError);
253 }
254
255 RtlDeactivateActivationContextUnsafeFast(&Frame);
256 return Ret;
257}
#define WARN(fmt,...)
Definition: precomp.h:61
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
#define MAX_PATH
Definition: compat.h:34
#define LoadLibraryW(x)
Definition: compat.h:747
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
#define LOWORD(l)
Definition: pedump.c:82
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:82
#define _SEH2_END
Definition: pseh2_64.h:171
#define _SEH2_TRY
Definition: pseh2_64.h:71
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:184
HINSTANCE hLibModule
Definition: sfc.c:23
uint32_t DWORD_PTR
Definition: typedefs.h:65
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by GetClassInfoExA(), GetClassInfoExW(), and User32CreateWindowEx().

Variable Documentation

◆ BUTTON_builtin_class

const struct builtin_class_descr BUTTON_builtin_class
extern

Definition at line 142 of file button.c.

◆ COMBO_builtin_class

const struct builtin_class_descr COMBO_builtin_class
extern

Definition at line 67 of file combo.c.

◆ COMBOLBOX_builtin_class

const struct builtin_class_descr COMBOLBOX_builtin_class
extern

Definition at line 142 of file listbox.c.

◆ DESKTOP_builtin_class

const struct builtin_class_descr DESKTOP_builtin_class
extern

◆ DIALOG_builtin_class

const struct builtin_class_descr DIALOG_builtin_class
extern

Definition at line 109 of file dialog.c.

◆ EDIT_builtin_class

const struct builtin_class_descr EDIT_builtin_class
extern

Definition at line 5530 of file edit.c.

◆ GHOST_builtin_class

const struct builtin_class_descr GHOST_builtin_class
extern

Definition at line 17 of file ghost.c.

◆ ICONTITLE_builtin_class

const struct builtin_class_descr ICONTITLE_builtin_class
extern

Definition at line 29 of file icontitle.c.

◆ LISTBOX_builtin_class

const struct builtin_class_descr LISTBOX_builtin_class
extern

Definition at line 126 of file listbox.c.

◆ MDICLIENT_builtin_class

const struct builtin_class_descr MDICLIENT_builtin_class
extern

Definition at line 212 of file mdi.c.

◆ MENU_builtin_class

const struct builtin_class_descr MENU_builtin_class
extern

◆ POPUPMENU_builtin_class

const struct builtin_class_descr POPUPMENU_builtin_class
extern

Definition at line 48 of file menu.c.

◆ RegisterDefaultClasses

◆ SCROLL_builtin_class

const struct builtin_class_descr SCROLL_builtin_class
extern

Definition at line 75 of file scrollbar.c.

◆ STATIC_builtin_class

const struct builtin_class_descr STATIC_builtin_class
extern

Definition at line 81 of file static.c.