Hi, if i create a window with CreateWindowEx i can in someway use the famous CustomDraw for
the Listview(don't work with DWL_MSGRESULT because is for dialog....), or i must have only a dialog-box?
tnx for help
Printable View
Hi, if i create a window with CreateWindowEx i can in someway use the famous CustomDraw for
the Listview(don't work with DWL_MSGRESULT because is for dialog....), or i must have only a dialog-box?
tnx for help
nope, been researching this all day, I know this thread is old and dead, and I'm 7 years too late, lol, but I'll post this here for others to read in the future, since I have found no explanation on the net regarding this issue.
customdraw sends WM_NOTIFY messages to the PARENT window of the control, and it assumes it's a dialog, so if you use CreateWindowEx, you need to specify the hwnd for a dialog to handle the WM_NOTIFY messages, and check if it's for your control, then post then back to the listview control for processing, it really is a big pain in the rear end, but it's the only way to do it. you also need to send a DWL_MSGRESULT to the dialog to register the return messages of the listview control after processing the custom draw events and figuring a return customdraw value.
Why did Microsoft assume we would never use custom draw in a control that has no parent dialog, that drives me crazy. What you can do is create a dialog, then create the listview inside of the dialog, and just size it to the entire area of the dialog, it's a shame we have to do it this way.