Click here to Skip to main content
15,902,112 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: "Virtual" Command Prompt Pin
Stephen Hewitt13-Mar-10 18:23
Stephen Hewitt13-Mar-10 18:23 
QuestionModeless dialog closing when 'Enter' key is pressed? Pin
Spawn@Melmac13-Mar-10 8:05
Spawn@Melmac13-Mar-10 8:05 
AnswerRe: Modeless dialog closing when 'Enter' key is pressed? Pin
Spawn@Melmac13-Mar-10 8:17
Spawn@Melmac13-Mar-10 8:17 
QuestionSOCKET_ERROR when calling send method from seperate class Pin
Omar El Fata13-Mar-10 6:49
Omar El Fata13-Mar-10 6:49 
QuestionRe: SOCKET_ERROR when calling send method from seperate class Pin
CPallini13-Mar-10 6:56
mveCPallini13-Mar-10 6:56 
AnswerRe: SOCKET_ERROR when calling send method from seperate class Pin
Omar El Fata13-Mar-10 7:08
Omar El Fata13-Mar-10 7:08 
GeneralRe: SOCKET_ERROR when calling send method from seperate class Pin
Omar El Fata13-Mar-10 7:45
Omar El Fata13-Mar-10 7:45 
AnswerRe: SOCKET_ERROR when calling send method from seperate class Pin
krmed13-Mar-10 10:26
krmed13-Mar-10 10:26 
The problem is that when you do this:
CMainDlg* Main = new CMainDlg;Main->GetResults();
in your Game dialog, this creates a NEW INSTANCE of the main dialog - not the already existing one. This new one has not even done initialization of it's windows.

What you need to do is to make
CMainDlg* Main;
a member variable in your Game dialog, and then change the way you create the game dialog in the main dialog to:
Game* game = new Game;
game->Main = this;
game->Create(Game::IDD);
Now you'll find that Main (the member variable in your Game dialog actually points to the existing Main dialog.

Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

GeneralRe: SOCKET_ERROR when calling send method from seperate class Pin
Omar El Fata13-Mar-10 11:01
Omar El Fata13-Mar-10 11:01 
QuestionWindow class, caption Pin
trioum13-Mar-10 4:26
trioum13-Mar-10 4:26 
AnswerRe: Window class, caption Pin
Eugen Podsypalnikov13-Mar-10 4:34
Eugen Podsypalnikov13-Mar-10 4:34 
GeneralRe: Window class, caption Pin
trioum13-Mar-10 4:43
trioum13-Mar-10 4:43 
GeneralRe: Window class, caption Pin
Eugen Podsypalnikov13-Mar-10 12:58
Eugen Podsypalnikov13-Mar-10 12:58 
QuestionRe: Window class, caption Pin
David Crow13-Mar-10 5:20
David Crow13-Mar-10 5:20 
AnswerRe: Window class, caption Pin
ThatsAlok14-Mar-10 19:21
ThatsAlok14-Mar-10 19:21 
QuestionHow can use VB dll in VC++ code? Pin
Le@rner13-Mar-10 1:45
Le@rner13-Mar-10 1:45 
AnswerRe: How can use VB dll in VC++ code? Pin
LunaticFringe13-Mar-10 2:33
LunaticFringe13-Mar-10 2:33 
AnswerRe: How can use VB dll in VC++ code? Pin
ThatsAlok14-Mar-10 19:24
ThatsAlok14-Mar-10 19:24 
AnswerRe: How can use VB dll in VC++ code? Pin
Shivanand Gupta14-Mar-10 20:30
Shivanand Gupta14-Mar-10 20:30 
QuestionCalling vb dll functions in my vc code Pin
learningvisualc12-Mar-10 21:23
learningvisualc12-Mar-10 21:23 
AnswerRe: Calling vb dll functions in my vc code Pin
Shivanand Gupta13-Mar-10 0:36
Shivanand Gupta13-Mar-10 0:36 
AnswerRe: Calling vb dll functions in my vc code Pin
Shivanand Gupta13-Mar-10 0:51
Shivanand Gupta13-Mar-10 0:51 
QuestionStill problem with a class and function Pin
nah133712-Mar-10 21:20
nah133712-Mar-10 21:20 
AnswerRe: Still problem with a class and function Pin
Richard MacCutchan12-Mar-10 22:12
mveRichard MacCutchan12-Mar-10 22:12 
QuestionRe: Still problem with a class and function Pin
CPallini12-Mar-10 22:37
mveCPallini12-Mar-10 22:37 

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.