ReactOS 0.4.16-dev-1172-g2041f3c
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 952 of file imm.c.

953{
954 PWND pWnd;
955 PIMEUI pimeui;
956 LRESULT ret;
957
958 pWnd = ValidateHwnd(hwnd);
959 if (pWnd == NULL)
960 {
961 ERR("hwnd was %p\n", hwnd);
962 return 0;
963 }
964
965 if (!pWnd->fnid)
966 {
968 }
969 else if (pWnd->fnid != FNID_IME)
970 {
971 ERR("fnid was 0x%x\n", pWnd->fnid);
972 return 0;
973 }
974
975 pimeui = (PIMEUI)GetWindowLongPtrW(hwnd, 0);
976 if (pimeui == NULL)
977 {
978 pimeui = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IMEUI));
979 if (pimeui == NULL)
980 {
981 ERR("HeapAlloc failed\n");
984 return 0;
985 }
986
987 SetWindowLongPtrW(hwnd, 0, (LONG_PTR)pimeui);
988 pimeui->spwnd = pWnd;
989 }
990
991 if (IS_CICERO_MODE())
992 {
994 if (ret)
995 return ret;
996 }
997
998 if (pimeui->nCntInIMEProc > 0)
999 {
1000 switch (msg)
1001 {
1002 case WM_IME_CHAR:
1004 case WM_IME_CONTROL:
1005 case WM_IME_REQUEST:
1006 case WM_IME_SELECT:
1007 case WM_IME_SETCONTEXT:
1008 case WM_IME_STARTCOMPOSITION:
1009 case WM_IME_COMPOSITION:
1010 case WM_IME_ENDCOMPOSITION:
1011 return 0;
1012
1013 case WM_IME_NOTIFY:
1014 if (wParam < IMN_PRIVATE || IS_IME_HKL(pimeui->hKL) || !IS_CICERO_MODE())
1015 return 0;
1016 break;
1017
1018 case WM_IME_SYSTEM:
1019 switch (wParam)
1020 {
1021 case 0x03:
1022 case 0x10:
1023 case 0x13:
1024 break;
1025
1026 default:
1027 return 0;
1028 }
1029 break;
1030
1031 default:
1032 goto Finish;
1033 }
1034 }
1035
1036 if ((pWnd->state2 & WNDS2_INDESTROY) || (pWnd->state & WNDS_DESTROYED))
1037 {
1038 switch (msg)
1039 {
1040 case WM_DESTROY:
1041 case WM_NCDESTROY:
1042 case WM_FINALDESTROY:
1043 break;
1044
1045 default:
1046 return 0;
1047 }
1048 }
1049
1050 switch (msg)
1051 {
1052 case WM_CREATE:
1053 return ImeWnd_OnCreate(pimeui, (LPCREATESTRUCT)lParam);
1054
1055 case WM_DESTROY:
1057 return 0;
1058
1059 case WM_NCDESTROY:
1060 case WM_FINALDESTROY:
1061 pimeui->spwnd = NULL;
1062 HeapFree(GetProcessHeap(), 0, pimeui);
1064 break;
1065
1066 case WM_ERASEBKGND:
1067 return TRUE;
1068
1069 case WM_PAINT:
1070 return 0;
1071
1072 case WM_IME_STARTCOMPOSITION:
1073 case WM_IME_COMPOSITION:
1074 case WM_IME_ENDCOMPOSITION:
1075 return User32SendImeUIMessage(pimeui, msg, wParam, lParam, unicode);
1076
1077 case WM_IME_CONTROL:
1078 return ImeWnd_OnImeControl(pimeui, wParam, lParam, unicode);
1079
1080 case WM_IME_NOTIFY:
1081 return ImeWnd_OnImeNotify(pimeui, wParam, lParam);
1082
1083 case WM_IME_REQUEST:
1084 return 0;
1085
1086 case WM_IME_SELECT:
1088 return (LRESULT)pimeui;
1089
1090 case WM_IME_SETCONTEXT:
1091 return ImeWnd_OnImeSetContext(pimeui, wParam, lParam);
1092
1093 case WM_IME_SYSTEM:
1094 return ImeWnd_OnImeSystem(pimeui, wParam, lParam);
1095
1096 default:
1097 break;
1098 }
1099
1100Finish:
1101 if (unicode)
1102 return DefWindowProcW(hwnd, msg, wParam, lParam);
1103 return DefWindowProcA(hwnd, msg, wParam, lParam);
1104}
#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:1416
#define IS_IME_HKL(hKL)
Definition: imm32_undoc.h:21
#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_IME_SYSTEM
Definition: undocuser.h:60
#define WM_FINALDESTROY
Definition: undocuser.h:39
static VOID User32DestroyImeUIWindow(PIMEUI pimeui)
Definition: imm.c:375
LRESULT ImeWnd_OnImeSetContext(PIMEUI pimeui, WPARAM wParam, LPARAM lParam)
Definition: imm.c:796
static INT ImeWnd_OnCreate(PIMEUI pimeui, LPCREATESTRUCT lpCS)
Definition: imm.c:343
static LRESULT User32SendImeUIMessage(PIMEUI pimeui, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL unicode)
Definition: imm.c:170
static LRESULT ImeWnd_OnImeSystem(PIMEUI pimeui, WPARAM wParam, LPARAM lParam)
Definition: imm.c:640
static LRESULT ImeWnd_OnImeControl(PIMEUI pimeui, WPARAM wParam, LPARAM lParam, BOOL unicode)
Definition: imm.c:427
static VOID ImeWnd_OnImeSelect(PIMEUI pimeui, WPARAM wParam, LPARAM lParam)
Definition: imm.c:391
static LRESULT ImeWnd_OnImeNotify(PIMEUI pimeui, WPARAM wParam, LPARAM lParam)
Definition: imm.c:246
#define IMM_FN(name)
Definition: user32p.h:56
int ret
#define ValidateHwnd(hwnd)
Definition: precomp.h:110
_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:4848
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:5374
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 1107 of file imm.c.

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

Referenced by RegisterClientPFN().

◆ ImeWndProcW()

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

Definition at line 1113 of file imm.c.

1114{
1116}

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
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:3245
HBRUSH hbrBackground
Definition: winuser.h:3243
WNDPROC lpfnWndProc
Definition: winuser.h:3237
UINT cbSize
Definition: winuser.h:3235
int cbWndExtra
Definition: winuser.h:3239
HINSTANCE hInstance
Definition: winuser.h:3240
UINT style
Definition: winuser.h:3236
int cbClsExtra
Definition: winuser.h:3238
#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
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
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 1144 of file imm.c.

1145{
1146 ATOM atom;
1147 WNDCLASSEXW WndClass = { sizeof(WndClass) };
1148
1149 WndClass.lpszClassName = L"IME";
1150 WndClass.style = CS_GLOBALCLASS;
1151 WndClass.lpfnWndProc = ImeWndProcW;
1152 WndClass.cbWndExtra = sizeof(LONG_PTR);
1153 WndClass.hCursor = LoadCursorW(NULL, IDC_ARROW);
1154
1155 atom = RegisterClassExWOWW(&WndClass, 0, FNID_IME, 0, FALSE);
1156 if (!atom)
1157 {
1158 ERR("Failed to register IME Class!\n");
1159 return FALSE;
1160 }
1161
1163 TRACE("RegisterIMEClass atom = %u\n", atom);
1164 return TRUE;
1165}
#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:1113
#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
WORD fnid
Definition: regcontrol.c:49
WORD ClsId
Definition: regcontrol.c:50
static const struct @5307 g_SysClasses[]
BOOL WINAPI RegisterIMEClass(VOID)
Definition: imm.c:1144
#define ZeroMemory
Definition: winbase.h:1744

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 5521 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.