Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » how could i map messsages for a CListCtrl in a CExtWRB wrapper? Collapse All
Subject Author Date
violet zhu Apr 9, 2005 - 1:39 AM

i create a CListCtrl through CExtWRB<CListCtrl> .now how could i map messages for it . when i use the listctrl ,it seems that the ExtendedStyle setted for it has no affection .how could i do?


thank you?

Technical Support Apr 9, 2005 - 9:01 AM

We cannot answer your question because you did not mention which window is the parent of your list view control and where you want to catch messages from the list view. So, we need more details.

violet zhu Apr 9, 2005 - 6:48 PM

CMainFrame which is derived from CFrameWnd is the parent of the listctrl .i want to catch messages from listctrl at CMainFrame;

Technical Support Apr 10, 2005 - 12:25 PM

If the main frame window is the parent of your list view window, then the list view window is the main view window in your SDI application which is created with the AFX_IDW_PANE_FIRST dialog control identifier in the CMainFrame::OnCreate() method. You can catch any notification messages of the list view window in the main frame window. Just add appropriate methods and message map entries to the main frame window. If it’s not what you mean, please let us know.

violet zhu Apr 10, 2005 - 7:41 PM

the listctrl is not the main view of the CMainFrame.it was inserted into a CExtControlBar.And the CExtControlBar was docked at the bottom of the CMainFrame.

Technical Support Apr 11, 2005 - 10:36 AM

In this case you have two solutions:

  1. Use your own list view class and implement message reflection methods in it. This can be easily done with the class wizard.
  2. Use your own CExtControlBar-derived class as the list view’s parent window and handle list notification messages in this class. In this case you should add all message handlers and message map entries by hand.