Click here to Skip to main content
15,909,898 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Get File Extension Pin
Le Quang Long27-Apr-12 15:10
Le Quang Long27-Apr-12 15:10 
GeneralRe: Get File Extension Pin
Randor 28-Apr-12 0:14
professional Randor 28-Apr-12 0:14 
AnswerRe: Get File Extension Pin
JohnCz29-Apr-12 4:28
JohnCz29-Apr-12 4:28 
GeneralRe: Get File Extension Pin
jkirkerx29-Apr-12 9:27
professionaljkirkerx29-Apr-12 9:27 
GeneralCALLING A NEW DIALOG Pin
Le Quang Long25-Apr-12 4:01
Le Quang Long25-Apr-12 4:01 
AnswerRe: CALLING A NEW DIALOG Pin
Albert Holguin25-Apr-12 4:15
professionalAlbert Holguin25-Apr-12 4:15 
GeneralRe: CALLING A NEW DIALOG Pin
JohnCz29-Apr-12 4:54
JohnCz29-Apr-12 4:54 
GeneralRe: CALLING A NEW DIALOG Pin
Maximilien25-Apr-12 5:28
Maximilien25-Apr-12 5:28 
I would do something like :

pre-requisite.
CLoginDialog: your login dialog.
CDataDialog; your main application dialog

The CDataDialog is the main application dialog (for example created via the wizard).

When the CDataDialog is created, you can call/create the login dialog in the OnInitDialog; if the login is valid, just continue, if it is invalid, you can either close the main application, or better continue but disable some stuff or not load the data.

For example ...
C++
BOOL Ctest_dialogDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

/// ....
	LoginDialog dlg;
	if ( dlg.DoModal() == IDCANCEL)
	{
		PostQuitMessage(42);
		return FALSE;
	}
	return TRUE;  // return TRUE  unless you set the focus to a control
}

Watched code never compiles.

GeneralRe: CALLING A NEW DIALOG Pin
Chris Meech25-Apr-12 7:30
Chris Meech25-Apr-12 7:30 
GeneralRe: CALLING A NEW DIALOG Pin
Le Quang Long27-Apr-12 15:17
Le Quang Long27-Apr-12 15:17 
GeneralRe: CALLING A NEW DIALOG Pin
Le Quang Long28-Apr-12 18:10
Le Quang Long28-Apr-12 18:10 
GeneralRe: CALLING A NEW DIALOG Pin
David Crow25-Apr-12 5:40
David Crow25-Apr-12 5:40 
GeneralRe: CALLING A NEW DIALOG Pin
Le Quang Long25-Apr-12 14:29
Le Quang Long25-Apr-12 14:29 
GeneralRe: CALLING A NEW DIALOG Pin
Le Quang Long25-Apr-12 14:30
Le Quang Long25-Apr-12 14:30 
GeneralRe: CALLING A NEW DIALOG Pin
Le Quang Long25-Apr-12 14:32
Le Quang Long25-Apr-12 14:32 
GeneralRe: CALLING A NEW DIALOG Pin
Richard MacCutchan25-Apr-12 21:16
mveRichard MacCutchan25-Apr-12 21:16 
Questionwhy need write itself hashtable? Pin
yu-jian24-Apr-12 20:27
yu-jian24-Apr-12 20:27 
AnswerRe: why need write itself hashtable? Pin
Richard MacCutchan24-Apr-12 22:34
mveRichard MacCutchan24-Apr-12 22:34 
QuestionSelecting median Pin
a1_shay24-Apr-12 3:12
a1_shay24-Apr-12 3:12 
GeneralRe: Selecting median Pin
Aescleal24-Apr-12 4:10
Aescleal24-Apr-12 4:10 
GeneralRe: Selecting median Pin
a1_shay24-Apr-12 4:32
a1_shay24-Apr-12 4:32 
AnswerRe: Selecting median Pin
Aescleal24-Apr-12 5:48
Aescleal24-Apr-12 5:48 
GeneralRe: Selecting median Pin
a1_shay24-Apr-12 10:12
a1_shay24-Apr-12 10:12 
GeneralRe: Selecting median Pin
Stefan_Lang27-Apr-12 6:54
Stefan_Lang27-Apr-12 6:54 
AnswerRe: Selecting median Pin
David Crow24-Apr-12 6:01
David Crow24-Apr-12 6:01 

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.