Prev: MiniDumpWriteDump(...) now showing 'local' variables
Next: Is this Regular Expression for UTF-8 Correct??
From: divya_rathore on 13 May 2010 09:42 VS2008, 32 Bit Win XP In a class derived from CFrameWnd, I have an object of CDialogBar that needs to have certain controls on it. Among these controls would be 2 sliders, whose event handling is to be done in CFrameWnd derived class. How shall I go about this? class CFrameWndCustom : public CFrameWnd { CDialogBar m_wndDialogBar; // the CDialogBar object. } In CFrameWnd derived class's OnCreateClient, I have created the DialogBar using the above object like: //Create the DialogBar if (!m_wndDialogBar.Create(this, IDD_DIALOGBAR_CONTROL, CBRS_BOTTOM, IDD_DIALOGBAR_CONTROL)) { TRACE("Warning: Couldn't create DialogBar Control!\n"); return FALSE; } Here, IDD_DIALOGBAR_CONTROL is a dialog resource with Style as Child. After this, I drag-dropped a CSliderCtrl on the IDD_DIALOGBAR_CONTROL in Resource View. Now, how/where should I handle the CSliderCtrl's events? There would be 2 such slider controls. I finally need the values of the sliders in CFrameWndCustom class. best regards, Divya
From: divya_rathore on 14 May 2010 08:50
On May 13, 6:42 pm, divya_rathore <divyarath...(a)gmail.com> wrote: > VS2008, 32 Bit Win XP > > > Now, how/where should I handle the CSliderCtrl's events? There would > be 2 such slider controls. > > I finally need the values of the sliders in CFrameWndCustom class. > > best regards, > Divya I derived a class out of CDialogBar and handled the CSliderCtrl notifications there. So far works for me. ...this is just to help someone who faces similar issue. - divya |