- Controls: Set fnids for the user client controls.

svn path=/trunk/; revision=50219
This commit is contained in:
James Tabor 2010-12-30 02:32:50 +00:00
parent c2a558dbb7
commit a7d5cdfa3b
5 changed files with 79 additions and 0 deletions

View file

@ -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)
{

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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