Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionmodeless dialog & threads Pin
Peter Weyzen22-Sep-07 17:31
Peter Weyzen22-Sep-07 17:31 
QuestionRe: modeless dialog & threads Pin
Hamed Musavi22-Sep-07 23:31
Hamed Musavi22-Sep-07 23:31 
AnswerRe: modeless dialog & threads Pin
Mark Salsbery23-Sep-07 8:24
Mark Salsbery23-Sep-07 8:24 
QuestionRe: modeless dialog & threads Pin
David Crow23-Sep-07 9:06
David Crow23-Sep-07 9:06 
AnswerRe: modeless dialog & threads Pin
Mark Salsbery23-Sep-07 9:24
Mark Salsbery23-Sep-07 9:24 
GeneralRe: modeless dialog & threads Pin
Peter Weyzen23-Sep-07 10:18
Peter Weyzen23-Sep-07 10:18 
GeneralRe: modeless dialog & threads Pin
Mark Salsbery23-Sep-07 10:32
Mark Salsbery23-Sep-07 10:32 
GeneralThinking is overrated. Pin
Stephen Hewitt23-Sep-07 15:07
Stephen Hewitt23-Sep-07 15:07 
Mark Salsbery wrote:
After lunch and thinking about it, if your window displays, then the thread
it was created on must have a message loop.


I suggest you stop thinking so hard. Try this program:
// Win32Dialog.cpp : Defines the entry point for the application.
//
 
#include "stdafx.h"
#include "resource.h"
 
INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	return FALSE;
}
 
int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
 	HWND hDlg = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), NULL, &DialogProc);
	ShowWindow(hDlg, SW_SHOWNORMAL);
 
	Sleep(10000);
 
	return 0;
}


There is no message pump but the window displays.


Steve

GeneralRe: Thinking is overrated. Pin
Mark Salsbery23-Sep-07 15:33
Mark Salsbery23-Sep-07 15:33 
AnswerRe: modeless dialog & threads Pin
Mark Salsbery23-Sep-07 9:43
Mark Salsbery23-Sep-07 9:43 
GeneralRe: modeless dialog & threads Pin
David Crow23-Sep-07 10:10
David Crow23-Sep-07 10:10 
GeneralRe: modeless dialog & threads Pin
Mark Salsbery23-Sep-07 10:27
Mark Salsbery23-Sep-07 10:27 
GeneralRe: modeless dialog & threads Pin
Peter Weyzen23-Sep-07 10:15
Peter Weyzen23-Sep-07 10:15 
QuestionUnable to specify CESetup DLL in VS2005 Smart Device CAB project - Pin
yudhisthira22-Sep-07 15:33
yudhisthira22-Sep-07 15:33 
QuestionOpenRAID challenge - little off topic Pin
Vaclav_22-Sep-07 6:56
Vaclav_22-Sep-07 6:56 
AnswerRe: OpenRAID challenge - little off topic Pin
carrivick22-Sep-07 19:29
carrivick22-Sep-07 19:29 
GeneralRe: OpenRAID challenge - little off topic Pin
Vaclav_23-Sep-07 4:35
Vaclav_23-Sep-07 4:35 
Questiongraphics program Pin
Sai Yasodharan22-Sep-07 6:18
Sai Yasodharan22-Sep-07 6:18 
AnswerRe: graphics program Pin
nbugalia22-Sep-07 7:00
nbugalia22-Sep-07 7:00 
QuestionRe: graphics program Pin
Sai Yasodharan23-Sep-07 5:33
Sai Yasodharan23-Sep-07 5:33 
AnswerRe: graphics program Pin
bob1697223-Sep-07 7:16
bob1697223-Sep-07 7:16 
AnswerRe: graphics program Pin
Hamid_RT22-Sep-07 8:28
Hamid_RT22-Sep-07 8:28 
QuestionDatabase vs. RAM Pin
blackbondi22-Sep-07 5:07
blackbondi22-Sep-07 5:07 
AnswerRe: Database vs. RAM Pin
Mohamad K. Ayyash22-Sep-07 5:20
Mohamad K. Ayyash22-Sep-07 5:20 
GeneralRe: Database vs. RAM Pin
blackbondi22-Sep-07 5:24
blackbondi22-Sep-07 5:24 

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.