I am trying to compile a project who use message crackers and is different from those wich I am used with(those projects that uses WindProc procedure and the other functions automatically created by the VS IDE)
This is the windows main function where I call DialogBox function:
int WINAPI WinMain(HINSTANCE hinstExe, HINSTANCE hinstPrev, LPSTR pszCmdLine, int nCmdShow)
DialogBox(hinstExe, MAKEINTRESOURCE(IDD_DIRWALK), NULL, Dlg_Proc);
If I place a breakpoint on the Dlg_Proc preocedure, the program never goes there to start it:
BOOL CALLBACK Dlg_Proc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
chHANDLE_DLGMSG(hwnd, WM_INITDIALOG, Dlg_OnInitDialog);
chHANDLE_DLGMSG(hwnd, WM_SIZE, Dlg_OnSize);
Here is the resource for the dialog box:
IDD_DIRWALK DIALOG DISCARDABLE 10, 18, 250, 250
STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP|
WS_VISIBLE| WS_CAPTION | WS_SYSMENU |WS_THICKFRAME
CAPTION "Directory Walk"
FONT 8, "System"
LISTBOX IDC_TREE,0,0,0,0,NOT LBS_NOTIFY |
LBX_NOINTEGRAL_HEIGHT | NOT WS_BORDER |
WS_VSCROLL | WS_HSCROLL | WS_GROUP |
Here is the macro definition for messages:
#define chHANDLE_DLGMSG(hWnd, message, fn) \
case (message): \
return (SetDlgMsgResult(hwnd, uMsg, HANDLE_##message((hwnd), (wParam), (lParam), (fn))))
I don't think that the problem could be on the resource code for dialog box as long as the program even don't execute de
dialog box procedure.
If you know where the problem could be, please help me.
modified 23-Aug-22 12:32pm.