Click here to Skip to main content
15,914,780 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralUI design...! Pin
Feroz R12-Jan-05 2:20
Feroz R12-Jan-05 2:20 
GeneralRe: UI design...! Pin
Selvam R12-Jan-05 2:46
professionalSelvam R12-Jan-05 2:46 
GeneralCStatusBar help (new to VC++) Pin
LighthouseJ12-Jan-05 2:18
LighthouseJ12-Jan-05 2:18 
GeneralRe: CStatusBar help (new to VC++) Pin
RChin12-Jan-05 2:49
RChin12-Jan-05 2:49 
GeneralRe: CStatusBar help (new to VC++) Pin
LighthouseJ12-Jan-05 3:00
LighthouseJ12-Jan-05 3:00 
GeneralRe: CStatusBar help (new to VC++) Pin
Antony M Kancidrowski12-Jan-05 4:35
Antony M Kancidrowski12-Jan-05 4:35 
GeneralRe: CStatusBar help (new to VC++) Pin
LighthouseJ12-Jan-05 7:22
LighthouseJ12-Jan-05 7:22 
GeneralRe: CStatusBar help (new to VC++) Pin
Antony M Kancidrowski12-Jan-05 14:11
Antony M Kancidrowski12-Jan-05 14:11 
LighthouseJ wrote:
But wouldn't that create another window?
My intension was to give an example of how to access a non-static member function. Sorry if this was confusing.


OK given the information you have supplied.

The problem is that m_pMainWnd is a pointer to a CWnd object. You need to cast it to a C489guiFrame object.

You can either do

C489guiFrame* pFrame = reinterpret_cast<C489guiFrame*>(m_pMainWnd);<br />
ASSERT(pFrame != NULL);


from within the CWinApp derived class

or

C489guiFrame* pFrame = reinterpret_cast<C489guiFrame*>(AfxGetMainWnd());<br />
ASSERT(pFrame != NULL);


from other classes

then use pFrame to call its member function

pFrame->setStatusBarText(sizeInfo);


Ant.

I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return!
- David Walliams (Little Britain)

GeneralDisabling MRU List Pin
Aamir Butt11-Jan-05 23:20
Aamir Butt11-Jan-05 23:20 
GeneralRe: Disabling MRU List Pin
Selvam R12-Jan-05 2:03
professionalSelvam R12-Jan-05 2:03 
GeneralRe: Disabling MRU List Pin
Aamir Butt12-Jan-05 16:48
Aamir Butt12-Jan-05 16:48 
GeneralCapturing and stretching image Pin
José Luis Sogorb11-Jan-05 23:07
José Luis Sogorb11-Jan-05 23:07 
GeneralRe: Capturing and stretching image Pin
Selvam R12-Jan-05 2:08
professionalSelvam R12-Jan-05 2:08 
GeneralRe: Capturing and stretching image Pin
José Luis Sogorb12-Jan-05 6:53
José Luis Sogorb12-Jan-05 6:53 
GeneralCreateProcess and process groups Pin
ionzarate11-Jan-05 22:55
ionzarate11-Jan-05 22:55 
GeneralRe: CreateProcess and process groups Pin
Blake Miller12-Jan-05 5:46
Blake Miller12-Jan-05 5:46 
GeneralAccess violation reading location 0xcdcdcddd. Pin
aj168211-Jan-05 22:31
aj168211-Jan-05 22:31 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
ThatsAlok11-Jan-05 23:53
ThatsAlok11-Jan-05 23:53 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
aj168212-Jan-05 0:45
aj168212-Jan-05 0:45 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
Cedric Moonen12-Jan-05 1:03
Cedric Moonen12-Jan-05 1:03 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
aj168212-Jan-05 1:13
aj168212-Jan-05 1:13 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
Cedric Moonen12-Jan-05 1:24
Cedric Moonen12-Jan-05 1:24 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
ThatsAlok12-Jan-05 1:23
ThatsAlok12-Jan-05 1:23 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
digwizfox13-Jan-05 6:49
digwizfox13-Jan-05 6:49 
GeneralRe: Access violation reading location 0xcdcdcddd. Pin
aj168213-Jan-05 7:19
aj168213-Jan-05 7:19 

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.