adgHANDLE_DLGMSG???
-
Hi, I am reading Window95: A Developer's Guide and encounter a function in Dialog box procedure function.
switch(uMsg){
adgHANDLE_DLGMSG(hwnd, WM_INITDIALOG, keyCount_OnCommand);
...
}My question is, I can't find the function adgHANDLE_DLGMSG in WIN32 API, why??? Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
-
Hi, I am reading Window95: A Developer's Guide and encounter a function in Dialog box procedure function.
switch(uMsg){
adgHANDLE_DLGMSG(hwnd, WM_INITDIALOG, keyCount_OnCommand);
...
}My question is, I can't find the function adgHANDLE_DLGMSG in WIN32 API, why??? Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
NicholasCougar wrote: My question is, I can't find the function adgHANDLE_DLGMSG in WIN32 API, why??? It must be a user defined function. Look further into the source code. Nish
Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.
-
NicholasCougar wrote: My question is, I can't find the function adgHANDLE_DLGMSG in WIN32 API, why??? It must be a user defined function. Look further into the source code. Nish
Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.
Hi, The follows are another copy from Programming Application for Microsoft Windows, Fourth Edition . There is a function similar with the previous one: chHANDLE_DLGMSG By now, I have not found any function defined as chHANDLE_DLGMSG in source file.
INT_PTR WINAPI Dlg_Proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
chHANDLE_DLGMSG(hwnd, WM_INITDIALOG, Dlg_OnInitDialog);
chHANDLE_DLGMSG(hwnd, WM_TIMER, Dlg_OnTimer);
chHANDLE_DLGMSG(hwnd, WM_COMMAND, Dlg_OnCommand);
}
return (FALSE);
}Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
-
Hi, The follows are another copy from Programming Application for Microsoft Windows, Fourth Edition . There is a function similar with the previous one: chHANDLE_DLGMSG By now, I have not found any function defined as chHANDLE_DLGMSG in source file.
INT_PTR WINAPI Dlg_Proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
chHANDLE_DLGMSG(hwnd, WM_INITDIALOG, Dlg_OnInitDialog);
chHANDLE_DLGMSG(hwnd, WM_TIMER, Dlg_OnTimer);
chHANDLE_DLGMSG(hwnd, WM_COMMAND, Dlg_OnCommand);
}
return (FALSE);
}Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
Is this the Jeffrey Richter book? If so look at the last, or the 2nd from last chapter. It may even be part of the appendix. He has his own custom header files with his own custom functions and macros :-) Nish
Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.
-
Is this the Jeffrey Richter book? If so look at the last, or the 2nd from last chapter. It may even be part of the appendix. He has his own custom header files with his own custom functions and macros :-) Nish
Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.
Hi, You are right!!! Following is the Macro Jeffrey Richter wrote. // The normal HANDLE_MSG macro in WINDOWSX.H does not work properly for dialog // boxes because DlgProc's return a BOOL instead of an LRESULT (like // WndProcs). This adgHANDLE_DLGMSG macro corrects the problem: #define adgHANDLE_DLGMSG(hwnd, message, fn) \ case (message): return (SetDlgMsgResult(hwnd, uMsg, \ HANDLE_##message((hwnd), (wParam), (lParam), (fn)))) And this Macro is collected in Win95adg.h which is included in source file. Thank you Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.