diff --git a/reactos/dll/win32/user32/controls/button.c b/reactos/dll/win32/user32/controls/button.c index 8b4003bbe58..3fef42efc56 100644 --- a/reactos/dll/win32/user32/controls/button.c +++ b/reactos/dll/win32/user32/controls/button.c @@ -256,6 +256,18 @@ LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg, 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); @@ -300,6 +312,13 @@ LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg, 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) { diff --git a/reactos/dll/win32/user32/controls/combo.c b/reactos/dll/win32/user32/controls/combo.c index 2a7ab1822b9..de6c646268d 100644 --- a/reactos/dll/win32/user32/controls/combo.c +++ b/reactos/dll/win32/user32/controls/combo.c @@ -1837,6 +1837,18 @@ LRESULT WINAPI ComboWndProc_common( HWND hwnd, UINT message, 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 @@ LRESULT WINAPI ComboWndProc_common( HWND hwnd, UINT message, } case WM_NCDESTROY: COMBO_NCDestroy(lphc); +#ifdef __REACTOS__ + NtUserSetWindowFNID(hwnd, FNID_DESTROY); +#endif break;/* -> DefWindowProc */ case WM_CREATE: diff --git a/reactos/dll/win32/user32/controls/edit.c b/reactos/dll/win32/user32/controls/edit.c index 683c9dfe72a..b484c842ea0 100644 --- a/reactos/dll/win32/user32/controls/edit.c +++ b/reactos/dll/win32/user32/controls/edit.c @@ -4476,6 +4476,18 @@ LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg, { 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 @@ LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg, case WM_DESTROY: result = EDIT_WM_Destroy(es); es = NULL; +#ifdef __REACTOS__ + NtUserSetWindowFNID(hwnd, FNID_DESTROY); +#endif break; case WM_GETDLGCODE: diff --git a/reactos/dll/win32/user32/controls/listbox.c b/reactos/dll/win32/user32/controls/listbox.c index 13c679c2d7a..e290860b49b 100644 --- a/reactos/dll/win32/user32/controls/listbox.c +++ b/reactos/dll/win32/user32/controls/listbox.c @@ -2585,6 +2585,18 @@ LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg, 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 @@ LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg, return 0; case WM_DESTROY: +#ifdef __REACTOS__ + NtUserSetWindowFNID(hwnd, FNID_DESTROY); +#endif return LISTBOX_Destroy( descr ); case WM_ENABLE: diff --git a/reactos/dll/win32/user32/controls/static.c b/reactos/dll/win32/user32/controls/static.c index db0f4408980..6d40bbc8d5f 100644 --- a/reactos/dll/win32/user32/controls/static.c +++ b/reactos/dll/win32/user32/controls/static.c @@ -423,6 +423,18 @@ LRESULT WINAPI StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, 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 @@ LRESULT WINAPI StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, break; case WM_NCDESTROY: +#ifdef __REACTOS__ + NtUserSetWindowFNID(hwnd, FNID_DESTROY); +#endif if (style == SS_ICON) { /* * FIXME