Click to See Complete Forum and Search --> : how to pop up first?


Guyver
December 12th, 2003, 07:38 AM
Hi

Just a simple question for all you C++ greats out there :D
Im using visual studio .net (C++ MFC) and i was stuck on how do you create a new dialog box and make it pop up before the main dialog box? I'm trying to do i password on my program you see.

O and also how do you change the colour of the text in a button?

Thnxs for yer help

vicodin451
December 12th, 2003, 07:46 AM
Originally posted by Guyver
how do you create a new dialog box and make it pop up before the main dialog box?
Create the class if you're talking about a modal dialog (which I assume you are), you could call DoModal for the password dialog from the OnInitDialog of what you are calling the "main" dialog box. Or you could do it from earlier in the InitInstance of the CWinApp-derived class, than when the "main" dialog's DoModal is called.


O and also how do you change the colour of the text in a button?

This (http://www.codeguru.com/forum/showthread.php?s=&threadid=272226) might help; this (http://www.codeguru.com/forum/search.php?s=&action=showresults&searchid=1088913&sortby=lastpost&sortorder=descending) may also be useful...

Guyver
December 12th, 2003, 07:53 AM
Wooooo cheers m8 thanks for that. Now can can start fine tuning other bits of my prog

Again Thanks