Click here to Skip to main content
15,884,628 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSHGetSpecialFolderPath or SHGetFolderPath Pin
includeh105-Dec-09 9:39
includeh105-Dec-09 9:39 
AnswerRe: SHGetSpecialFolderPath or SHGetFolderPath Pin
LunaticFringe5-Dec-09 9:52
LunaticFringe5-Dec-09 9:52 
GeneralRe: SHGetSpecialFolderPath or SHGetFolderPath Pin
Bram van Kampen5-Dec-09 14:28
Bram van Kampen5-Dec-09 14:28 
GeneralRe: SHGetSpecialFolderPath or SHGetFolderPath PinPopular
David Crow5-Dec-09 17:21
David Crow5-Dec-09 17:21 
AnswerRe: SHGetSpecialFolderPath or SHGetFolderPath PinPopular
Iain Clarke, Warrior Programmer5-Dec-09 21:04
Iain Clarke, Warrior Programmer5-Dec-09 21:04 
QuestionWhere to call AnimateWindow during DoModal Pin
emmmatty15-Dec-09 0:27
emmmatty15-Dec-09 0:27 
AnswerRe: Where to call AnimateWindow during DoModal Pin
«_Superman_»5-Dec-09 4:55
professional«_Superman_»5-Dec-09 4:55 
QuestionApplication hangs when entering dialog procedure Pin
Sauce!4-Dec-09 22:32
Sauce!4-Dec-09 22:32 
I have created a simple dialog box using visual studio's form editor, and am creating the dailog like so:

DialogBox(NULL, MAKEINTRESOURCE(IDD_IMGPROPS), hWnd, reinterpret_cast<DLGPROC>(dlgImgPropsProc));


The dialog procedure looks like this:

LRESULT CALLBACK dlgImgPropsProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
	switch(msg)
	{
	case WM_INITDIALOG:
		SendMessage(GetDlgItem(hWnd, IDC_IMGPROPS_SPINW), UDM_SETBUDDY, (WPARAM)GetDlgItem(hWnd, IDC_IMGPROPS_WIDTH), 0);
		SendMessage(GetDlgItem(hWnd, IDC_IMGPROPS_SPINH), UDM_SETBUDDY, (WPARAM)GetDlgItem(hWnd, IDC_IMGPROPS_HEIGHT), 0);
		return TRUE;
	case WM_CLOSE:
		EndDialog(hWnd, 0);
		return TRUE;
	case WM_COMMAND:
		switch(wParam)
		{
		case IDC_IMGPROPS_OK:
			EndDialog(hWnd, 0);
			return TRUE;
		}
		break;
	default:
		return FALSE;
	}

	return FALSE;
}


Now, the problem is that every time my application hits the call to createDialog(), it hangs... and it seems to be pretty permanent. I've stepped through the dialog procedure and my dialog is recieving the following messages:

48		WM_SETFONT
85		WM_NOTIFYFORMAT
297		WM_QUERYUISTATE
85		WM_NOTIFYFORMAT
297		WM_QUERYUISTATE
272		WM_INITDIALOG
1024		WM_USER
24		WM_SHOWWINDOW
70		WM_WINDOWPOSCHANGING
71		WM_WINDOWPOSCHANGED
127		WM_GETICON
127		WM_GETICON
127		WM_GETICON
131		WM_NCCALCSIZE
15		WM_PAINT
133		WM_NCPAINT
127		WM_GETICON
127		WM_GETICON
127		WM_GETICON
20		WM_ERASEBKGND
310		WM_CTLCOLORDLG
307		WM_CTLCOLOREDIT
307		WM_CTLCOLOREDIT
312		WM_CTLCOLORSTATIC
307		WM_CTLCOLOREDIT
307		WM_CTLCOLOREDIT
309		WM_CTLCOLORBTN
127		WM_GETICON
127		WM_GETICON
127		WM_GETICON
127		WM_GETICON
127		WM_GETICON
127		WM_GETICON
127		WM_GETICON
...


Now, I'm guessing that it just continues on forever there with WM_GETICON. I didn't bother stepping through it any further than that. My question is, what would cause my dialog to continuously recieve the WM_GETICON message, and how can I fix it?
AnswerRe: Application hangs when entering dialog procedure Pin
Sauce!5-Dec-09 3:43
Sauce!5-Dec-09 3:43 
QuestionSHGetSpecialFolderPath Pin
includeh104-Dec-09 22:15
includeh104-Dec-09 22:15 
AnswerRe: SHGetSpecialFolderPath Pin
MsmVc4-Dec-09 23:44
MsmVc4-Dec-09 23:44 
GeneralRe: SHGetSpecialFolderPath Pin
includeh105-Dec-09 9:40
includeh105-Dec-09 9:40 
GeneralRe: SHGetSpecialFolderPath PinPopular
LunaticFringe5-Dec-09 10:10
LunaticFringe5-Dec-09 10:10 
GeneralRe: SHGetSpecialFolderPath Pin
MsmVc6-Dec-09 18:01
MsmVc6-Dec-09 18:01 
AnswerRe: SHGetSpecialFolderPath Pin
Iain Clarke, Warrior Programmer5-Dec-09 3:01
Iain Clarke, Warrior Programmer5-Dec-09 3:01 
QuestionDrive Letters (More than 26 Drives??) Pin
Bram van Kampen4-Dec-09 16:09
Bram van Kampen4-Dec-09 16:09 
AnswerRe: Drive Letters (More than 26 Drives??) Pin
«_Superman_»4-Dec-09 17:38
professional«_Superman_»4-Dec-09 17:38 
AnswerRe: Drive Letters (More than 26 Drives??) Pin
Iain Clarke, Warrior Programmer5-Dec-09 3:05
Iain Clarke, Warrior Programmer5-Dec-09 3:05 
GeneralRe: Drive Letters (More than 26 Drives??) [modified for Typo's] Pin
Bram van Kampen5-Dec-09 14:06
Bram van Kampen5-Dec-09 14:06 
QuestionRe: Drive Letters (More than 26 Drives??) [modified for Typo's] Pin
David Crow5-Dec-09 17:17
David Crow5-Dec-09 17:17 
GeneralRe: Drive Letters (More than 26 Drives??) [modified for Typo's] Pin
Iain Clarke, Warrior Programmer5-Dec-09 20:59
Iain Clarke, Warrior Programmer5-Dec-09 20:59 
AnswerRe: Drive Letters (More than 26 Drives??) Pin
David Crow5-Dec-09 17:19
David Crow5-Dec-09 17:19 
GeneralRe: Drive Letters (More than 26 Drives??) Pin
Bram van Kampen9-Dec-09 15:48
Bram van Kampen9-Dec-09 15:48 
QuestionAddAceToObjectsSecurityDescriptor problem Pin
RomTibi4-Dec-09 8:01
RomTibi4-Dec-09 8:01 
QuestionHow do I control what files get compiled? Pin
Interrobang4-Dec-09 6:36
Interrobang4-Dec-09 6:36 

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.