I would like subclass the listbox of a combobox, i have tried this code but it didn't work, could you please help me.
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); }