ReactOS 0.4.15-dev-8339-g4028de8
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 935 of file imm.c.

936{
937 PWND pWnd;
938 PIMEUI pimeui;
939 LRESULT ret;
940
941 pWnd = ValidateHwnd(hwnd);
942 if (pWnd == NULL)
943 {
944 ERR("hwnd was %p\n", hwnd);
945 return 0;
946 }
947
948 if (!pWnd->fnid)
949 {
951 }
952 else if (pWnd->fnid != FNID_IME)
953 {
954 ERR("fnid was 0x%x\n", pWnd->fnid);
955 return 0;
956 }
957
958 pimeui = (PIMEUI)GetWindowLongPtrW(hwnd, 0);
959 if (pimeui == NULL)
960 {
961 pimeui = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IMEUI));
962 if (pimeui == NULL)
963 {
964 ERR("HeapAlloc failed\n");
967 return 0;
968 }
969
970 SetWindowLongPtrW(hwnd, 0, (LONG_PTR)pimeui);
971 pimeui->spwnd = pWnd;
972 }
973
974 if (IS_CICERO_MODE())
975 {
977 if (ret)
978 return ret;
979 }
980
981 if (pimeui->nCntInIMEProc > 0)
982 {
983 switch (msg)
984 {
985 case WM_IME_CHAR:
987 case WM_IME_CONTROL:
988 case WM_IME_REQUEST:
989 case WM_IME_SELECT:
991 case WM_IME_STARTCOMPOSITION:
992 case WM_IME_COMPOSITION:
993 case WM_IME_ENDCOMPOSITION:
994 return 0;
995
996 case WM_IME_NOTIFY:
997 if (wParam < IMN_PRIVATE || IS_IME_HKL(pimeui->hKL) || !IS_CICERO_MODE())
998 return 0;
999 break;
1000
1001 case WM_IME_SYSTEM:
1002 switch (wParam)
1003 {
1004 case 0x03:
1005 case 0x10:
1006 case 0x13:
1007 break;
1008
1009 default:
1010 return 0;
1011 }
1012 break;
1013
1014 default:
1015 goto Finish;
1016 }
1017 }
1018
1019 if ((pWnd->state2 & WNDS2_INDESTROY) || (pWnd->state & WNDS_DESTROYED))
1020 {
1021 switch (msg)
1022 {
1023 case WM_DESTROY:
1024 case WM_NCDESTROY:
1025 case WM_FINALDESTROY:
1026 break;
1027
1028 default:
1029 return 0;
1030 }
1031 }
1032
1033 switch (msg)
1034 {
1035 case WM_CREATE:
1036 return ImeWnd_OnCreate(pimeui, (LPCREATESTRUCT)lParam);
1037
1038 case WM_DESTROY:
1040 return 0;
1041
1042 case WM_NCDESTROY:
1043 case WM_FINALDESTROY:
1044 pimeui->spwnd = NULL;
1045 HeapFree(GetProcessHeap(), 0, pimeui);
1047 break;
1048
1049 case WM_ERASEBKGND:
1050 return TRUE;
1051
1052 case WM_PAINT:
1053 return 0;
1054
1055 case WM_IME_STARTCOMPOSITION:
1056 case WM_IME_COMPOSITION:
1057 case WM_IME_ENDCOMPOSITION:
1058 return User32SendImeUIMessage(pimeui, msg, wParam, lParam, unicode);
1059
1060 case WM_IME_CONTROL:
1061 return ImeWnd_OnImeControl(pimeui, wParam, lParam, unicode);
1062
1063 case WM_IME_NOTIFY:
1064 return ImeWnd_OnImeNotify(pimeui, wParam, lParam);
1065
1066 case WM_IME_REQUEST:
1067 return 0;
1068
1069 case WM_IME_SELECT:
1071 return (LRESULT)pimeui;
1072
1073 case WM_IME_SETCONTEXT:
1074 return ImeWnd_OnImeSetContext(pimeui, wParam, lParam);
1075
1076 case WM_IME_SYSTEM:
1077 return ImeWnd_OnImeSystem(pimeui, wParam, lParam);
1078
1079 default:
1080 break;
1081 }
1082
1083Finish:
1084 if (unicode)
1085 return DefWindowProcW(hwnd, msg, wParam, lParam);
1086 return DefWindowProcA(hwnd, msg, wParam, lParam);
1087}
#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
LRESULT WINAPI CtfImmDispatchDefImeMessage(_In_ HWND hWnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam)
Definition: ctf.c:1416
#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
#define ValidateHwnd(hwnd)
Definition: precomp.h:85
#define IS_IME_HKL(hKL)
Definition: imm32_undoc.h:20
#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:1210
#define WNDS2_INDESTROY
Definition: ntuser.h:648
BOOL NTAPI NtUserSetWindowFNID(HWND hWnd, WORD fnID)
Definition: window.c:4330
__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:1218
PWND spwnd
Definition: ntuser.h:1215
LONG nCntInIMEProc
Definition: ntuser.h:1220
#define WM_IME_SYSTEM
Definition: undocuser.h:60
#define WM_FINALDESTROY
Definition: undocuser.h:39
#define IMM_FN(name)
Definition: user32p.h:56
int ret
static VOID User32DestroyImeUIWindow(PIMEUI pimeui)
Definition: imm.c:375
LRESULT ImeWnd_OnImeSetContext(PIMEUI pimeui, WPARAM wParam, LPARAM lParam)
Definition: imm.c:779
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:623
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
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LRESULT
Definition: windef.h:209
#define WM_PAINT
Definition: winuser.h:1620
#define WM_ERASEBKGND
Definition: winuser.h:1625
#define WM_IME_REQUEST
Definition: winuser.h:1836
#define GetWindowLongPtrW
Definition: winuser.h:4829
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_IME_NOTIFY
Definition: winuser.h:1830
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_CREATE
Definition: winuser.h:1608
#define WM_IME_SETCONTEXT
Definition: winuser.h:1829
#define WM_IME_CHAR
Definition: winuser.h:1834
#define WM_IME_COMPOSITIONFULL
Definition: winuser.h:1832
#define WM_NCDESTROY
Definition: winuser.h:1684
#define WM_IME_CONTROL
Definition: winuser.h:1831
#define WM_IME_SELECT
Definition: winuser.h:1833
#define WM_DESTROY
Definition: winuser.h:1609
#define SetWindowLongPtrW
Definition: winuser.h:5355
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 1090 of file imm.c.

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

Referenced by RegisterClientPFN().

◆ ImeWndProcW()

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

Definition at line 1096 of file imm.c.

1097{
1099}

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:2424
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:3226
HBRUSH hbrBackground
Definition: winuser.h:3224
WNDPROC lpfnWndProc
Definition: winuser.h:3218
UINT cbSize
Definition: winuser.h:3216
int cbWndExtra
Definition: winuser.h:3220
HINSTANCE hInstance
Definition: winuser.h:3221
UINT style
Definition: winuser.h:3217
int cbClsExtra
Definition: winuser.h:3219
#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 1127 of file imm.c.

1128{
1129 ATOM atom;
1130 WNDCLASSEXW WndClass = { sizeof(WndClass) };
1131
1132 WndClass.lpszClassName = L"IME";
1133 WndClass.style = CS_GLOBALCLASS;
1134 WndClass.lpfnWndProc = ImeWndProcW;
1135 WndClass.cbWndExtra = sizeof(LONG_PTR);
1136 WndClass.hCursor = LoadCursorW(NULL, IDC_ARROW);
1137
1138 atom = RegisterClassExWOWW(&WndClass, 0, FNID_IME, 0, FALSE);
1139 if (!atom)
1140 {
1141 ERR("Failed to register IME Class!\n");
1142 return FALSE;
1143 }
1144
1146 TRACE("RegisterIMEClass atom = %u\n", atom);
1147 return TRUE;
1148}
#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:1096
#define IDC_ARROW
Definition: winuser.h:687
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2149
#define CS_GLOBALCLASS
Definition: winuser.h:652

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
static const struct @5149 g_SysClasses[]
const struct builtin_class_descr * desc
Definition: regcontrol.c:48
WORD fnid
Definition: regcontrol.c:49
WORD ClsId
Definition: regcontrol.c:50
BOOL WINAPI RegisterIMEClass(VOID)
Definition: imm.c:1127
#define ZeroMemory
Definition: winbase.h:1712

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
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define LOWORD(l)
Definition: pedump.c:82
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:66
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:168
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 5518 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.