C / C++ / MFC
|sorry for the late reply...I was absent a while!
in the meantime I lost my first trail project and did it again, somehow differently
but it is still not working!
My steps in detail:
1. Using the original source code from VS Gesture Demo
2. Adding a ListControl to the IDD_OPTIONS Dialog resource (report style) ID: IDC_LIST_INPANE
3. doing the same what the framework would do automatically for a standard dialog:
- in OptionPane.h I added
- in OptionPane.cpp in DoDataExchange
DDX_Control(pDX, IDC_LIST_INPANE, m_ListCtrl);
4. Added a Handler for WM_INITDIALOG
LRESULT COptionsPane::HandleInitDialog(WPARAM wParam,LPARAM lParam)
nItem = m_ListCtrl.InsertItem(MAXINT,_T("Item1"));
that's quite all!
Now, when I am starting the program, I will get an assertion in HandleInitDialog at the first access of m_ListCtrl. It seems m_hWnd is not valid at this moment.
What I need to do additionally in comparison to CDialog (where I initialize the control in OnInitDialog())
Is CPaneDialog::HandleInitDialog the wrong place for initialization of controls?
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.