DbgPrint("[window] User32CreateWindowEx style %d, exstyle %d, parent %d\n", dwStyle, dwExStyle, hWndParent);
#endif
+ if (!RegisterDefaultClasses)
+ {
+ ERR("User32CreateWindowEx RegisterSystemControls\n");
+ RegisterSystemControls();
+ }
+
if (IS_ATOM(lpClassName))
{
RtlInitUnicodeString(&ClassName, NULL);
MDICREATESTRUCTA mdi;
HWND hwnd;
+ if (!RegisterDefaultClasses)
+ {
+ ERR("CreateWindowExA RegisterSystemControls\n");
+ RegisterSystemControls();
+ }
+
if (dwExStyle & WS_EX_MDICHILD)
{
POINT mPos[2];
MDICREATESTRUCTW mdi;
HWND hwnd;
+ if (!RegisterDefaultClasses)
+ {
+ ERR("CreateWindowExW RegisterSystemControls\n");
+ RegisterSystemControls();
+ }
+
if (dwExStyle & WS_EX_MDICHILD)
{
POINT mPos[2];
LPSTR lpszFileName,
UINT cchFileNameMax)
{
- HINSTANCE hWndInst;
+ PWND Wnd = ValidateHwnd(hwnd);
- if(!(hWndInst = NtUserGetWindowInstance(hwnd)))
- {
+ if (!Wnd)
return 0;
- }
- return GetModuleFileNameA(hWndInst, lpszFileName, cchFileNameMax);
+ return GetModuleFileNameA(Wnd->hModule, lpszFileName, cchFileNameMax);
}
LPWSTR lpszFileName,
UINT cchFileNameMax)
{
- HINSTANCE hWndInst;
+ PWND Wnd = ValidateHwnd(hwnd);
- if(!(hWndInst = NtUserGetWindowInstance(hwnd)))
- {
+ if (!Wnd)
return 0;
- }
- return GetModuleFileNameW(hWndInst, lpszFileName, cchFileNameMax);
+ return GetModuleFileNameW( Wnd->hModule, lpszFileName, cchFileNameMax );
}
return (HWND)NtUserGetThreadState(THREADSTATE_FOCUSWINDOW);
}
+DWORD WINAPI
+GetRealWindowOwner(HWND hwnd)
+{
+ return NtUserQueryWindow(hwnd, QUERY_WINDOW_REAL_ID);
+}
+
/*
* @implemented
*/