Click here to Skip to main content
16,007,885 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ object pointers Pin
mirex21-May-04 1:16
mirex21-May-04 1:16 
General"int" to "CY" Pin
Hing20-May-04 21:26
Hing20-May-04 21:26 
GeneralRe: "int" to "CY" Pin
Maxwell Chen20-May-04 21:43
Maxwell Chen20-May-04 21:43 
GeneralRe: "int" to "CY" Pin
Hing20-May-04 21:44
Hing20-May-04 21:44 
GeneralRe: "int" to "CY" Pin
Maxwell Chen20-May-04 23:50
Maxwell Chen20-May-04 23:50 
GeneralRe: "int" to "CY" Pin
Hing20-May-04 23:52
Hing20-May-04 23:52 
GeneralModeless dialog problem Pin
krugger20-May-04 21:26
krugger20-May-04 21:26 
GeneralRe: Modeless dialog problem Pin
Ernesto D.20-May-04 22:36
Ernesto D.20-May-04 22:36 
im not much into MFC, but i think this can solve the problem:
i assume you are loosing the pointer to the dialog cause you are creating the object inside some function, therefore when the function exits, the pointer is no longer valid (a code sample would have helped).
make the pointer a member variable of the class where you want to manipulate the dialog (like CMainFrame), and then you can safely call its members. EG:

class CMainFrame
{
CMyDialogBar* m_pBar;

int OnCreate()
{
m_pBar=new CMyDialogBar;
m_pBar->Create();
}

void Whatever()
{
if(m_pBar!=NULL)
{
// you can access its public member here
}
}
};

this is of course only "sample" code, but should give you an idea of how to do it.
HTH
GeneralHTML help in Visual C++ project Pin
krugger20-May-04 20:51
krugger20-May-04 20:51 
GeneralRe: HTML help in Visual C++ project Pin
Dennis Gourjii21-May-04 3:11
Dennis Gourjii21-May-04 3:11 
GeneralRe: HTML help in Visual C++ project Pin
*Dreamz21-May-04 3:55
*Dreamz21-May-04 3:55 
GeneralHelp!automatically read the file Pin
jfk_lili20-May-04 19:56
jfk_lili20-May-04 19:56 
GeneralRe: Help!automatically read the file Pin
mirex20-May-04 21:23
mirex20-May-04 21:23 
GeneralRe: Help!automatically read the file Pin
Steve S21-May-04 0:29
Steve S21-May-04 0:29 
GeneralMenu Controls Pin
Eversman20-May-04 18:39
Eversman20-May-04 18:39 
GeneralRe: Menu Controls Pin
*Dreamz20-May-04 19:03
*Dreamz20-May-04 19:03 
Generalcompiler setting in command line. Pin
Anthony_Yio20-May-04 18:07
Anthony_Yio20-May-04 18:07 
GeneralRe: compiler setting in command line. Pin
bikram singh20-May-04 19:42
bikram singh20-May-04 19:42 
GeneralMFC MDI APP CRASHES Pin
MFC_R_O_O_K_I_E20-May-04 15:53
MFC_R_O_O_K_I_E20-May-04 15:53 
Generalinvoke doc/view from a dialog Pin
-alok-20-May-04 15:46
suss-alok-20-May-04 15:46 
GeneralRe: invoke doc/view from a dialog Pin
Johan Rosengren21-May-04 5:58
Johan Rosengren21-May-04 5:58 
QuestionCan I post a message to a dll from a dll? Pin
freehawk20-May-04 15:13
freehawk20-May-04 15:13 
AnswerRe: Can I post a message to a dll from a dll? Pin
bryce20-May-04 15:19
bryce20-May-04 15:19 
GeneralRe: Can I post a message to a dll from a dll? Pin
freehawk20-May-04 15:41
freehawk20-May-04 15:41 
GeneralRe: Can I post a message to a dll from a dll? Pin
bryce20-May-04 16:14
bryce20-May-04 16:14 

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.