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

C / C++ / MFC

 
GeneralChild window resizing problem!! Pin
17-May-01 23:22
suss17-May-01 23:22 
GeneralRe: Child window resizing problem!! Pin
Tomasz Sowinski18-May-01 0:23
Tomasz Sowinski18-May-01 0:23 
GeneralRe: Child window resizing problem!! Pin
18-May-01 0:35
suss18-May-01 0:35 
GeneralRe: Child window resizing problem!! Pin
Tomasz Sowinski18-May-01 0:43
Tomasz Sowinski18-May-01 0:43 
QuestionHow is it possible to access to global variable in project ? Pin
17-May-01 22:34
suss17-May-01 22:34 
AnswerRe: How is it possible to access to global variable in project ? Pin
17-May-01 22:39
suss17-May-01 22:39 
AnswerRe: How is it possible to access to global variable in project ? Pin
18-May-01 4:13
suss18-May-01 4:13 
GeneralRe: How is it possible to access to global variable in project ? Pin
18-May-01 18:52
suss18-May-01 18:52 
Global variables tend to be considered bad programming....and, they can be hard to keep up with.

If you need something to store temporary data, say the state of a dialog or something and you want to be able to access it anywhere (Views, threads, etc.)

You might simply consider storing it in the MainFrame class. It is easy to get a pointer to the Mainframe from pretty much anywhere.

Example:

CMainFrame *pMF = (CMainFrame*)AfxGetApp()->m_pMainWnd;
BOOL bDialogState = pMF->bDlState;

Hope this helps........
Cool | :cool:
GeneralRe: How is it possible to access to global variable in project ? Pin
18-May-01 20:18
suss18-May-01 20:18 
GeneralWhere is the CMainFrame in dialog project ??? Pin
19-May-01 11:27
suss19-May-01 11:27 
GeneralRe: Where is the CMainFrame in dialog project ??? Pin
Christian Graus19-May-01 13:04
protectorChristian Graus19-May-01 13:04 
GeneralRe: Where is the CMainFrame in dialog project ??? Pin
Christian Graus19-May-01 13:12
protectorChristian Graus19-May-01 13:12 
GeneralPlease !! HELP ME !! I Don't SUCCESS !!! ??? Pin
19-May-01 20:40
suss19-May-01 20:40 
GeneralRe: Please !! HELP ME !! I Don't SUCCESS !!! ??? Pin
Christian Graus19-May-01 21:59
protectorChristian Graus19-May-01 21:59 
AnswerRe: How is it possible to access to global variable in project ? Pin
#realJSOP20-May-01 2:40
professional#realJSOP20-May-01 2:40 
QuestionHow to pass the firewall?? Pin
realyxm17-May-01 22:08
realyxm17-May-01 22:08 
QuestionCan anyone erase the background bitmap? Pin
17-May-01 17:05
suss17-May-01 17:05 
AnswerRe: Can anyone erase the background bitmap? Pin
Christian Graus17-May-01 17:43
protectorChristian Graus17-May-01 17:43 
QuestionAny ideas on reducing link times? Pin
Chris Hafey17-May-01 15:18
Chris Hafey17-May-01 15:18 
AnswerRe: Any ideas on reducing link times? Pin
Anders Molin17-May-01 23:57
professionalAnders Molin17-May-01 23:57 
GeneralRe: Any ideas on reducing link times? Pin
Gerry18-May-01 3:30
Gerry18-May-01 3:30 
GeneralRe: Any ideas on reducing link times? Pin
18-May-01 4:52
suss18-May-01 4:52 
GeneralPrinting under MFC - ARGH !!! Pin
Christian Graus17-May-01 14:57
protectorChristian Graus17-May-01 14:57 
GeneralRe: Printing under MFC - ARGH !!! Pin
l a u r e n18-May-01 12:51
l a u r e n18-May-01 12:51 
GeneralRe: Printing under MFC - ARGH !!! Pin
Christian Graus18-May-01 12:59
protectorChristian Graus18-May-01 12:59 

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.