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

C / C++ / MFC

 
GeneralRe: Signals and Threads debugging... Pin
-=jarl=-4-Feb-03 10:41
-=jarl=-4-Feb-03 10:41 
GeneralRe: Signals and Threads debugging... Pin
Alvaro Mendez4-Feb-03 10:52
Alvaro Mendez4-Feb-03 10:52 
GeneralRe: Signals and Threads debugging... Pin
-=jarl=-4-Feb-03 11:08
-=jarl=-4-Feb-03 11:08 
GeneralRe: Signals and Threads debugging... Pin
-=jarl=-4-Feb-03 11:26
-=jarl=-4-Feb-03 11:26 
GeneralRe: Signals and Threads debugging... Pin
Alvaro Mendez4-Feb-03 13:26
Alvaro Mendez4-Feb-03 13:26 
GeneralRe: draw rectangle selection Pin
Roger Allen4-Feb-03 5:59
Roger Allen4-Feb-03 5:59 
Generaldialog refresh Pin
Anonymous4-Feb-03 5:33
Anonymous4-Feb-03 5:33 
GeneralRe: dialog refresh Pin
Alvaro Mendez4-Feb-03 5:57
Alvaro Mendez4-Feb-03 5:57 
One way is to move the code that does the checks out of the OnInitDialog function and into it a message handler that you post to yourself. Let me show you what I mean:

#define WM_AFTER_SHOWING	WM_USER + 769
....
 
BEGIN_MESSAGE_MAP(CMyDlg, CDialog)
	//{{AFX_MSG_MAP(CMyDlg)
	...
	//}}AFX_MSG_MAP
	ON_MESSAGE(WM_AFTER_SHOWING, OnAfterShowing)
END_MESSAGE_MAP()
 
BOOL CMyDlg::OnInitDialog()
{
	CDialog::OnInitDialog();
 
	// Post a message to run the code that does the checks
	PostMessage(WM_AFTER_SHOWING);
 	
	return TRUE;  // return TRUE  unless you set the focus to a control
}
 
LONG CMyDlg::OnAfterShowing(UINT, LONG)  // add this to the header file also
{
	// Put your code here
 
	return 0;
}


Regards,
Alvaro


All you need in this life is ignorance and confidence, and then success is sure. -- Mark Twain
GeneralRe: dialog refresh Pin
Abbas_Riazi4-Feb-03 7:06
professionalAbbas_Riazi4-Feb-03 7:06 
GeneralRe: dialog refresh Pin
Alvaro Mendez4-Feb-03 8:10
Alvaro Mendez4-Feb-03 8:10 
GeneralRe: dialog refresh Pin
Anonymous4-Feb-03 21:42
Anonymous4-Feb-03 21:42 
GeneralRe: dialog refresh Pin
Abbas_Riazi5-Feb-03 0:26
professionalAbbas_Riazi5-Feb-03 0:26 
GeneralRe: dialog refresh Pin
Anonymous4-Feb-03 21:41
Anonymous4-Feb-03 21:41 
GeneralMSDN annoying prompts Pin
ed welch4-Feb-03 5:14
ed welch4-Feb-03 5:14 
Generaldraw rectangle selection Pin
jeremysay4-Feb-03 5:10
jeremysay4-Feb-03 5:10 
GeneralRe: draw rectangle selection Pin
Michael Dunn4-Feb-03 5:18
sitebuilderMichael Dunn4-Feb-03 5:18 
GeneralRe: draw rectangle selection Pin
jeremysay4-Feb-03 5:51
jeremysay4-Feb-03 5:51 
GeneralMFC... WM_PAINT message Pin
Mciccarone3574-Feb-03 4:48
Mciccarone3574-Feb-03 4:48 
GeneralRe: MFC... WM_PAINT message Pin
Roger Allen4-Feb-03 6:02
Roger Allen4-Feb-03 6:02 
GeneralRe: MFC... WM_PAINT message Pin
357magnum4-Feb-03 10:46
357magnum4-Feb-03 10:46 
GeneralRe: MFC... WM_PAINT message Pin
Paul M Watt4-Feb-03 20:42
mentorPaul M Watt4-Feb-03 20:42 
GeneralVisual C++ Pin
Rage4-Feb-03 4:45
professionalRage4-Feb-03 4:45 
Generalchange html help files to windows help files Pin
includeh104-Feb-03 4:25
includeh104-Feb-03 4:25 
GeneralRe: change html help files to windows help files Pin
Roger Allen4-Feb-03 6:06
Roger Allen4-Feb-03 6:06 
GeneralRe: change html help files to windows help files Pin
Iain Clarke, Warrior Programmer4-Feb-03 6:43
Iain Clarke, Warrior Programmer4-Feb-03 6:43 

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.