Click here to Skip to main content
15,900,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Include ALL MFC dlls? Pin
25-Mar-01 9:24
suss25-Mar-01 9:24 
GeneralRe: Include ALL MFC dlls? Pin
Michael Dunn25-Mar-01 10:39
sitebuilderMichael Dunn25-Mar-01 10:39 
AnswerRe: Include ALL MFC dlls? Pin
26-Mar-01 0:10
suss26-Mar-01 0:10 
GeneralRe: Include ALL MFC dlls? Pin
26-Mar-01 4:25
suss26-Mar-01 4:25 
GeneralAccessing parent class variables Pin
25-Mar-01 2:39
suss25-Mar-01 2:39 
GeneralRe: Accessing parent class variables Pin
Joseph Dempsey25-Mar-01 4:21
Joseph Dempsey25-Mar-01 4:21 
GeneralWTL/Win32 question - making a CListCtrl Pin
Christian Graus25-Mar-01 1:21
protectorChristian Graus25-Mar-01 1:21 
GeneralRe: WTL/Win32 question - making a CListCtrl Pin
Michael Dunn25-Mar-01 9:24
sitebuilderMichael Dunn25-Mar-01 9:24 
class CMyDialog : CDialogImpl<CMyDialog>
{
protected:
  CContainedWindowT<CListViewCtrl> m_listCtrl;
 
public:
  CMyDialog() : m_listCtrl(this, 1) {}  // set parent window and message map ID
 
BEGIN_MSG_MAP(CMyDialog)
  // ... dialog message handlers
  ALT_MSG_MAP(1)
  // handlers for messages from the list ctrl, eg:
  MESSAGE_HANDLER(WM_SETFOCUS, OnSetfocusList)
END_MSG_MAP()
};

To summarize: make a member variable in the dlg to represent the list ctrl. Subclass the list ctrl in OnInitDialog(), then put message handlers for the list in the ALT_MSG_MAP(1) section of the dlg's message map. The sample entry above declares a handler that's called when the list receives a WM_SETFOCUS message.

--Mike--
http://home.inreach.com/mdunn/
The preferred snack of 4 out of 5 Lounge readers.
GeneralRe: WTL/Win32 question - making a CListCtrl Pin
Christian Graus25-Mar-01 10:19
protectorChristian Graus25-Mar-01 10:19 
GeneralRe: WTL/Win32 question - making a CListCtrl Pin
Michael Dunn25-Mar-01 10:52
sitebuilderMichael Dunn25-Mar-01 10:52 
GeneralRe: WTL/Win32 question - making a CListCtrl Pin
Christian Graus26-Mar-01 10:19
protectorChristian Graus26-Mar-01 10:19 
GeneralRe: WTL/Win32 question - making a CListCtrl Pin
Michael Dunn26-Mar-01 12:26
sitebuilderMichael Dunn26-Mar-01 12:26 
GeneralConstructing Cursor on the fly no longer working Pin
Wolfram Steinke24-Mar-01 18:35
Wolfram Steinke24-Mar-01 18:35 
GeneralPositioning a dialog Pin
Ashman24-Mar-01 15:07
Ashman24-Mar-01 15:07 
GeneralRe: Positioning a dialog Pin
Christian Graus24-Mar-01 21:04
protectorChristian Graus24-Mar-01 21:04 
GeneralNo click messages in CAnimateCtrl! Pin
24-Mar-01 10:57
suss24-Mar-01 10:57 
GeneralNo click messages in CAnimateCtrl! Pin
24-Mar-01 10:56
suss24-Mar-01 10:56 
GeneralUrgent ! System polices! Help !!! Pin
24-Mar-01 3:18
suss24-Mar-01 3:18 
GeneralWho can I create dialog, which is in MS InteDev 6.0 - flat tab Pin
24-Mar-01 2:02
suss24-Mar-01 2:02 
GeneralWho can I create dialog, which is in MS InteDev 6.0 - flat tab Pin
24-Mar-01 2:01
suss24-Mar-01 2:01 
GeneralInstallShield ... Pin
Hadi Rezaee23-Mar-01 23:53
Hadi Rezaee23-Mar-01 23:53 
GeneralRe: InstallShield ... Pin
Christian Graus24-Mar-01 0:23
protectorChristian Graus24-Mar-01 0:23 
GeneralUse View in controls ... Pin
Hadi Rezaee23-Mar-01 23:52
Hadi Rezaee23-Mar-01 23:52 
GeneralLearning Visual C++ Pin
Hadi Rezaee23-Mar-01 23:51
Hadi Rezaee23-Mar-01 23:51 
GeneralRe: Learning Visual C++ Pin
Christian Graus24-Mar-01 0:30
protectorChristian Graus24-Mar-01 0:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.