Commit 172e731c authored by Alexandre Julliard's avatar Alexandre Julliard

Moved most files from the windows directory to dlls/user.

parent 3abb5bd6
...@@ -15,56 +15,56 @@ SPEC_SRCS16 = \ ...@@ -15,56 +15,56 @@ SPEC_SRCS16 = \
user.exe.spec user.exe.spec
C_SRCS = \ C_SRCS = \
$(TOPOBJDIR)/windows/class.c \
$(TOPOBJDIR)/windows/clipboard.c \
$(TOPOBJDIR)/windows/cursoricon.c \
$(TOPOBJDIR)/windows/defdlg.c \
$(TOPOBJDIR)/windows/defwnd.c \
$(TOPOBJDIR)/windows/dialog.c \
$(TOPOBJDIR)/windows/driver.c \ $(TOPOBJDIR)/windows/driver.c \
$(TOPOBJDIR)/windows/input.c \
$(TOPOBJDIR)/windows/mdi.c \
$(TOPOBJDIR)/windows/msgbox.c \
$(TOPOBJDIR)/windows/multimon.c \ $(TOPOBJDIR)/windows/multimon.c \
$(TOPOBJDIR)/windows/nonclient.c \
$(TOPOBJDIR)/windows/queue.c \ $(TOPOBJDIR)/windows/queue.c \
$(TOPOBJDIR)/windows/scroll.c \ $(TOPOBJDIR)/windows/scroll.c \
$(TOPOBJDIR)/windows/spy.c \
$(TOPOBJDIR)/windows/syscolor.c \ $(TOPOBJDIR)/windows/syscolor.c \
$(TOPOBJDIR)/windows/user.c \ $(TOPOBJDIR)/windows/user.c \
$(TOPOBJDIR)/windows/win.c \
$(TOPOBJDIR)/windows/winhelp.c \
$(TOPOBJDIR)/windows/winpos.c \
$(TOPOBJDIR)/windows/winproc.c \
button.c \ button.c \
caret.c \ caret.c \
class.c \
clipboard.c \
combo.c \ combo.c \
cursoricon.c \
dde/client.c \ dde/client.c \
dde/ddeml16.c \ dde/ddeml16.c \
dde/misc.c \ dde/misc.c \
dde/server.c \ dde/server.c \
defdlg.c \
defwnd.c \
desktop.c \ desktop.c \
dialog.c \
dialog16.c \ dialog16.c \
edit.c \ edit.c \
exticon.c \ exticon.c \
focus.c \ focus.c \
hook.c \ hook.c \
icontitle.c \ icontitle.c \
input.c \
listbox.c \ listbox.c \
lstr.c \ lstr.c \
mdi.c \
menu.c \ menu.c \
message.c \ message.c \
misc.c \ misc.c \
msg16.c \ msg16.c \
msgbox.c \
nonclient.c \
painting.c \ painting.c \
property.c \ property.c \
resource.c \ resource.c \
scroll.c \ scroll.c \
spy.c \
static.c \ static.c \
sysparams.c \ sysparams.c \
text.c \ text.c \
uitools.c \ uitools.c \
user_main.c \ user_main.c \
win.c \
winhelp.c \
winpos.c \
winproc.c \
wsprintf.c wsprintf.c
C_SRCS16 = \ C_SRCS16 = \
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(clipboard); WINE_DEFAULT_DEBUG_CHANNEL(clipboard);
#define CF_REGFORMATBASE 0xC000 #define CF_REGFORMATBASE 0xC000
typedef struct typedef struct
{ {
...@@ -322,20 +322,20 @@ BOOL WINAPI CloseClipboard(void) ...@@ -322,20 +322,20 @@ BOOL WINAPI CloseClipboard(void)
if (CLIPBOARD_CloseClipboard()) if (CLIPBOARD_CloseClipboard())
{ {
if (bCBHasChanged) if (bCBHasChanged)
{ {
HWND hWndViewer = GetClipboardViewer(); HWND hWndViewer = GetClipboardViewer();
if (USER_Driver.pEndClipboardUpdate) if (USER_Driver.pEndClipboardUpdate)
USER_Driver.pEndClipboardUpdate(); USER_Driver.pEndClipboardUpdate();
if (hWndViewer) if (hWndViewer)
SendMessageW(hWndViewer, WM_DRAWCLIPBOARD, 0, 0); SendMessageW(hWndViewer, WM_DRAWCLIPBOARD, 0, 0);
bCBHasChanged = FALSE; bCBHasChanged = FALSE;
} }
bRet = TRUE; bRet = TRUE;
} }
return bRet; return bRet;
...@@ -349,19 +349,19 @@ BOOL WINAPI CloseClipboard(void) ...@@ -349,19 +349,19 @@ BOOL WINAPI CloseClipboard(void)
BOOL WINAPI EmptyClipboard(void) BOOL WINAPI EmptyClipboard(void)
{ {
CLIPBOARDINFO cbinfo; CLIPBOARDINFO cbinfo;
TRACE("()\n"); TRACE("()\n");
if (!CLIPBOARD_GetClipboardInfo(&cbinfo) || if (!CLIPBOARD_GetClipboardInfo(&cbinfo) ||
~cbinfo.flags & CB_OPEN) ~cbinfo.flags & CB_OPEN)
{ {
WARN("Clipboard not opened by calling task!\n"); WARN("Clipboard not opened by calling task!\n");
SetLastError(ERROR_CLIPBOARD_NOT_OPEN); SetLastError(ERROR_CLIPBOARD_NOT_OPEN);
return FALSE; return FALSE;
} }
/* Destroy private objects */ /* Destroy private objects */
if (cbinfo.hWndOwner) if (cbinfo.hWndOwner)
SendMessageW(cbinfo.hWndOwner, WM_DESTROYCLIPBOARD, 0, 0); SendMessageW(cbinfo.hWndOwner, WM_DESTROYCLIPBOARD, 0, 0);
/* Tell the driver to acquire the selection. The current owner /* Tell the driver to acquire the selection. The current owner
...@@ -369,22 +369,22 @@ BOOL WINAPI EmptyClipboard(void) ...@@ -369,22 +369,22 @@ BOOL WINAPI EmptyClipboard(void)
/* Assign ownership of the clipboard to the current client. We do /* Assign ownership of the clipboard to the current client. We do
* this before acquiring the selection so that when we do acquire the * this before acquiring the selection so that when we do acquire the
* selection and the selection loser gets notified, it can check if * selection and the selection loser gets notified, it can check if
* it has lost the Wine clipboard ownership. If it did then it knows * it has lost the Wine clipboard ownership. If it did then it knows
* that a WM_DESTORYCLIPBOARD has already been sent. Otherwise it * that a WM_DESTORYCLIPBOARD has already been sent. Otherwise it
* lost the selection to a X app and it should send the * lost the selection to a X app and it should send the
* WM_DESTROYCLIPBOARD itself. */ * WM_DESTROYCLIPBOARD itself. */
CLIPBOARD_SetClipboardOwner(cbinfo.hWndOpen); CLIPBOARD_SetClipboardOwner(cbinfo.hWndOpen);
/* Acquire the selection. This will notify the previous owner /* Acquire the selection. This will notify the previous owner
* to clear it's cache. */ * to clear it's cache. */
if (USER_Driver.pAcquireClipboard) if (USER_Driver.pAcquireClipboard)
USER_Driver.pAcquireClipboard(cbinfo.hWndOpen); USER_Driver.pAcquireClipboard(cbinfo.hWndOpen);
/* Empty the local cache */ /* Empty the local cache */
if (USER_Driver.pEmptyClipboard) if (USER_Driver.pEmptyClipboard)
USER_Driver.pEmptyClipboard(FALSE); USER_Driver.pEmptyClipboard(FALSE);
bCBHasChanged = TRUE; bCBHasChanged = TRUE;
return TRUE; return TRUE;
...@@ -438,31 +438,31 @@ HWND WINAPI GetOpenClipboardWindow(void) ...@@ -438,31 +438,31 @@ HWND WINAPI GetOpenClipboardWindow(void)
HWND WINAPI SetClipboardViewer( HWND hWnd ) HWND WINAPI SetClipboardViewer( HWND hWnd )
{ {
HWND hwndPrev = 0; HWND hwndPrev = 0;
SERVER_START_REQ( set_clipboard_info ) SERVER_START_REQ( set_clipboard_info )
{ {
req->flags = SET_CB_VIEWER; req->flags = SET_CB_VIEWER;
req->viewer = WIN_GetFullHandle(hWnd); req->viewer = WIN_GetFullHandle(hWnd);
if (wine_server_call_err( req )) if (wine_server_call_err( req ))
{ {
ERR("Failed to set clipboard.\n"); ERR("Failed to set clipboard.\n");
} }
else else
{ {
hwndPrev = reply->old_viewer; hwndPrev = reply->old_viewer;
} }
} }
SERVER_END_REQ; SERVER_END_REQ;
TRACE("(%p): returning %p\n", hWnd, hwndPrev); TRACE("(%p): returning %p\n", hWnd, hwndPrev);
return hwndPrev; return hwndPrev;
} }
/************************************************************************** /**************************************************************************
* GetClipboardViewer (USER32.@) * GetClipboardViewer (USER32.@)
*/ */
HWND WINAPI GetClipboardViewer(void) HWND WINAPI GetClipboardViewer(void)
{ {
...@@ -482,7 +482,7 @@ HWND WINAPI GetClipboardViewer(void) ...@@ -482,7 +482,7 @@ HWND WINAPI GetClipboardViewer(void)
/************************************************************************** /**************************************************************************
* ChangeClipboardChain (USER32.@) * ChangeClipboardChain (USER32.@)
*/ */
BOOL WINAPI ChangeClipboardChain(HWND hWnd, HWND hWndNext) BOOL WINAPI ChangeClipboardChain(HWND hWnd, HWND hWndNext)
{ {
...@@ -491,13 +491,13 @@ BOOL WINAPI ChangeClipboardChain(HWND hWnd, HWND hWndNext) ...@@ -491,13 +491,13 @@ BOOL WINAPI ChangeClipboardChain(HWND hWnd, HWND hWndNext)
if (hWndViewer) if (hWndViewer)
{ {
if (WIN_GetFullHandle(hWnd) == hWndViewer) if (WIN_GetFullHandle(hWnd) == hWndViewer)
SetClipboardViewer(WIN_GetFullHandle(hWndNext)); SetClipboardViewer(WIN_GetFullHandle(hWndNext));
else else
bRet = !SendMessageW(hWndViewer, WM_CHANGECBCHAIN, (WPARAM)hWnd, (LPARAM)hWndNext); bRet = !SendMessageW(hWndViewer, WM_CHANGECBCHAIN, (WPARAM)hWnd, (LPARAM)hWndNext);
} }
else else
ERR("hWndViewer is lost\n"); ERR("hWndViewer is lost\n");
return bRet; return bRet;
} }
......
...@@ -236,7 +236,7 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam, ...@@ -236,7 +236,7 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
} }
return 1; return 1;
} }
case WM_NCDESTROY: case WM_NCDESTROY:
if ((dlgInfo = (DIALOGINFO *)SetWindowLongPtrW( hwnd, DWLP_WINE_DIALOGINFO, 0 ))) if ((dlgInfo = (DIALOGINFO *)SetWindowLongPtrW( hwnd, DWLP_WINE_DIALOGINFO, 0 )))
{ {
/* Free dialog heap (if created) */ /* Free dialog heap (if created) */
...@@ -249,21 +249,21 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam, ...@@ -249,21 +249,21 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
if (dlgInfo->hMenu) DestroyMenu( dlgInfo->hMenu ); if (dlgInfo->hMenu) DestroyMenu( dlgInfo->hMenu );
HeapFree( GetProcessHeap(), 0, dlgInfo ); HeapFree( GetProcessHeap(), 0, dlgInfo );
} }
/* Window clean-up */ /* Window clean-up */
return DefWindowProcA( hwnd, msg, wParam, lParam ); return DefWindowProcA( hwnd, msg, wParam, lParam );
case WM_SHOWWINDOW: case WM_SHOWWINDOW:
if (!wParam) DEFDLG_SaveFocus( hwnd ); if (!wParam) DEFDLG_SaveFocus( hwnd );
return DefWindowProcA( hwnd, msg, wParam, lParam ); return DefWindowProcA( hwnd, msg, wParam, lParam );
case WM_ACTIVATE: case WM_ACTIVATE:
if (wParam) DEFDLG_RestoreFocus( hwnd ); if (wParam) DEFDLG_RestoreFocus( hwnd );
else DEFDLG_SaveFocus( hwnd ); else DEFDLG_SaveFocus( hwnd );
return 0; return 0;
case WM_SETFOCUS: case WM_SETFOCUS:
DEFDLG_RestoreFocus( hwnd ); DEFDLG_RestoreFocus( hwnd );
return 0; return 0;
case DM_SETDEFID: case DM_SETDEFID:
if (dlgInfo && !(dlgInfo->flags & DF_END)) if (dlgInfo && !(dlgInfo->flags & DF_END))
...@@ -279,9 +279,9 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam, ...@@ -279,9 +279,9 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
if ((hwndDefId = DEFDLG_FindDefButton( hwnd ))) if ((hwndDefId = DEFDLG_FindDefButton( hwnd )))
return MAKELONG( GetDlgCtrlID( hwndDefId ), DC_HASDEFID); return MAKELONG( GetDlgCtrlID( hwndDefId ), DC_HASDEFID);
} }
return 0; return 0;
case WM_NEXTDLGCTL: case WM_NEXTDLGCTL:
if (dlgInfo) if (dlgInfo)
{ {
HWND hwndDest = (HWND)wParam; HWND hwndDest = (HWND)wParam;
...@@ -304,9 +304,9 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam, ...@@ -304,9 +304,9 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
SendMessageA( GetParent(hwndFocus), CB_SHOWDROPDOWN, FALSE, 0 ); SendMessageA( GetParent(hwndFocus), CB_SHOWDROPDOWN, FALSE, 0 );
} }
} }
return DefWindowProcA( hwnd, msg, wParam, lParam ); return DefWindowProcA( hwnd, msg, wParam, lParam );
case WM_GETFONT: case WM_GETFONT:
return dlgInfo ? (LRESULT)dlgInfo->hUserFont : 0; return dlgInfo ? (LRESULT)dlgInfo->hUserFont : 0;
case WM_CLOSE: case WM_CLOSE:
...@@ -315,7 +315,7 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam, ...@@ -315,7 +315,7 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
return 0; return 0;
case WM_NOTIFYFORMAT: case WM_NOTIFYFORMAT:
return DefWindowProcA( hwnd, msg, wParam, lParam ); return DefWindowProcA( hwnd, msg, wParam, lParam );
} }
return 0; return 0;
} }
...@@ -328,7 +328,7 @@ static LRESULT DEFDLG_Epilog(HWND hwnd, UINT msg, BOOL fResult) ...@@ -328,7 +328,7 @@ static LRESULT DEFDLG_Epilog(HWND hwnd, UINT msg, BOOL fResult)
/* see SDK 3.1 */ /* see SDK 3.1 */
if ((msg >= WM_CTLCOLORMSGBOX && msg <= WM_CTLCOLORSTATIC) || if ((msg >= WM_CTLCOLORMSGBOX && msg <= WM_CTLCOLORSTATIC) ||
msg == WM_CTLCOLOR || msg == WM_COMPAREITEM || msg == WM_CTLCOLOR || msg == WM_COMPAREITEM ||
msg == WM_VKEYTOITEM || msg == WM_CHARTOITEM || msg == WM_VKEYTOITEM || msg == WM_CHARTOITEM ||
msg == WM_QUERYDRAGICON || msg == WM_INITDIALOG) msg == WM_QUERYDRAGICON || msg == WM_INITDIALOG)
return fResult; return fResult;
...@@ -375,7 +375,7 @@ DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create ) ...@@ -375,7 +375,7 @@ DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create )
} }
/*********************************************************************** /***********************************************************************
* DefDlgProc (USER.308) * DefDlgProc (USER.308)
*/ */
LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
LPARAM lParam ) LPARAM lParam )
...@@ -434,7 +434,7 @@ LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, ...@@ -434,7 +434,7 @@ LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
/*********************************************************************** /***********************************************************************
* DefDlgProcA (USER32.@) * DefDlgProcA (USER32.@)
*/ */
LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
{ {
...@@ -491,7 +491,7 @@ LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) ...@@ -491,7 +491,7 @@ LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
/*********************************************************************** /***********************************************************************
* DefDlgProcW (USER32.@) * DefDlgProcW (USER32.@)
*/ */
LRESULT WINAPI DefDlgProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) LRESULT WINAPI DefDlgProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
{ {
......
...@@ -245,11 +245,11 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info, ...@@ -245,11 +245,11 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info,
if (GET_WORD(p) == 0xffff) /* Is it an integer id? */ if (GET_WORD(p) == 0xffff) /* Is it an integer id? */
{ {
info->windowName = (LPCWSTR)(UINT)GET_WORD(p + 1); info->windowName = (LPCWSTR)(UINT)GET_WORD(p + 1);
p += 2; p += 2;
} }
else else
{ {
info->windowName = (LPCWSTR)p; info->windowName = (LPCWSTR)p;
p += strlenW( info->windowName ) + 1; p += strlenW( info->windowName ) + 1;
} }
...@@ -419,7 +419,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result ) ...@@ -419,7 +419,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
case 0xffff: case 0xffff:
result->menuName = (LPCWSTR)(UINT)GET_WORD( p + 1 ); result->menuName = (LPCWSTR)(UINT)GET_WORD( p + 1 );
p += 2; p += 2;
TRACE(" MENU %04x\n", LOWORD(result->menuName) ); TRACE(" MENU %04x\n", LOWORD(result->menuName) );
break; break;
default: default:
result->menuName = (LPCWSTR)p; result->menuName = (LPCWSTR)p;
...@@ -439,7 +439,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result ) ...@@ -439,7 +439,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
case 0xffff: case 0xffff:
result->className = (LPCWSTR)(UINT)GET_WORD( p + 1 ); result->className = (LPCWSTR)(UINT)GET_WORD( p + 1 );
p += 2; p += 2;
TRACE(" CLASS %04x\n", LOWORD(result->className) ); TRACE(" CLASS %04x\n", LOWORD(result->className) );
break; break;
default: default:
result->className = (LPCWSTR)p; result->className = (LPCWSTR)p;
...@@ -458,7 +458,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result ) ...@@ -458,7 +458,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
if (result->style & DS_SETFONT) if (result->style & DS_SETFONT)
{ {
result->pointSize = GET_WORD(p); result->pointSize = GET_WORD(p);
p++; p++;
if (result->dialogEx) if (result->dialogEx)
{ {
...@@ -470,9 +470,9 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result ) ...@@ -470,9 +470,9 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
result->weight = FW_DONTCARE; result->weight = FW_DONTCARE;
result->italic = FALSE; result->italic = FALSE;
} }
result->faceName = (LPCWSTR)p; result->faceName = (LPCWSTR)p;
p += strlenW( result->faceName ) + 1; p += strlenW( result->faceName ) + 1;
TRACE(" FONT %d, %s, %d, %s\n", TRACE(" FONT %d, %s, %d, %s\n",
result->pointSize, debugstr_w( result->faceName ), result->pointSize, debugstr_w( result->faceName ),
result->weight, result->italic ? "TRUE" : "FALSE" ); result->weight, result->italic ? "TRUE" : "FALSE" );
} }
...@@ -523,8 +523,8 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate, ...@@ -523,8 +523,8 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
* for both +ve and -ve template.pointSize */ * for both +ve and -ve template.pointSize */
HDC dc; HDC dc;
int pixels; int pixels;
dc = GetDC(0); dc = GetDC(0);
pixels = MulDiv(template.pointSize, GetDeviceCaps(dc , LOGPIXELSY), 72); pixels = MulDiv(template.pointSize, GetDeviceCaps(dc , LOGPIXELSY), 72);
hUserFont = CreateFontW( -pixels, 0, 0, 0, template.weight, hUserFont = CreateFontW( -pixels, 0, 0, 0, template.weight,
template.italic, FALSE, FALSE, DEFAULT_CHARSET, 0, 0, template.italic, FALSE, FALSE, DEFAULT_CHARSET, 0, 0,
PROOF_QUALITY, FF_DONTCARE, PROOF_QUALITY, FF_DONTCARE,
...@@ -634,9 +634,9 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate, ...@@ -634,9 +634,9 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
if (hUserFont) DeleteObject( hUserFont ); if (hUserFont) DeleteObject( hUserFont );
if (hMenu) DestroyMenu( hMenu ); if (hMenu) DestroyMenu( hMenu );
if (modal && (flags & DF_OWNERENABLED)) DIALOG_EnableOwner(owner); if (modal && (flags & DF_OWNERENABLED)) DIALOG_EnableOwner(owner);
return 0; return 0;
} }
/* moved this from the top of the method to here as DIALOGINFO structure /* moved this from the top of the method to here as DIALOGINFO structure
will be valid only after WM_CREATE message has been handled in DefDlgProc will be valid only after WM_CREATE message has been handled in DefDlgProc
All the members of the structure get filled here using temp variables */ All the members of the structure get filled here using temp variables */
...@@ -649,7 +649,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate, ...@@ -649,7 +649,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
dlgInfo->idResult = 0; dlgInfo->idResult = 0;
dlgInfo->flags = flags; dlgInfo->flags = flags;
dlgInfo->hDialogHeap = 0; dlgInfo->hDialogHeap = 0;
if (template.helpId) SetWindowContextHelpId( hwnd, template.helpId ); if (template.helpId) SetWindowContextHelpId( hwnd, template.helpId );
if (unicode) SetWindowLongPtrW( hwnd, DWLP_DLGPROC, (ULONG_PTR)dlgProc ); if (unicode) SetWindowLongPtrW( hwnd, DWLP_DLGPROC, (ULONG_PTR)dlgProc );
...@@ -673,11 +673,11 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate, ...@@ -673,11 +673,11 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
SetFocus( dlgInfo->hwndFocus ); SetFocus( dlgInfo->hwndFocus );
} }
if (template.style & WS_VISIBLE && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE)) if (template.style & WS_VISIBLE && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
{ {
ShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */ ShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */
} }
return hwnd; return hwnd;
} }
if (modal && ownerEnabled) DIALOG_EnableOwner(owner); if (modal && ownerEnabled) DIALOG_EnableOwner(owner);
if( IsWindow(hwnd) ) DestroyWindow( hwnd ); if( IsWindow(hwnd) ) DestroyWindow( hwnd );
...@@ -992,21 +992,21 @@ static HWND DIALOG_FindMsgDestination( HWND hwndDlg ) ...@@ -992,21 +992,21 @@ static HWND DIALOG_FindMsgDestination( HWND hwndDlg )
{ {
while (GetWindowLongA(hwndDlg, GWL_STYLE) & DS_CONTROL) while (GetWindowLongA(hwndDlg, GWL_STYLE) & DS_CONTROL)
{ {
WND *pParent; WND *pParent;
HWND hParent = GetParent(hwndDlg); HWND hParent = GetParent(hwndDlg);
if (!hParent) break; if (!hParent) break;
pParent = WIN_GetPtr(hParent); pParent = WIN_GetPtr(hParent);
if (!pParent || pParent == WND_OTHER_PROCESS || pParent == WND_DESKTOP) break; if (!pParent || pParent == WND_OTHER_PROCESS || pParent == WND_DESKTOP) break;
if (!(pParent->flags & WIN_ISDIALOG)) if (!(pParent->flags & WIN_ISDIALOG))
{ {
WIN_ReleasePtr(pParent); WIN_ReleasePtr(pParent);
break; break;
} }
WIN_ReleasePtr(pParent); WIN_ReleasePtr(pParent);
hwndDlg = hParent; hwndDlg = hParent;
} }
return hwndDlg; return hwndDlg;
...@@ -1623,12 +1623,12 @@ static HWND DIALOG_GetNextTabItem( HWND hwndMain, HWND hwndDlg, HWND hwndCtrl, B ...@@ -1623,12 +1623,12 @@ static HWND DIALOG_GetNextTabItem( HWND hwndMain, HWND hwndDlg, HWND hwndCtrl, B
{ {
HWND hParent = GetParent(hwndCtrl); HWND hParent = GetParent(hwndCtrl);
while(hParent) while(hParent)
{ {
if(hParent == hwndMain) break; if(hParent == hwndMain) break;
retWnd = DIALOG_GetNextTabItem(hwndMain,GetParent(hParent),hParent,fPrevious ); retWnd = DIALOG_GetNextTabItem(hwndMain,GetParent(hParent),hParent,fPrevious );
if(retWnd) break; if(retWnd) break;
hParent = GetParent(hParent); hParent = GetParent(hParent);
} }
if(!retWnd) if(!retWnd)
retWnd = DIALOG_GetNextTabItem(hwndMain,hwndMain,NULL,fPrevious ); retWnd = DIALOG_GetNextTabItem(hwndMain,hwndMain,NULL,fPrevious );
} }
......
...@@ -496,17 +496,19 @@ UINT WINAPI GetKeyboardLayoutList(INT nBuff, HKL *layouts) ...@@ -496,17 +496,19 @@ UINT WINAPI GetKeyboardLayoutList(INT nBuff, HKL *layouts)
/*********************************************************************** /***********************************************************************
* RegisterHotKey (USER32.@) * RegisterHotKey (USER32.@)
*/ */
BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk) { BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk)
FIXME_(keyboard)("(%p,%d,0x%08x,%d): stub\n",hwnd,id,modifiers,vk); {
return TRUE; FIXME_(keyboard)("(%p,%d,0x%08x,%d): stub\n",hwnd,id,modifiers,vk);
return TRUE;
} }
/*********************************************************************** /***********************************************************************
* UnregisterHotKey (USER32.@) * UnregisterHotKey (USER32.@)
*/ */
BOOL WINAPI UnregisterHotKey(HWND hwnd,INT id) { BOOL WINAPI UnregisterHotKey(HWND hwnd,INT id)
FIXME_(keyboard)("(%p,%d): stub\n",hwnd,id); {
return TRUE; FIXME_(keyboard)("(%p,%d): stub\n",hwnd,id);
return TRUE;
} }
/*********************************************************************** /***********************************************************************
...@@ -639,9 +641,9 @@ static void CALLBACK TrackMouseEventProc(HWND hwndUnused, UINT uMsg, UINT_PTR id ...@@ -639,9 +641,9 @@ static void CALLBACK TrackMouseEventProc(HWND hwndUnused, UINT uMsg, UINT_PTR id
/* has the mouse hovered long enough? */ /* has the mouse hovered long enough? */
if(TrackingList[i].iHoverTime <= TrackingList[i].tme.dwHoverTime) if(TrackingList[i].iHoverTime <= TrackingList[i].tme.dwHoverTime)
{ {
posClient.x = pos.x; posClient.x = pos.x;
posClient.y = pos.y; posClient.y = pos.y;
ScreenToClient(hwnd, &posClient); ScreenToClient(hwnd, &posClient);
if (nonclient) { if (nonclient) {
PostMessageW(TrackingList[i].tme.hwndTrack, WM_NCMOUSEHOVER, PostMessageW(TrackingList[i].tme.hwndTrack, WM_NCMOUSEHOVER,
get_key_state(), MAKELPARAM( posClient.x, posClient.y )); get_key_state(), MAKELPARAM( posClient.x, posClient.y ));
......
...@@ -752,16 +752,16 @@ static void WIN_FixCoordinates( CREATESTRUCTA *cs, INT *sw) ...@@ -752,16 +752,16 @@ static void WIN_FixCoordinates( CREATESTRUCTA *cs, INT *sw)
} }
else else
{ {
/* neither x nor cx are default. Check the y values . /* neither x nor cx are default. Check the y values .
* In the trace we see Outlook and Outlook Express using * In the trace we see Outlook and Outlook Express using
* cy set to CW_USEDEFAULT when opening the address book. * cy set to CW_USEDEFAULT when opening the address book.
*/ */
if (cs->cy == CW_USEDEFAULT || cs->cy == CW_USEDEFAULT16) { if (cs->cy == CW_USEDEFAULT || cs->cy == CW_USEDEFAULT16) {
RECT r; RECT r;
FIXME("Strange use of CW_USEDEFAULT in nHeight\n"); FIXME("Strange use of CW_USEDEFAULT in nHeight\n");
SystemParametersInfoW( SPI_GETWORKAREA, 0, &r, 0); SystemParametersInfoW( SPI_GETWORKAREA, 0, &r, 0);
cs->cy = (((r.bottom - r.top) * 3) / 4) - cs->y; cs->cy = (((r.bottom - r.top) * 3) / 4) - cs->y;
} }
} }
} }
...@@ -1133,7 +1133,7 @@ HWND16 WINAPI CreateWindow16( LPCSTR className, LPCSTR windowName, ...@@ -1133,7 +1133,7 @@ HWND16 WINAPI CreateWindow16( LPCSTR className, LPCSTR windowName,
HINSTANCE16 instance, LPVOID data ) HINSTANCE16 instance, LPVOID data )
{ {
return CreateWindowEx16( 0, className, windowName, style, return CreateWindowEx16( 0, className, windowName, style,
x, y, width, height, parent, menu, instance, data ); x, y, width, height, parent, menu, instance, data );
} }
...@@ -2990,26 +2990,26 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt ) ...@@ -2990,26 +2990,26 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
while(1) while(1)
{ {
while (PeekMessageW( &msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE )) while (PeekMessageW( &msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE ))
{ {
if( msg.message == WM_LBUTTONUP ) if( msg.message == WM_LBUTTONUP )
{ {
ReleaseCapture(); ReleaseCapture();
return 0; return 0;
} }
if( msg.message == WM_MOUSEMOVE ) if( msg.message == WM_MOUSEMOVE )
{ {
POINT tmp; POINT tmp;
tmp.x = LOWORD(msg.lParam); tmp.x = LOWORD(msg.lParam);
tmp.y = HIWORD(msg.lParam); tmp.y = HIWORD(msg.lParam);
if( !PtInRect( &rect, tmp )) if( !PtInRect( &rect, tmp ))
{ {
ReleaseCapture(); ReleaseCapture();
return 1; return 1;
} }
} }
} }
WaitMessage(); WaitMessage();
} }
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment