Author: jimtabor Date: Thu Dec 30 02:32:50 2010 New Revision: 50219
URL: http://svn.reactos.org/svn/reactos?rev=50219&view=rev Log: [User32] - Controls: Set fnids for the user client controls.
Modified: trunk/reactos/dll/win32/user32/controls/button.c trunk/reactos/dll/win32/user32/controls/combo.c trunk/reactos/dll/win32/user32/controls/edit.c trunk/reactos/dll/win32/user32/controls/listbox.c trunk/reactos/dll/win32/user32/controls/static.c
Modified: trunk/reactos/dll/win32/user32/controls/button.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/b... ============================================================================== --- trunk/reactos/dll/win32/user32/controls/button.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/controls/button.c [iso-8859-1] Thu Dec 30 02:32:50 2010 @@ -256,6 +256,18 @@ UINT btn_type = get_button_type( style ); LONG state; HANDLE oldHbitmap; +#ifdef __REACTOS__ + PWND pWnd; + + pWnd = ValidateHwnd(hWnd); + if (pWnd) + { + if (!pWnd->fnid) + { + NtUserSetWindowFNID(hWnd, FNID_BUTTON); + } + } +#endif
pt.x = (short)LOWORD(lParam); pt.y = (short)HIWORD(lParam); @@ -299,6 +311,13 @@ set_button_state( hWnd, BUTTON_UNCHECKED ); button_update_uistate( hWnd, unicode ); return 0; + +#ifdef __REACTOS__ + case WM_DESTROY: + case WM_NCDESTROY: + NtUserSetWindowFNID(hWnd, FNID_DESTROY); + break; +#endif
case WM_ERASEBKGND: if (btn_type == BS_OWNERDRAW)
Modified: trunk/reactos/dll/win32/user32/controls/combo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/c... ============================================================================== --- trunk/reactos/dll/win32/user32/controls/combo.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/controls/combo.c [iso-8859-1] Thu Dec 30 02:32:50 2010 @@ -1837,6 +1837,18 @@ WPARAM wParam, LPARAM lParam, BOOL unicode ) { LPHEADCOMBO lphc = (LPHEADCOMBO)GetWindowLongPtrW( hwnd, 0 ); +#ifdef __REACTOS__ + PWND pWnd; + + pWnd = ValidateHwnd(hwnd); + if (pWnd) + { + if (!pWnd->fnid) + { + NtUserSetWindowFNID(hwnd, FNID_COMBOBOX); + } + } +#endif
TRACE("[%p]: msg %s wp %08lx lp %08lx\n", hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam ); @@ -1855,6 +1867,9 @@ } case WM_NCDESTROY: COMBO_NCDestroy(lphc); +#ifdef __REACTOS__ + NtUserSetWindowFNID(hwnd, FNID_DESTROY); +#endif break;/* -> DefWindowProc */
case WM_CREATE:
Modified: trunk/reactos/dll/win32/user32/controls/edit.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/e... ============================================================================== --- trunk/reactos/dll/win32/user32/controls/edit.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/controls/edit.c [iso-8859-1] Thu Dec 30 02:32:50 2010 @@ -4476,6 +4476,18 @@ { EDITSTATE *es = (EDITSTATE *)GetWindowLongPtrW( hwnd, 0 ); LRESULT result = 0; +#ifdef __REACTOS__ + PWND pWnd; + + pWnd = ValidateHwnd(hwnd); + if (pWnd) + { + if (!pWnd->fnid) + { + NtUserSetWindowFNID(hwnd, FNID_EDIT); + } + } +#endif
TRACE("hwnd=%p msg=%x (%s) wparam=%lx lparam=%lx\n", hwnd, msg, SPY_GetMsgName(msg, hwnd), wParam, lParam);
@@ -4723,6 +4735,9 @@ case WM_DESTROY: result = EDIT_WM_Destroy(es); es = NULL; +#ifdef __REACTOS__ + NtUserSetWindowFNID(hwnd, FNID_DESTROY); +#endif break;
case WM_GETDLGCODE:
Modified: trunk/reactos/dll/win32/user32/controls/listbox.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/l... ============================================================================== --- trunk/reactos/dll/win32/user32/controls/listbox.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/controls/listbox.c [iso-8859-1] Thu Dec 30 02:32:50 2010 @@ -2585,6 +2585,18 @@ LB_DESCR *descr = (LB_DESCR *)GetWindowLongPtrW( hwnd, 0 ); LPHEADCOMBO lphc = 0; LRESULT ret; +#ifdef __REACTOS__ + PWND pWnd; + + pWnd = ValidateHwnd(hwnd); + if (pWnd) + { + if (!pWnd->fnid) + { + NtUserSetWindowFNID(hwnd, FNID_LISTBOX); // Could be FNID_COMBOLBOX by class. + } + } +#endif
if (!descr) { @@ -2999,6 +3011,9 @@ return 0;
case WM_DESTROY: +#ifdef __REACTOS__ + NtUserSetWindowFNID(hwnd, FNID_DESTROY); +#endif return LISTBOX_Destroy( descr );
case WM_ENABLE:
Modified: trunk/reactos/dll/win32/user32/controls/static.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/s... ============================================================================== --- trunk/reactos/dll/win32/user32/controls/static.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/controls/static.c [iso-8859-1] Thu Dec 30 02:32:50 2010 @@ -423,6 +423,18 @@ LRESULT lResult = 0; LONG full_style = GetWindowLongPtrW( hwnd, GWL_STYLE ); LONG style = full_style & SS_TYPEMASK; +#ifdef __REACTOS__ + PWND pWnd; + + pWnd = ValidateHwnd(hwnd); + if (pWnd) + { + if (!pWnd->fnid) + { + NtUserSetWindowFNID(hwnd, FNID_STATIC); + } + } +#endif
switch (uMsg) { @@ -437,6 +449,9 @@ break;
case WM_NCDESTROY: +#ifdef __REACTOS__ + NtUserSetWindowFNID(hwnd, FNID_DESTROY); +#endif if (style == SS_ICON) { /* * FIXME