Click here to Skip to main content
15,905,593 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: needing help in algorithm Pin
Scorpio12-May-06 0:21
Scorpio12-May-06 0:21 
GeneralRe: needing help in algorithm Pin
ThatsAlok12-May-06 2:14
ThatsAlok12-May-06 2:14 
GeneralRe: needing help in algorithm Pin
Bob Flynn11-May-06 6:38
Bob Flynn11-May-06 6:38 
AnswerRe: needing help in algorithm Pin
Stephen Hewitt11-May-06 13:49
Stephen Hewitt11-May-06 13:49 
QuestionCTreeCtrl and WM_LBUTTONUP Pin
LukeV11-May-06 3:25
LukeV11-May-06 3:25 
AnswerRe: CTreeCtrl and WM_LBUTTONUP Pin
Cedric Moonen11-May-06 3:47
Cedric Moonen11-May-06 3:47 
AnswerRe: CTreeCtrl and WM_LBUTTONUP Pin
Michael Dunn11-May-06 6:09
sitebuilderMichael Dunn11-May-06 6:09 
QuestionGUI frame work Pin
Dennis L11-May-06 2:31
Dennis L11-May-06 2:31 
Hi all!

I'm working on a GUI frame work using Win32 C++. This GUI is based on classes and inheritance. I have stacked on something that might seem to be a little stupid! What's the best way to have access to the controls the most, and other vars of a window from another window!

For example:

// File Window.h
class CWindow
{
// Functions
public:
// Vars
private:
// Other vars
protected:
}

// File status.h
class CStatusBar : CWindow
{
// Functions
public:
// Vars
private:
// Other vars
protected:

}

// File MainFrame.h
class CMainFrame : CWindow
{
// Functions
public:
// Vars
private:
// Other vars
protected:
// Status bar control
CStatusBar* sb;
}

// File dialog.h
class CDialogBox : CWindow
{
// Functions
public:
// Vars
private:
// Other vars
protected:
}

I want the members of CDialogBox to have access to the status bar of the CMainFrame, even if the CMainframe is the parent of the parent of the CDialogBox
I don't want to use MFC way or a way like: Constructor(CWindow* parent, ..), or global variables.
If there's no such a way then what of the ways that I mensioned (and I don't like) would be more professional??

Thanks very much On whatever reply!
AnswerRe: GUI frame work Pin
Cedric Moonen11-May-06 2:36
Cedric Moonen11-May-06 2:36 
GeneralRe: GUI frame work Pin
Dennis L11-May-06 2:43
Dennis L11-May-06 2:43 
AnswerRe: GUI frame work Pin
Maximilien11-May-06 3:47
Maximilien11-May-06 3:47 
Question[Message Deleted] Pin
Anu_Bala11-May-06 2:14
Anu_Bala11-May-06 2:14 
AnswerRe: problem in if loop Pin
_AnsHUMAN_ 11-May-06 2:19
_AnsHUMAN_ 11-May-06 2:19 
AnswerRe: problem in if loop Pin
Russell'11-May-06 2:20
Russell'11-May-06 2:20 
GeneralRe: problem in if loop Pin
Hamid_RT11-May-06 4:51
Hamid_RT11-May-06 4:51 
GeneralRe: problem in if loop Pin
Russell'11-May-06 5:23
Russell'11-May-06 5:23 
AnswerRe: problem in if loop Pin
Cedric Moonen11-May-06 2:21
Cedric Moonen11-May-06 2:21 
AnswerRe: [Message Deleted] Pin
Cedric Moonen11-May-06 2:30
Cedric Moonen11-May-06 2:30 
GeneralRe: [Message Deleted] Pin
toxcct11-May-06 2:40
toxcct11-May-06 2:40 
GeneralRe: [Message Deleted] Pin
Bob Flynn11-May-06 3:57
Bob Flynn11-May-06 3:57 
GeneralRe: [Message Deleted] Pin
toxcct11-May-06 4:04
toxcct11-May-06 4:04 
GeneralRe: [Message Deleted] Pin
Cedric Moonen11-May-06 4:07
Cedric Moonen11-May-06 4:07 
GeneralRe: [Message Deleted] Pin
toxcct11-May-06 4:09
toxcct11-May-06 4:09 
GeneralRe: [Message Deleted] Pin
Maxwell Chen11-May-06 6:37
Maxwell Chen11-May-06 6:37 
GeneralRe: [Message Deleted] Pin
toxcct11-May-06 6:38
toxcct11-May-06 6:38 

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.