Click here to Skip to main content
16,004,944 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralProblem with menu Pin
1-May-02 0:23
suss1-May-02 0:23 
GeneralRe: Problem with menu Pin
Matt Philmon1-May-02 1:54
Matt Philmon1-May-02 1:54 
GeneralRe: Problem with menu Pin
Renjith Ramachandran1-May-02 7:36
Renjith Ramachandran1-May-02 7:36 
GeneralPC Camera Capture Pin
Sameer Maggon30-Apr-02 21:41
Sameer Maggon30-Apr-02 21:41 
GeneralRe: PC Camera Capture Pin
Derek Lakin30-Apr-02 22:27
Derek Lakin30-Apr-02 22:27 
GeneralRe: PC Camera Capture Pin
Sameer Maggon2-May-02 18:24
Sameer Maggon2-May-02 18:24 
GeneralRe: PC Camera Capture Pin
Derek Lakin2-May-02 19:54
Derek Lakin2-May-02 19:54 
GeneralNeed Help with Dialogs Pin
Brind_Foin30-Apr-02 21:03
Brind_Foin30-Apr-02 21:03 
Hi everybody! Confused | :confused:

I need help to achieve a project at work.

My app is a MFC dialog based. I need to access variables and control between 3 modeless dialog. How can I do that. I've tried everything I know.
I have already a lot of work done in both 3 dialogs...

Let me explain what I've done.

- I have 3 templates : IDD_MainDlg , IDD_Dialog1 , IDD_Dialog2
- IDD_MainDlg's class is CMainDlg (Created with the wizard at startup...)
- IDD_Dialog1's class is CDialog1 and then IDD_Dialog2 is CDialog2.
- I've declared :
CDialog1 m_Dialog1;
CDialog2 m_Dialog2;
inside the CMainDlg header file.
- I've created :
m_Dialog1.Create(IDD_Dialog1,this);
m_Dialog2.Create(IDD_Dialog2,this);
m_Dialog1.ShowWindow(SW_SHOW);
m_Dialog2.ShowWindow(SW_SHOW);
inside the OnInitDialog() of CMainDlg;

Let say that I have a CSliderCtrl object called 'm_Slider' declared inside the CDialog2 header file. When I'm in CMainDlg, I can access this variable by typing m_Dialog2.m_Slider without problem or error. Where I'm confused is when I'm inside CDialog1 and want to access m_Slider.

This is the 'best one' of all codes I've tried :
CDialog2* pWnd;
CMainDlg pdlg;
pWnd = &pdlg.m_Dialog2;
pWnd->m_Slider.SetPos(0);

I always get an assertion error. When debugging it always say that there is no handle

_AFXCMN_INLINE void CSliderCtrl::SetPos(int nPos)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TBM_SETPOS, TRUE, nPos); }

(m_hWnd is always 0x00000000 )

What can I do to get all the things working well ?!?!?! WTF | :WTF:
I have a lot of data to pass between theses three dialogs so...


Best regards,
Brind



If coding looks like drugs... I should go on therapy...
GeneralRe: Need Help with Dialogs Pin
Tom Archer30-Apr-02 22:33
Tom Archer30-Apr-02 22:33 
GeneralRe: Need Help with Dialogs Pin
Brind_Foin1-May-02 3:13
Brind_Foin1-May-02 3:13 
GeneralRe: Need Help with Dialogs Pin
Tom Archer1-May-02 3:23
Tom Archer1-May-02 3:23 
GeneralCFtpConnection::SetCurrentDirectory() Pin
Tony Fontenot30-Apr-02 20:16
Tony Fontenot30-Apr-02 20:16 
GeneralRe: CFtpConnection::SetCurrentDirectory() Pin
Tom Archer30-Apr-02 21:02
Tom Archer30-Apr-02 21:02 
GeneralRe: CFtpConnection::SetCurrentDirectory() Pin
Joao Vaz30-Apr-02 21:24
Joao Vaz30-Apr-02 21:24 
GeneralRe: CFtpConnection::SetCurrentDirectory() Pin
Tony Fontenot1-May-02 10:20
Tony Fontenot1-May-02 10:20 
QuestionHow can i use explorer's functions in my program? Pin
xsword30-Apr-02 20:07
xsword30-Apr-02 20:07 
AnswerRe: How can i use explorer's functions in my program? Pin
loket30-Apr-02 23:37
loket30-Apr-02 23:37 
GeneralCFormView question ... Pin
Hadi Rezaee30-Apr-02 19:13
Hadi Rezaee30-Apr-02 19:13 
GeneralRe: CFormView question ... Pin
Swinefeaster30-Apr-02 20:02
Swinefeaster30-Apr-02 20:02 
GeneralRe: CFormView question ... Pin
Hadi Rezaee30-Apr-02 20:05
Hadi Rezaee30-Apr-02 20:05 
GeneralRe: CFormView question ... Pin
Tom Archer30-Apr-02 21:05
Tom Archer30-Apr-02 21:05 
GeneralRe: CFormView question ... Pin
Hadi Rezaee30-Apr-02 21:16
Hadi Rezaee30-Apr-02 21:16 
GeneralRe: CFormView question ... Pin
Tom Archer30-Apr-02 22:26
Tom Archer30-Apr-02 22:26 
GeneralPutting an OLE or ActiveX in CView ... Pin
Hadi Rezaee30-Apr-02 19:02
Hadi Rezaee30-Apr-02 19:02 
GeneralRe: Putting an OLE or ActiveX in CView ... Pin
Mazdak1-May-02 0:32
Mazdak1-May-02 0:32 

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.