mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
[USER32]: Fix formatting in User32CreateWindowEx, no code changes.
svn path=/trunk/; revision=74017
This commit is contained in:
parent
b6a16efc88
commit
0366c75f60
1 changed files with 52 additions and 51 deletions
|
@ -172,7 +172,7 @@ User32CreateWindowEx(DWORD dwExStyle,
|
||||||
WNDCLASSEXA wceA;
|
WNDCLASSEXA wceA;
|
||||||
WNDCLASSEXW wceW;
|
WNDCLASSEXW wceW;
|
||||||
HMODULE hLibModule = NULL;
|
HMODULE hLibModule = NULL;
|
||||||
DWORD save_error;
|
DWORD dwLastError;
|
||||||
BOOL Unicode, ClassFound = FALSE;
|
BOOL Unicode, ClassFound = FALSE;
|
||||||
HWND Handle = NULL;
|
HWND Handle = NULL;
|
||||||
LPCWSTR lpszClsVersion;
|
LPCWSTR lpszClsVersion;
|
||||||
|
@ -197,14 +197,16 @@ User32CreateWindowEx(DWORD dwExStyle,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(Unicode)
|
if (Unicode)
|
||||||
|
{
|
||||||
RtlInitUnicodeString(&ClassName, (PCWSTR)lpClassName);
|
RtlInitUnicodeString(&ClassName, (PCWSTR)lpClassName);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!RtlCreateUnicodeStringFromAsciiz(&ClassName, (PCSZ)lpClassName))
|
if (!RtlCreateUnicodeStringFromAsciiz(&ClassName, (PCSZ)lpClassName))
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_OUTOFMEMORY);
|
SetLastError(ERROR_OUTOFMEMORY);
|
||||||
return (HWND)0;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,20 +249,20 @@ User32CreateWindowEx(DWORD dwExStyle,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!hMenu && (dwStyle & (WS_OVERLAPPEDWINDOW | WS_POPUP)))
|
if (!hMenu && (dwStyle & (WS_OVERLAPPEDWINDOW | WS_POPUP)))
|
||||||
{
|
{
|
||||||
if(Unicode)
|
if (Unicode)
|
||||||
{
|
{
|
||||||
wceW.cbSize = sizeof(WNDCLASSEXW);
|
wceW.cbSize = sizeof(wceW);
|
||||||
if(GetClassInfoExW(hInstance, (LPCWSTR)lpClassName, &wceW) && wceW.lpszMenuName)
|
if (GetClassInfoExW(hInstance, (LPCWSTR)lpClassName, &wceW) && wceW.lpszMenuName)
|
||||||
{
|
{
|
||||||
hMenu = LoadMenuW(hInstance, wceW.lpszMenuName);
|
hMenu = LoadMenuW(hInstance, wceW.lpszMenuName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wceA.cbSize = sizeof(WNDCLASSEXA);
|
wceA.cbSize = sizeof(wceA);
|
||||||
if(GetClassInfoExA(hInstance, lpClassName, &wceA) && wceA.lpszMenuName)
|
if (GetClassInfoExA(hInstance, lpClassName, &wceA) && wceA.lpszMenuName)
|
||||||
{
|
{
|
||||||
hMenu = LoadMenuA(hInstance, wceA.lpszMenuName);
|
hMenu = LoadMenuA(hInstance, wceA.lpszMenuName);
|
||||||
}
|
}
|
||||||
|
@ -283,7 +285,7 @@ User32CreateWindowEx(DWORD dwExStyle,
|
||||||
plstrClassVersion = &lstrClassVersion;
|
plstrClassVersion = &lstrClassVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
Handle = NtUserCreateWindowEx(dwExStyle,
|
Handle = NtUserCreateWindowEx(dwExStyle,
|
||||||
plstrClassName,
|
plstrClassName,
|
||||||
|
@ -304,8 +306,8 @@ User32CreateWindowEx(DWORD dwExStyle,
|
||||||
if (!lpLibFileName) break;
|
if (!lpLibFileName) break;
|
||||||
if (!ClassFound)
|
if (!ClassFound)
|
||||||
{
|
{
|
||||||
save_error = GetLastError();
|
dwLastError = GetLastError();
|
||||||
if ( save_error == ERROR_CANNOT_FIND_WND_CLASS )
|
if (dwLastError == ERROR_CANNOT_FIND_WND_CLASS)
|
||||||
{
|
{
|
||||||
ClassFound = VersionRegisterClass(ClassName.Buffer, lpLibFileName, pCtx, &hLibModule);
|
ClassFound = VersionRegisterClass(ClassName.Buffer, lpLibFileName, pCtx, &hLibModule);
|
||||||
if (ClassFound) continue;
|
if (ClassFound) continue;
|
||||||
|
@ -313,10 +315,10 @@ User32CreateWindowEx(DWORD dwExStyle,
|
||||||
}
|
}
|
||||||
if (hLibModule)
|
if (hLibModule)
|
||||||
{
|
{
|
||||||
save_error = GetLastError();
|
dwLastError = GetLastError();
|
||||||
FreeLibrary(hLibModule);
|
FreeLibrary(hLibModule);
|
||||||
SetLastError(save_error);
|
SetLastError(dwLastError);
|
||||||
hLibModule = 0;
|
hLibModule = NULL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -324,13 +326,12 @@ User32CreateWindowEx(DWORD dwExStyle,
|
||||||
#if 0
|
#if 0
|
||||||
DbgPrint("[window] NtUserCreateWindowEx() == %d\n", Handle);
|
DbgPrint("[window] NtUserCreateWindowEx() == %d\n", Handle);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if(!Unicode)
|
if (!Unicode)
|
||||||
{
|
{
|
||||||
if (!IS_ATOM(lpClassName))
|
if (!IS_ATOM(lpClassName))
|
||||||
{
|
|
||||||
RtlFreeUnicodeString(&ClassName);
|
RtlFreeUnicodeString(&ClassName);
|
||||||
}
|
|
||||||
|
|
||||||
RtlFreeLargeString(&WindowName);
|
RtlFreeLargeString(&WindowName);
|
||||||
}
|
}
|
||||||
|
@ -573,8 +574,8 @@ CreateWindowExW(DWORD dwExStyle,
|
||||||
}
|
}
|
||||||
|
|
||||||
hwnd = User32CreateWindowEx(dwExStyle,
|
hwnd = User32CreateWindowEx(dwExStyle,
|
||||||
(LPCSTR) lpClassName,
|
(LPCSTR)lpClassName,
|
||||||
(LPCSTR) lpWindowName,
|
(LPCSTR)lpWindowName,
|
||||||
dwStyle,
|
dwStyle,
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
|
|
Loading…
Reference in a new issue