Click here to Skip to main content
15,498,622 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionNeed insight as to how VS2008 parses vcproj files Pin
charlieg21-Aug-22 9:45
Membercharlieg21-Aug-22 9:45 
AnswerRe: Need insight as to how VS2008 parses vcproj files Pin
Mircea Neacsu21-Aug-22 11:35
mvaMircea Neacsu21-Aug-22 11:35 
GeneralRe: Need insight as to how VS2008 parses vcproj files Pin
charlieg22-Aug-22 1:56
Membercharlieg22-Aug-22 1:56 
GeneralRe: Need insight as to how VS2008 parses vcproj files Pin
Mircea Neacsu22-Aug-22 2:45
mvaMircea Neacsu22-Aug-22 2:45 
GeneralRe: Need insight as to how VS2008 parses vcproj files Pin
charlieg22-Aug-22 2:53
Membercharlieg22-Aug-22 2:53 
QuestionDialogBox fuction not executing its procedure [SOLVED] Pin
coco24319-Aug-22 0:39
Membercoco24319-Aug-22 0:39 
AnswerRe: DialogBox fuction not executing its procedure Pin
Richard MacCutchan19-Aug-22 1:38
mveRichard MacCutchan19-Aug-22 1:38 
GeneralRe: DialogBox fuction not executing its procedure Pin
coco24319-Aug-22 2:14
Membercoco24319-Aug-22 2:14 
Thank you for your response, unfortunately not DS_MODALEFRAME is the problem

The problem is ( I think ), that when DialogBox function is called in WinMain, its associated procedure function Dlg_ProcDlg_Proc isn't executed.


Richard MacCutchan wrote:
And your message handlers could contain anything - we cannot see the code.


Are you reffering to Dlg_OnInitDialog as message handlers? It's code is:

C++
BOOL Dlg_OnInitDialog (HWND hwnd, HWND hwndFocus, LPARAM lParam)
{
	RECT rc;

	// Associate an icon with the dialog box.
	chSETDLGICONS(hwnd, IDI_DIRWALK, IDI_DIRWALK);
    
    // here is some code that I didn't got to, or have patience to write

	GetClientRect(hwnd, &rc);
	SetWindowPos(GetDlgItem(hwnd, IDC_TREE), NULL, 0, 0, rc.right, rc.bottom, SWP_NOZORDER);

	return(TRUE);
}


And the macro for chSETDLGICONS(hwnd, IDI_DIRWALK, IDI_DIRWALK); Big Grin | :-D is:

<pre lang="C++">

#define chINITSTRUCT(structure, fInitSize)                       \
        (ZeroMemory(&(structure), sizeof(structure)),             \
	fInitSize ? (*(int*) &(structure) = sizeof(structure)) : 0)

// Dialog Box Icon Setting Macro
// The call to SetClassLong is for Windows NT 3.51 or less.
// The WM_SETICON messages are for Windows NT 4.0 and Win 95
#define chSETDLGICONS(hwnd, idiLarge, idiSmall)                  \
		{                                                              \
		OSVERSIONINFO VerInfo;                                      \
		chINITSTRUCT(VerInfo, TRUE);                             \
		GetVersionEx(&VerInfo);                                  \
		if ((VerInfo.dwPlatformId == VER_PLATFORM_WIN32_NT) &&   \
			(VerInfo.dwMajorVersion <=3 &&                      \
			VerInfo.dwMinorVersion <= 51))                       \
		{                                                        \
			SetClassLong(hwnd, GCL_HICON, (LONG)                      \
				LoadIcon(GetWindowInstance(hwnd),                \
				MAKEINTRESOURCE(idiLarge)));                     \
		}                                                        \
		else                                                    \
		 {                                                       \
			 SendMessage(hwnd, WM_SETICON, TRUE, (LPARAM)        \
				 LoadIcon(GetWindowInstance(hwnd),                    \
				 MAKEINTRESOURCE(idiLarge)));                    \
			 SendMessage(hwnd, WM_SETICON, FALSE, (LPARAM)       \
				 LoadIcon(GetWindowInstance(hwnd),                    \
				 MAKEINTRESOURCE(idiSmall)));                    \
		}                                                        \
	}


But the program dosen't reach the Dlg_OnInitDialog, I placed a breakpoint there.

What do I miss? If it is really necessary for the clearness of the code I wll add and the macros in code.

And guys please don't get upset on me because I insist to solve this old kind of program, but I am curious about this different style of managing windows messages and please help me to go through.

Thank you Smile | :)
GeneralRe: DialogBox fuction not executing its procedure Pin
Richard MacCutchan19-Aug-22 2:47
mveRichard MacCutchan19-Aug-22 2:47 
GeneralRe: DialogBox fuction not executing its procedure Pin
coco24319-Aug-22 3:03
Membercoco24319-Aug-22 3:03 
GeneralRe: DialogBox fuction not executing its procedure Pin
Richard MacCutchan19-Aug-22 3:29
mveRichard MacCutchan19-Aug-22 3:29 
GeneralRe: DialogBox fuction not executing its procedure Pin
coco24319-Aug-22 3:57
Membercoco24319-Aug-22 3:57 
GeneralRe: DialogBox fuction not executing its procedure Pin
coco24319-Aug-22 4:20
Membercoco24319-Aug-22 4:20 
SuggestionRe: DialogBox fuction not executing its procedure Pin
David Crow19-Aug-22 5:34
MemberDavid Crow19-Aug-22 5:34 
GeneralRe: DialogBox fuction not executing its procedure Pin
Richard MacCutchan19-Aug-22 5:40
mveRichard MacCutchan19-Aug-22 5:40 
GeneralRe: DialogBox fuction not executing its procedure Pin
coco24319-Aug-22 6:15
Membercoco24319-Aug-22 6:15 
GeneralRe: DialogBox fuction not executing its procedure Pin
Richard MacCutchan19-Aug-22 6:52
mveRichard MacCutchan19-Aug-22 6:52 
GeneralRe: DialogBox fuction not executing its procedure Pin
coco24319-Aug-22 7:16
Membercoco24319-Aug-22 7:16 
GeneralRe: DialogBox fuction not executing its procedure Pin
Richard MacCutchan19-Aug-22 9:09
mveRichard MacCutchan19-Aug-22 9:09 
GeneralRe: DialogBox fuction not executing its procedure Pin
coco24320-Aug-22 0:47
Membercoco24320-Aug-22 0:47 
GeneralRe: DialogBox fuction not executing its procedure Pin
Richard MacCutchan20-Aug-22 0:58
mveRichard MacCutchan20-Aug-22 0:58 
GeneralRe: DialogBox fuction not executing its procedure Pin
coco24320-Aug-22 1:06
Membercoco24320-Aug-22 1:06 
GeneralRe: DialogBox fuction not executing its procedure Pin
Richard MacCutchan21-Aug-22 2:56
mveRichard MacCutchan21-Aug-22 2:56 
GeneralRe: DialogBox fuction not executing its procedure Pin
coco24321-Aug-22 8:51
Membercoco24321-Aug-22 8:51 
GeneralRe: DialogBox fuction not executing its procedure Pin
Richard MacCutchan21-Aug-22 10:03
mveRichard MacCutchan21-Aug-22 10:03 

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.