I need to add columns to my ListView when it is created. When I try to add them on WM_CREATE message they are not added. Is there any window message that is sent to it one time right after creation but before showing, so I can add some initialization on that message processing? I can add columns on the WM_SHOWWINDOW message, but I have to check wether this message is sent for the first time or not. So it would be great to have some init message without overheading code with checking the message count.
Posted on 2002-09-29 15:02:43 by Vaxon
Have you tried posting the LVM_INSERTCOLUMN message to the listview? And if you have, did you make sure that the index you specified was correct? And are you aware that the LVCOLUMN struct you pass with that message is IE version dependant? (although you shouldn't have any trouble with that if you demand IE 3.0+).
Posted on 2002-09-29 21:25:25 by sluggy
Thanls for you reply, Sluggy. Yes, I tried Posting the message and i tried sending it. The fact is everything works fine on WM_SOWWINDOW message and doesn't work on WM_CREATE. I think I can't add columns before CreateWindowEx returns.
Posted on 2002-09-30 02:10:40 by Vaxon
Well, it works on WM_CREATE now. It was my mistake. I superclassed listview and I had to call the standard (old) wndproc after my initialization when processing WM_CREATE message.
Posted on 2002-09-30 03:20:31 by Vaxon