Jeffos
01-12-2011, 05:43 AM
I really like WDL_VWnd. I'm stuck with 2 questions (for the moment ;)), I have a feeling they're obvious things but I really can't figure them out. Help !
1) I'm facing a focus issue with WDL_VirtualComboBox :
EDIT2: Forget that, got it (here (http://code.google.com/p/sws-extension/source/browse/branches/beta/SnM/SnM_FXChainView.cpp#1084) if interested, obvious indeed!)
http://stash.reaper.fm/7544/WDL_VirtualIconButton.gif
edit: error in the anim's title, no pb with WDL_VirtualIconButton
As shown in the anim, since such a dropdown has been used, it's a bit like something steals the focus. Not harmfull of course, but it's really painfull from the user POV, he/she has to click *twice* every time he has used a dropdown (in the anim, click twice to activate another window).
I'm quiet sure it's a SetCapture()/ReleaseCapture() issue vs the popup. I can't see anything obvious in the WDL_VirtualComboBox code. On my side I have a "standard" mouse events implemention (well, I hope :)):
[...]
case WM_LBUTTONDOWN:
SetFocus(m_hwnd);
if (m_parentVwnd.OnMouseDown(GET_X_LPARAM(lParam),GET _Y_LPARAM(lParam)))
SetCapture(m_hwnd);
break;
case WM_LBUTTONUP:
if (GetCapture() == m_hwnd)
{
m_parentVwnd.OnMouseUp(GET_X_LPARAM(lParam),GET_Y_ LPARAM(lParam));
ReleaseCapture();
}
break;
case WM_MOUSEMOVE:
// if (GetCapture() == m_hwnd)
m_parentVwnd.OnMouseMove(GET_X_LPARAM(lParam),GET_ Y_LPARAM(lParam));
break;
}
return 0;
any idea ?
2) in order to better arrange my GUIs (at runtime): is it possible to preview the size (width) of a static text "toto" when displayed through LICE_Font/LICE_CachedFont?
Thanks for any input !
1) I'm facing a focus issue with WDL_VirtualComboBox :
EDIT2: Forget that, got it (here (http://code.google.com/p/sws-extension/source/browse/branches/beta/SnM/SnM_FXChainView.cpp#1084) if interested, obvious indeed!)
http://stash.reaper.fm/7544/WDL_VirtualIconButton.gif
edit: error in the anim's title, no pb with WDL_VirtualIconButton
As shown in the anim, since such a dropdown has been used, it's a bit like something steals the focus. Not harmfull of course, but it's really painfull from the user POV, he/she has to click *twice* every time he has used a dropdown (in the anim, click twice to activate another window).
I'm quiet sure it's a SetCapture()/ReleaseCapture() issue vs the popup. I can't see anything obvious in the WDL_VirtualComboBox code. On my side I have a "standard" mouse events implemention (well, I hope :)):
[...]
case WM_LBUTTONDOWN:
SetFocus(m_hwnd);
if (m_parentVwnd.OnMouseDown(GET_X_LPARAM(lParam),GET _Y_LPARAM(lParam)))
SetCapture(m_hwnd);
break;
case WM_LBUTTONUP:
if (GetCapture() == m_hwnd)
{
m_parentVwnd.OnMouseUp(GET_X_LPARAM(lParam),GET_Y_ LPARAM(lParam));
ReleaseCapture();
}
break;
case WM_MOUSEMOVE:
// if (GetCapture() == m_hwnd)
m_parentVwnd.OnMouseMove(GET_X_LPARAM(lParam),GET_ Y_LPARAM(lParam));
break;
}
return 0;
any idea ?
2) in order to better arrange my GUIs (at runtime): is it possible to preview the size (width) of a static text "toto" when displayed through LICE_Font/LICE_CachedFont?
Thanks for any input !