ReactOS  0.4.15-dev-5462-g4d0d22a
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  ,
UINT  ,
WPARAM  ,
LPARAM  ,
BOOL   
)

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:
990  case WM_IME_SETCONTEXT:
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:
1039  User32DestroyImeUIWindow(pimeui);
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:
1070  ImeWnd_OnImeSelect(pimeui, wParam, lParam);
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 
1083 Finish:
1084  if (unicode)
1085  return DefWindowProcW(hwnd, msg, wParam, lParam);
1086  return DefWindowProcA(hwnd, msg, wParam, lParam);
1087 }
#define WM_IME_NOTIFY
Definition: winuser.h:1820
#define WM_IME_CHAR
Definition: winuser.h:1824
static LRESULT ImeWnd_OnImeNotify(PIMEUI pimeui, WPARAM wParam, LPARAM lParam)
Definition: imm.c:246
#define TRUE
Definition: types.h:120
HKL hKL
Definition: ntuser.h:1240
#define WM_IME_SELECT
Definition: winuser.h:1823
PWND spwnd
Definition: ntuser.h:1237
static LRESULT User32SendImeUIMessage(PIMEUI pimeui, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL unicode)
Definition: imm.c:170
LONG nCntInIMEProc
Definition: ntuser.h:1242
#define GetWindowLongPtrW
Definition: winuser.h:4819
#define FNID_DESTROY
Definition: ntuser.h:893
BOOL WINAPI DestroyWindow(_In_ HWND)
#define WM_IME_COMPOSITIONFULL
Definition: winuser.h:1822
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI CtfImmDispatchDefImeMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: ctf.c:101
DWORD fnid
Definition: ntuser.h:704
static VOID User32DestroyImeUIWindow(PIMEUI pimeui)
Definition: imm.c:375
LRESULT ImeWnd_OnImeSetContext(PIMEUI pimeui, WPARAM wParam, LPARAM lParam)
Definition: imm.c:779
#define WM_IME_REQUEST
Definition: winuser.h:1826
#define WM_IME_SYSTEM
Definition: undocuser.h:60
#define WM_DESTROY
Definition: winuser.h:1599
#define GetProcessHeap()
Definition: compat.h:736
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define WM_IME_SETCONTEXT
Definition: winuser.h:1819
static LRESULT ImeWnd_OnImeSystem(PIMEUI pimeui, WPARAM wParam, LPARAM lParam)
Definition: imm.c:623
#define WM_IME_CONTROL
Definition: winuser.h:1821
#define WM_NCDESTROY
Definition: winuser.h:1674
#define IS_CICERO_MODE()
Definition: ntuser.h:1233
static INT ImeWnd_OnCreate(PIMEUI pimeui, LPCREATESTRUCT lpCS)
Definition: imm.c:343
#define WM_PAINT
Definition: winuser.h:1610
int ret
#define IMN_PRIVATE
Definition: imm.h:534
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_FINALDESTROY
Definition: undocuser.h:39
#define ERR(fmt,...)
Definition: debug.h:110
Definition: ntuser.h:688
#define IS_IME_HKL(hKL)
Definition: input.h:88
DWORD state
Definition: ntuser.h:696
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define NULL
Definition: types.h:112
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
static VOID ImeWnd_OnImeSelect(PIMEUI pimeui, WPARAM wParam, LPARAM lParam)
Definition: imm.c:391
#define msg(x)
Definition: auth_time.c:54
#define WM_CREATE
Definition: winuser.h:1598
DWORD state2
Definition: ntuser.h:697
BOOL NTAPI NtUserSetWindowFNID(HWND hWnd, WORD fnID)
Definition: window.c:4336
#define SetWindowLongPtrW
Definition: winuser.h:5336
#define WM_ERASEBKGND
Definition: winuser.h:1615
struct tagIMEUI * PIMEUI
LONG_PTR LRESULT
Definition: windef.h:209
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
#define WNDS_DESTROYED
Definition: ntuser.h:631
LPARAM lParam
Definition: combotst.c:139
#define HeapFree(x, y, z)
Definition: compat.h:735
#define WNDS2_INDESTROY
Definition: ntuser.h:643
#define FNID_IME
Definition: ntuser.h:869
static LRESULT ImeWnd_OnImeControl(PIMEUI pimeui, WPARAM wParam, LPARAM lParam, BOOL unicode)
Definition: imm.c:427
#define ValidateHwnd(hwnd)
Definition: precomp.h:85
#define IMM_FN(name)
Definition: user32p.h:56

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

◆ ImeWndProcA()

LRESULT WINAPI ImeWndProcA ( HWND  ,
UINT  ,
WPARAM  ,
LPARAM   
)

Definition at line 1090 of file imm.c.

1091 {
1093 }
LRESULT WINAPI ImeWndProc_common(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode)
Definition: imm.c:935
WPARAM wParam
Definition: combotst.c:138
#define FALSE
Definition: types.h:117
#define msg(x)
Definition: auth_time.c:54
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
LPARAM lParam
Definition: combotst.c:139

Referenced by RegisterClientPFN().

◆ ImeWndProcW()

LRESULT WINAPI ImeWndProcW ( HWND  ,
UINT  ,
WPARAM  ,
LPARAM   
)

Definition at line 1096 of file imm.c.

1097 {
1099 }
#define TRUE
Definition: types.h:120
LRESULT WINAPI ImeWndProc_common(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode)
Definition: imm.c:935
WPARAM wParam
Definition: combotst.c:138
#define msg(x)
Definition: auth_time.c:54
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
LPARAM lParam
Definition: combotst.c:139

Referenced by RegisterClientPFN(), and RegisterIMEClass().

◆ RegisterClassExWOWW()

ATOM WINAPI RegisterClassExWOWW ( WNDCLASSEXW ,
LPDWORD  ,
WORD  ,
DWORD  ,
BOOL   
)

Definition at line 1413 of file class.c.

1418 {
1419  ATOM Atom;
1421  UNICODE_STRING ClassName;
1422  UNICODE_STRING ClassVersion;
1423  UNICODE_STRING MenuName = {0};
1424  CLSMENUNAME clsMenuName;
1425  ANSI_STRING AnsiMenuName;
1426  LPCWSTR lpszClsVersion;
1427 
1428  if (lpwcx == NULL || lpwcx->cbSize != sizeof(WNDCLASSEXW) ||
1429  lpwcx->cbClsExtra < 0 || lpwcx->cbWndExtra < 0 ||
1430  lpwcx->lpszClassName == NULL)
1431  {
1432  TRACE("RegisterClassExWOWW Invalid Parameter Error!\n");
1434  return 0;
1435  }
1436 
1437  if (ChkRegCls)
1438  {
1440  }
1441  /*
1442  * On real Windows this looks more like:
1443  * if (lpwcx->hInstance == User32Instance &&
1444  * *(PULONG)((ULONG_PTR)NtCurrentTeb() + 0x6D4) & 0x400)
1445  * But since I have no idea what the magic field in the
1446  * TEB structure means, I rather decided to omit that.
1447  * -- Filip Navara
1448 
1449  GetWin32ClientInfo()->dwExpWinVer & (WINVER == 0x400)
1450  */
1451  if (lpwcx->hInstance == User32Instance)
1452  {
1453  TRACE("RegisterClassExWOWW User32Instance!\n");
1455  return 0;
1456  }
1457  /* Yes, this is correct. We should modify the passed structure. */
1458  if (lpwcx->hInstance == NULL)
1459  ((WNDCLASSEXW*)lpwcx)->hInstance = GetModuleHandleW(NULL);
1460 
1461  RtlCopyMemory(&WndClass, lpwcx, sizeof(WNDCLASSEXW));
1462 /*
1463  if (NULL == WndClass.hIconSm)
1464  {
1465  WndClass.hIconSm = CreateSmallIcon(WndClass.hIcon);
1466  }
1467 */
1468  RtlInitEmptyAnsiString(&AnsiMenuName, NULL, 0);
1469  if (WndClass.lpszMenuName != NULL)
1470  {
1471  if (!IS_INTRESOURCE(WndClass.lpszMenuName))
1472  {
1473  if (WndClass.lpszMenuName[0])
1474  {
1475  RtlInitUnicodeString(&MenuName, WndClass.lpszMenuName);
1476  RtlUnicodeStringToAnsiString( &AnsiMenuName, &MenuName, TRUE);
1477  }
1478  }
1479  else
1480  {
1481  MenuName.Buffer = (LPWSTR)WndClass.lpszMenuName;
1482  AnsiMenuName.Buffer = (PCHAR)WndClass.lpszMenuName;
1483  }
1484  }
1485 
1486  if (IS_ATOM(WndClass.lpszClassName))
1487  {
1488  ClassName.Length =
1489  ClassName.MaximumLength = 0;
1490  ClassName.Buffer = (LPWSTR)WndClass.lpszClassName;
1491  }
1492  else
1493  {
1494  RtlInitUnicodeString(&ClassName, WndClass.lpszClassName);
1495  }
1496 
1497  ClassVersion = ClassName;
1498  if (fnID == 0)
1499  {
1500  lpszClsVersion = ClassNameToVersion(lpwcx->lpszClassName, NULL, NULL, NULL, FALSE);
1501  if (lpszClsVersion)
1502  {
1503  RtlInitUnicodeString(&ClassVersion, lpszClsVersion);
1504  }
1505  }
1506 
1507  clsMenuName.pszClientAnsiMenuName = AnsiMenuName.Buffer;
1508  clsMenuName.pwszClientUnicodeMenuName = MenuName.Buffer;
1509  clsMenuName.pusMenuName = &MenuName;
1510 
1512  &ClassName,
1513  &ClassVersion,
1514  &clsMenuName,
1515  fnID,
1516  dwFlags,
1517  pdwWowData);
1518 
1519  TRACE("atom=%04x wndproc=%p hinst=%p bg=%p style=%08x clsExt=%d winExt=%d class=%p\n",
1520  Atom, lpwcx->lpfnWndProc, lpwcx->hInstance, lpwcx->hbrBackground,
1521  lpwcx->style, lpwcx->cbClsExtra, lpwcx->cbWndExtra, WndClass);
1522 
1523  return Atom;
1524 }
signed char * PCHAR
Definition: retypes.h:7
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
USHORT MaximumLength
Definition: env_spec_w32.h:370
LPSTR pszClientAnsiMenuName
Definition: ntuser.h:493
WORD ATOM
Definition: dimm.idl:113
#define TRUE
Definition: types.h:120
LPWSTR pwszClientUnicodeMenuName
Definition: ntuser.h:494
HINSTANCE User32Instance
Definition: dllmain.c:27
#define FALSE
Definition: types.h:117
LPCWSTR FASTCALL ClassNameToVersion(const void *lpszClass, LPCWSTR lpszMenuName, LPCWSTR *plpLibFileName, HANDLE *pContext, BOOL bAnsi)
Definition: class.c:85
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
#define TRACE(s)
Definition: solgame.cpp:4
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
#define SetLastError(x)
Definition: compat.h:752
_Out_ RTL_ATOM * Atom
Definition: class.h:54
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
PUNICODE_STRING pusMenuName
Definition: ntuser.h:495
RTL_ATOM APIENTRY NtUserRegisterClassExWOW(WNDCLASSEXW *lpwcx, PUNICODE_STRING ClassName, PUNICODE_STRING ClsVersion, PCLSMENUNAME pClassMenuName, DWORD fnID, DWORD Flags, LPDWORD pWow)
Definition: class.c:2413
#define IS_ATOM(x)
Definition: class.h:3
#define NULL
Definition: types.h:112
BOOL WINAPI RegisterSystemControls(VOID)
Definition: regcontrol.c:70
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
DWORD RegisterDefaultClasses
Definition: regcontrol.c:13
WCHAR * LPWSTR
Definition: xmlstorage.h:184
WCHAR WndClass[]
Definition: capicon.c:23

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 LONG_PTR
Definition: treelist.c:79
WORD ATOM
Definition: dimm.idl:113
#define TRUE
Definition: types.h:120
LRESULT WINAPI ImeWndProcW(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: imm.c:1096
ATOM WINAPI RegisterClassExWOWW(WNDCLASSEXW *, LPDWORD, WORD, DWORD, BOOL)
Definition: class.c:1413
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
#define TRACE(s)
Definition: solgame.cpp:4
#define CS_GLOBALCLASS
Definition: winuser.h:647
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
#define ICLS_IME
Definition: ntuser.h:922
#define ERR(fmt,...)
Definition: debug.h:110
#define NULL
Definition: types.h:112
#define IDC_ARROW
Definition: winuser.h:682
#define ICLASS_TO_MASK(iCls)
Definition: ntuser.h:897
DWORD RegisterDefaultClasses
Definition: regcontrol.c:13
WCHAR WndClass[]
Definition: capicon.c:23
#define FNID_IME
Definition: ntuser.h:869

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 }
WORD ClsId
Definition: regcontrol.c:50
WORD ATOM
Definition: dimm.idl:113
#define TRUE
Definition: types.h:120
#define ZeroMemory
Definition: winbase.h:1670
ATOM WINAPI RegisterClassExWOWW(WNDCLASSEXW *, LPDWORD, WORD, DWORD, BOOL)
Definition: class.c:1413
WORD fnid
Definition: regcontrol.c:49
#define FALSE
Definition: types.h:117
const struct builtin_class_descr * desc
Definition: regcontrol.c:48
#define CS_GLOBALCLASS
Definition: winuser.h:647
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
#define ICLS_IME
Definition: ntuser.h:922
BOOL WINAPI RegisterIMEClass(VOID)
Definition: imm.c:1127
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
#define NULL
Definition: types.h:112
static const struct @4919 g_SysClasses[]
#define ICLASS_TO_MASK(iCls)
Definition: ntuser.h:897
DWORD RegisterDefaultClasses
Definition: regcontrol.c:13
WCHAR WndClass[]
Definition: capicon.c:23

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

◆ VersionRegisterClass()

BOOL FASTCALL VersionRegisterClass ( PCWSTR  ,
LPCWSTR  ,
HANDLE  ,
HMODULE  
)

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 
211 
212  _SEH2_TRY
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  }
241  _SEH2_END
242 
243 Error_Exit:
244  if (Ret || !hLibModule)
245  {
246  if (phLibModule) *phLibModule = hLibModule;
247  }
248  else
249  {
250  DWORD dwLastError = GetLastError();
252  SetLastError(dwLastError);
253  }
254 
256  return Ret;
257 }
_SEH2_TRY
Definition: create.c:4226
HINSTANCE hLibModule
Definition: sfc.c:23
#define WARN(fmt,...)
Definition: debug.h:112
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
_SEH2_END
Definition: create.c:4400
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define LoadLibraryW(x)
Definition: compat.h:747
#define FreeLibrary(x)
Definition: compat.h:748
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define MAX_PATH
Definition: compat.h:34
unsigned long DWORD
Definition: ntddk_ex.h:95
PRTL_ACTIVATION_CONTEXT_STACK_FRAME FASTCALL RtlDeactivateActivationContextUnsafeFast(IN PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame)
Definition: actctx.c:6011
#define SetLastError(x)
Definition: compat.h:752
uint32_t DWORD_PTR
Definition: typedefs.h:65
#define ERR(fmt,...)
Definition: debug.h:110
#define IS_ATOM(x)
Definition: class.h:3
#define NULL
Definition: types.h:112
PRTL_ACTIVATION_CONTEXT_STACK_FRAME FASTCALL RtlActivateActivationContextUnsafeFast(IN PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame, IN PVOID Context)
Definition: actctx.c:5934
#define GetProcAddress(x, y)
Definition: compat.h:753
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:40
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:168
#define LOWORD(l)
Definition: pedump.c:82

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

Variable Documentation

◆ BUTTON_builtin_class

const struct builtin_class_descr BUTTON_builtin_class

Definition at line 142 of file button.c.

◆ COMBO_builtin_class

const struct builtin_class_descr COMBO_builtin_class

Definition at line 67 of file combo.c.

◆ COMBOLBOX_builtin_class

const struct builtin_class_descr COMBOLBOX_builtin_class

Definition at line 142 of file listbox.c.

◆ DESKTOP_builtin_class

const struct builtin_class_descr DESKTOP_builtin_class

◆ DIALOG_builtin_class

const struct builtin_class_descr DIALOG_builtin_class

Definition at line 109 of file dialog.c.

◆ EDIT_builtin_class

const struct builtin_class_descr EDIT_builtin_class

Definition at line 5388 of file edit.c.

◆ GHOST_builtin_class

const struct builtin_class_descr GHOST_builtin_class

Definition at line 17 of file ghost.c.

◆ ICONTITLE_builtin_class

const struct builtin_class_descr ICONTITLE_builtin_class

Definition at line 29 of file icontitle.c.

◆ LISTBOX_builtin_class

const struct builtin_class_descr LISTBOX_builtin_class

Definition at line 126 of file listbox.c.

◆ MDICLIENT_builtin_class

const struct builtin_class_descr MDICLIENT_builtin_class

Definition at line 213 of file mdi.c.

◆ MENU_builtin_class

const struct builtin_class_descr MENU_builtin_class

◆ POPUPMENU_builtin_class

const struct builtin_class_descr POPUPMENU_builtin_class

Definition at line 56 of file menu.c.

◆ RegisterDefaultClasses

◆ SCROLL_builtin_class

const struct builtin_class_descr SCROLL_builtin_class

Definition at line 76 of file scrollbar.c.

◆ STATIC_builtin_class

const struct builtin_class_descr STATIC_builtin_class

Definition at line 81 of file static.c.