Click here to Skip to main content
15,918,742 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Purify or BoundsChecker? Pin
dahicke1-Apr-03 13:55
dahicke1-Apr-03 13:55 
AnswerRe: Purify or BoundsChecker? Pin
Taka Muraoka1-Apr-03 13:58
Taka Muraoka1-Apr-03 13:58 
AnswerRe: Purify or BoundsChecker? Pin
Mustafa Demirhan1-Apr-03 21:20
Mustafa Demirhan1-Apr-03 21:20 
GeneralBN_CLICKED Pin
lucy1-Apr-03 11:52
lucy1-Apr-03 11:52 
GeneralRe: BN_CLICKED Pin
Gary R. Wheeler1-Apr-03 14:02
Gary R. Wheeler1-Apr-03 14:02 
GeneralRe: BN_CLICKED Pin
lucy2-Apr-03 5:22
lucy2-Apr-03 5:22 
GeneralMDI maximized & restored Pin
Brian Shifrin1-Apr-03 11:50
Brian Shifrin1-Apr-03 11:50 
GeneralPointer access Pin
Gabor Kalman1-Apr-03 11:13
Gabor Kalman1-Apr-03 11:13 
Here are two code fragments.
I would like to understand what is the problem with the second one?
It is almost identical to the first one, except I wanted to use
a "pointer access". (e.g: CDlg* p_dlg; p_dlg-> . . .)

// The following code fragment works OK:
//=================================================
// this is in MainFrm.h:
#include "Dlg.h"

public:
CDlg dlg;

//----------------------------------------------------
// this is in MainFrm.cpp:

void CMainFrame::OnShowDlg()
{
dlg.Create(IDD_DLG,this);
dlg.SetWindowPos(&wndTop,10,10,20,10,SWP_SHOWWINDOW);
dlg.ShowWindow(SW_SHOW);
}

*********************


//The following code fragment compiles OK
//but the modeless window does not show:
//===========================================

// this is in MainFrm.h:
#include "Dlg.h"

public:
CDlg* p_dlg; //pointer !!

//----------------------------------------------------
// this is in MainFrm.cpp:

void CMainFrame::OnShowDlg()
{
p_dlg->Create(IDD_DLG,this);
p_dlg_SetWindowPos(&wndTop,10,10,20,10,SWP_SHOWWINDOW);
p_dlg->ShowWindow(SW_SHOW); //will NOT show!!!

Thank you:



Gabor Kalman
Kalman_G@MSN.COM

GeneralRe: Pointer access Pin
Dave Bryant1-Apr-03 11:29
Dave Bryant1-Apr-03 11:29 
GeneralSize of dialog in resource Pin
JGranborg1-Apr-03 10:56
JGranborg1-Apr-03 10:56 
GeneralRe: Size of dialog in resource Pin
Gary R. Wheeler1-Apr-03 14:08
Gary R. Wheeler1-Apr-03 14:08 
GeneralDynamic Arrays and Array sizes Pin
einst9921-Apr-03 10:41
einst9921-Apr-03 10:41 
GeneralRe: Dynamic Arrays and Array sizes Pin
Chris Losinger1-Apr-03 10:49
professionalChris Losinger1-Apr-03 10:49 
GeneralRe: Dynamic Arrays and Array sizes Pin
einst9921-Apr-03 11:33
einst9921-Apr-03 11:33 
GeneralRe: Dynamic Arrays and Array sizes Pin
Nick Parker1-Apr-03 11:56
protectorNick Parker1-Apr-03 11:56 
GeneralRe: Dynamic Arrays and Array sizes Pin
einst9921-Apr-03 14:12
einst9921-Apr-03 14:12 
GeneralRe: Dynamic Arrays and Array sizes Pin
Nick Parker1-Apr-03 14:55
protectorNick Parker1-Apr-03 14:55 
GeneralRe: Dynamic Arrays and Array sizes Pin
Dave Bryant1-Apr-03 10:49
Dave Bryant1-Apr-03 10:49 
GeneralRe: Dynamic Arrays and Array sizes Pin
John R. Shaw2-Apr-03 11:10
John R. Shaw2-Apr-03 11:10 
Questioncannot run on windows95?? Pin
lucy1-Apr-03 9:40
lucy1-Apr-03 9:40 
AnswerRe: cannot run on windows95?? Pin
Chris Losinger1-Apr-03 9:42
professionalChris Losinger1-Apr-03 9:42 
GeneralRe: cannot run on windows95?? Pin
lucy1-Apr-03 9:43
lucy1-Apr-03 9:43 
GeneralRe: cannot run on windows95?? Pin
Joan M1-Apr-03 19:49
professionalJoan M1-Apr-03 19:49 
Generalgetting the list of standard key events for a CTreeCtrl Pin
Stephane Routelous1-Apr-03 9:31
Stephane Routelous1-Apr-03 9:31 
QuestionMultiple FramWnds in an SDI App? Pin
Ender16181-Apr-03 8:42
Ender16181-Apr-03 8:42 

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.