subclass listbox of combobox - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

subclass listbox of combobox

I would like subclass the listbox of a combobox, i have tried this code but it didn't work, could you please help me.
[code]
bool hSubclassedListBox = false;
LRESULT CALLBACK WindowProcedureEdit5(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_CTLCOLORLISTBOX:
{
if(!hSubclassedListBox)
{
HWND tmphwnd=(HWND)lParam;
hSubclassedListBox=true;
g_oldEditProc6 = (WNDPROC)SetWindowLong((HWND)lParam, GWL_WNDPROC, long(WindowProcedureEdit6));
/*style = GetWindowLong((HWND)lParam, GWL_STYLE);
style&=~(WS_BORDER);
g_oldEditProc6 = (WNDPROC)SetWindowLong((HWND)lParam, GWL_STYLE, style);*/
}
//return 0L;

}
}
return CallWindowProc(g_oldEditProc5, hwnd, message, wParam, lParam);
}[/code]
Sign In or Register to comment.