Problem with the listviewcontrol !!!! ==> subclass problem ???

Problem with the listviewcontrol !!!! ==> subclass problem ???

Post by Degraeve Dimitr » Fri, 17 Apr 1998 04:00:00


        I'm programming a MDI application in Visual C++ 5.0. ( using C, not the
MFC-classes !) and encounter some strange problems with the listview

        I've already used some listviewcontrols in my program, either as
childwindows of the MDI-children or implemented in a dialogbox. All those
controls worked fine, but now I'm implementing again listviewcontrols as
children of a MDI-child and I get the following problems :

1) I can't size the columnheaders anymore ( nothing wrong with the style )
2) I can't change an image of a listviewcontrol anymore, using
3) In one particular listview-control (LVS_REPORT style), I'm unable to set
the text of the first subitem of my listview control.

        The only thing I'm doing different then before is SUBCLASSING the
listviewcontrol. If I run through my program step by step, it runs fine
through the subclassprocedure  and passes the messages again to the normal
procedure. The only thing I seem to have troubles with are the "listview
macro's". I've gone through my code thoroughly and don't think the problem
situates itself elswhere ....

        Is subclassing a "common control" a problem or has anyone yet encountered
problems subclassing a common control, I'd really like to know,

thanks in advance,



1. >>>>>STUCK<<<<<< How to subclass desktop?

        Is there any way to subclass the Windows desktop ? I've tried the
conventional approach as described in Petzold 3rd ED. p.243. Using
GetWindowLong and GetDesktopWindow I retrieve a pointer to the old window
procedure. Then I use MakeProcIsntance to make a procedure instance of the
new window procedure and I pass a pointer to the new proc instance to
SetWindowLong. Now I should have successfully subclassed the desktop, right?
NOT! I can intercept messages sent to the desktop but whenever I minimize
and then restore a window, the window does not get repainted and the system
hangs itself. I KNOW that the desktop can be subclassed, just look at a
program like 'BackMenu'. Please, if anyone out there knows how this can be
done please post to this group and you will have my undying thanks!!! :-)

2. Horizontal streaks in Logitech PageScan Color scan

3. Resizing a CListBox>>>>>>>>>>>>>>>>>>>>>>>>>>>

4. RDP in VPN Tunnel?

5. weird Word 6 -> Word 7 .WLL migration problem (window subclass)


7. " INNOVATION INFOS + IMAGING " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

8. how do i compact the registry in win2k pro?

9. <<< BC31/OWL Problem : MessageBox in TDialog Destructor >>>

10. <<< Large Txt File Exporting Problems with Access 2.0 >>>

11. HELP >>> ActiveMovie SDK problems <<< HELP

12. >>>>>>>>> PROBLEM WITH MSICPB.EXE <<<<<<<<<<<<<<<<<

13. Problem with: MSVC 6 Problem with STL <map>, Templates and C2784 -- help please