SetDlgMsgResult
-
Hi, How to use the function SetDlgMsgResult ? The follows are an example, but I can't understand their meaning,
#define adgHANDLE\_DLGMSG(hwnd, message, fn) case (message): return (SetDlgMsgResult(hwnd, uMsg, HANDLE\_##message((hwnd), (wParam), (lParam), (fn))))
Jeffrey Richter said: 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. My Question is, the parameter list in SetDlgMsgResult(HWND hwnd, int msg, LONG result) puzzles me. Which parameter replaces which parameter, and where does this action take place, in memory of window? Thank you. Best regard. One concrete prolem is worth a thousand unapplied abstractions.
-
Hi, How to use the function SetDlgMsgResult ? The follows are an example, but I can't understand their meaning,
#define adgHANDLE\_DLGMSG(hwnd, message, fn) case (message): return (SetDlgMsgResult(hwnd, uMsg, HANDLE\_##message((hwnd), (wParam), (lParam), (fn))))
Jeffrey Richter said: 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. My Question is, the parameter list in SetDlgMsgResult(HWND hwnd, int msg, LONG result) puzzles me. Which parameter replaces which parameter, and where does this action take place, in memory of window? Thank you. Best regard. One concrete prolem is worth a thousand unapplied abstractions.
There is no API or MFC call named SetDlgMsgResult. SetDlgMsgResult seems to be one of Richter's custom functions too :-) Nish
Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.
-
There is no API or MFC call named SetDlgMsgResult. SetDlgMsgResult seems to be one of Richter's custom functions too :-) Nish
Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.
Hi, Nish [BusterBoy] wrote: There is no API or MFC call named SetDlgMsgResult. SetDlgMsgResult seems to be one of Richter's custom functions too Following words are copied from MSDN. I have to declare that I've installed SDK in my system. SetDlgMsgResult This macro maps to the SetWindowLong function.
SetDlgMsgResult (
HWND hwnd,
int msg,
LONG result );Parameters hwnd: Handle to the dialog box. msg:Specifies the zero-based offset to the value to be set. Valid values are in the range zero through the number of bytes of extra window memory, minus four. result:Specifies the replacement value. In my point of view, the value of parameter result is used to set the parameter msg. But set value in this way(set to an zero-based offset) is strange to me. I want thorough understanding of this function. Thank you, Best regard. One concrete prolem is worth a thousand unapplied abstractions.
-
Hi, Nish [BusterBoy] wrote: There is no API or MFC call named SetDlgMsgResult. SetDlgMsgResult seems to be one of Richter's custom functions too Following words are copied from MSDN. I have to declare that I've installed SDK in my system. SetDlgMsgResult This macro maps to the SetWindowLong function.
SetDlgMsgResult (
HWND hwnd,
int msg,
LONG result );Parameters hwnd: Handle to the dialog box. msg:Specifies the zero-based offset to the value to be set. Valid values are in the range zero through the number of bytes of extra window memory, minus four. result:Specifies the replacement value. In my point of view, the value of parameter result is used to set the parameter msg. But set value in this way(set to an zero-based offset) is strange to me. I want thorough understanding of this function. Thank you, Best regard. One concrete prolem is worth a thousand unapplied abstractions.
Oh sorry! :-) My MSDN must be really old :-) Nish
Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.
-
Oh sorry! :-) My MSDN must be really old :-) Nish
Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.
Hi, I have checked the preface of this book. It's named Window95, a developer's guide written by Jeffrey before 1997. It's a Win32 SDK programming guide which includes several key techniques such as subclassing and superclassing, hooking etc. Best regard. One concrete prolem is worth a thousand unapplied abstractions.
-
Hi, I have checked the preface of this book. It's named Window95, a developer's guide written by Jeffrey before 1997. It's a Win32 SDK programming guide which includes several key techniques such as subclassing and superclassing, hooking etc. Best regard. One concrete prolem is worth a thousand unapplied abstractions.
Thanks for the info Nicholas :-) Nish
Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.