Click here to Skip to main content
15,915,636 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralWin32 Programming Book Pin
Andy Moore11-Feb-05 9:15
Andy Moore11-Feb-05 9:15 
GeneralRe: Win32 Programming Book Pin
rocky_pulley11-Feb-05 9:32
rocky_pulley11-Feb-05 9:32 
GeneralRe: Win32 Programming Book Pin
Anonymous11-Feb-05 12:06
Anonymous11-Feb-05 12:06 
GeneralRe: Win32 Programming Book Pin
Andy Moore14-Feb-05 2:57
Andy Moore14-Feb-05 2:57 
Generaloleacc link issues Pin
greekgoddj11-Feb-05 7:02
greekgoddj11-Feb-05 7:02 
GeneralRe: oleacc link issues Pin
greekgoddj13-Feb-05 22:31
greekgoddj13-Feb-05 22:31 
GeneralReading Raw DVD-ROM Pin
Sonix11-Feb-05 6:45
Sonix11-Feb-05 6:45 
GeneralShow dialog window in PreCreateWindow(..) failed :( Pin
bilas11-Feb-05 6:39
bilas11-Feb-05 6:39 
I want to show dialog window (with image) for 3 seconds befor my project will start.
I use Timer with aim to destroy dialog window in 3 seconds

<br />
<br />
BOOL CRightHTMLView::PreCreateWindow(CREATESTRUCT& cs)<br />
{<br />
	<br />
	dlg = new CDialog(IDD_ABOUTBOX, this); // dlg is a member variable of CRightHTMLView<br />
	<br />
	MSG message;<br />
	int i=0;<br />
	m_nTimer = SetTimer(1, 100, NULL); // Here Debug Assertion Failed!<br />
	ASSERT(m_nTimer!=0);<br />
	if(i==0)<br />
	{<br />
		dlg->DoModal();<br />
		if(::PeekMessage(&message, NULL, 0, 0, PM_REMOVE)) {<br />
			::TranslateMessage(&message);<br />
			::DispatchMessage(&message);<br />
		}<br />
		i = 1;<br />
	}<br />
	return CHtmlView::PreCreateWindow(cs);<br />
}<br />
<br />
void CRightHTMLView::OnTimer(UINT nIDEvent)<br />
{<br />
	// TODO: Add your message handler code here and/or call default<br />
	Sleep(3000);<br />
	dlg->DestroyWindow();<br />
	KillTimer(1);<br />
<br />
	CHtmlView::OnTimer(nIDEvent);<br />
}<br />
<br />

What is wrong in my function(s)? If anybody knows how to display image in other way (not in dialog window), please
share here with your ideas. I would appreciate your co-operation.
Aleksey.
GeneralRe: Show dialog window in PreCreateWindow(..) failed :( Pin
Michael Dunn11-Feb-05 16:37
sitebuilderMichael Dunn11-Feb-05 16:37 
GeneralAccess Database Report Pin
Tom Wright11-Feb-05 6:05
Tom Wright11-Feb-05 6:05 
GeneralRe: Access Database Report Pin
Anonymous11-Feb-05 12:07
Anonymous11-Feb-05 12:07 
GeneralRead file, write to array, find min and max Pin
dr.eu11-Feb-05 5:46
dr.eu11-Feb-05 5:46 
GeneralRe: Read file, write to array, find min and max Pin
David Crow11-Feb-05 6:00
David Crow11-Feb-05 6:00 
GeneralRe: Read file, write to array, find min and max Pin
dr.eu11-Feb-05 6:05
dr.eu11-Feb-05 6:05 
GeneralRe: Read file, write to array, find min and max Pin
rocky_pulley11-Feb-05 6:09
rocky_pulley11-Feb-05 6:09 
GeneralRe: Read file, write to array, find min and max Pin
dr.eu11-Feb-05 6:14
dr.eu11-Feb-05 6:14 
GeneralRe: Read file, write to array, find min and max Pin
David Crow11-Feb-05 6:23
David Crow11-Feb-05 6:23 
GeneralRe: Read file, write to array, find min and max Pin
dr.eu11-Feb-05 6:35
dr.eu11-Feb-05 6:35 
GeneralRe: Read file, write to array, find min and max Pin
David Crow11-Feb-05 6:51
David Crow11-Feb-05 6:51 
GeneralRe: Read file, write to array, find min and max Pin
dr.eu11-Feb-05 7:08
dr.eu11-Feb-05 7:08 
GeneralRe: Read file, write to array, find min and max Pin
Mattias G11-Feb-05 6:32
Mattias G11-Feb-05 6:32 
GeneralRe: Read file, write to array, find min and max Pin
rocky_pulley11-Feb-05 6:35
rocky_pulley11-Feb-05 6:35 
GeneralRe: Read file, write to array, find min and max Pin
dr.eu11-Feb-05 6:38
dr.eu11-Feb-05 6:38 
GeneralRe: Read file, write to array, find min and max Pin
rocky_pulley11-Feb-05 6:41
rocky_pulley11-Feb-05 6:41 
GeneralRe: Read file, write to array, find min and max Pin
dr.eu11-Feb-05 6:49
dr.eu11-Feb-05 6:49 

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.