GetComboBoxInfo implementation
-
-
Unless someone else has something to say, you're out of luck. Interactions like this with controls are all done through messages, like
SetWindowText()
is an alias forPostMessage(WM_SETTEXT)
, and it appears thatGetComboBoxInfo()
is an alias for CB_GETCOMBOBOXINFO[^], which as that MSDN page says is only implemented on Windows XP and later. If this query message is not supported by the control on your platform then you are going to have a hard time getting the internal state. Not sure if it will work, and if it will it is probably not a good idea, but you might be able to update the common control library from something like Windows XP, which should have all features of NT, plus more by copying and pasting. -
Unless someone else has something to say, you're out of luck. Interactions like this with controls are all done through messages, like
SetWindowText()
is an alias forPostMessage(WM_SETTEXT)
, and it appears thatGetComboBoxInfo()
is an alias for CB_GETCOMBOBOXINFO[^], which as that MSDN page says is only implemented on Windows XP and later. If this query message is not supported by the control on your platform then you are going to have a hard time getting the internal state. Not sure if it will work, and if it will it is probably not a good idea, but you might be able to update the common control library from something like Windows XP, which should have all features of NT, plus more by copying and pasting.Then perhaps you give me an alternative for this issue : I need to have ComboBoxInfo.hwndList handle for the follow function :
void CComboBoxExt::PreSubclassWindow()
{
// TODO: Add your specialized code here and/or call the base classCComboBox::PreSubclassWindow(); COMBOBOXINFO ComboBoxInfo; ComboBoxInfo.cbSize = sizeof(ComboBoxInfo); GetComboBoxInfo(m\_hWnd,&ComboBoxInfo);
// m_Edit.SubclassWindow(ComboBoxInfo.hwndEdit);
m_List.SubclassWindow(ComboBoxInfo.hwndList);
SetProp(ComboBoxInfo.hwndList, WndPropertyComboBoxEx, this);
fNextListProc = (WNDPROC)SetWindowLong(ComboBoxInfo.hwndList, GWL_WNDPROC, (LONG)WinProcForList); // <- here I need ComboBoxInfo.hwndList
}and implementation of WinProcForList is here :
LRESULT CComboBoxExt::WinProcForList(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
CComboBoxExt* pInstance = (CComboBoxExt*)GetProp(hWnd,WndPropertyComboBoxEx);
ASSERT(pInstance != NULL);if(msg == LB\_FINDSTRING) { TRACE("Replacing LB\_FINDSTRING with LB\_FINDSTRINGEXACT when looking for: \\"%s\\"\\n", (LPCTSTR)lParam); msg = LB\_FINDSTRINGEXACT; } return CallWindowProc(pInstance->fNextListProc, hWnd, msg, wParam, lParam);
}
any help or hint I will very appreciated !
-
Unless someone else has something to say, you're out of luck. Interactions like this with controls are all done through messages, like
SetWindowText()
is an alias forPostMessage(WM_SETTEXT)
, and it appears thatGetComboBoxInfo()
is an alias for CB_GETCOMBOBOXINFO[^], which as that MSDN page says is only implemented on Windows XP and later. If this query message is not supported by the control on your platform then you are going to have a hard time getting the internal state. Not sure if it will work, and if it will it is probably not a good idea, but you might be able to update the common control library from something like Windows XP, which should have all features of NT, plus more by copying and pasting.In fact , I try to deturn LB_FINDSTRING from dropdown list into LB_FINDSTRINGEXACT , and there must be an solution that function for Windows NT ... :(