A question for a guru.
I was having some trouble using SendMessage to send a message to a modeless dialog box.
my dialog procedure is:
DlgProc PROC _hWnd:HWND,iMsg:DWORD,wParam:WPARAM, lParam:LPARAM
within this i have:
.elseif iMsg==MM_BUGDIALOG
...do something...
whats the difference between these two invoke statements:
1.) invoke DlgProc, DlgHndl, MM_BUGDIALOG, NULL, NULL
or
2.) invoke SendMessage,DlgHndl,MM_BUGDIALOG,NULL,NULL
SendMessage works now but i'm wondering what the difference is if any. does SendMessage just look up the window procedure for the given handle and eventually call the first invoke anyway? i guess my question is: if my window were sending itself repeated messages for example, an animation, is there a speed saving in using the first over the second or is it just bad programming practice or is there an even faster way of doing things like having a seperate procedure containing only the specific animation code to save the program having to drop through all those elseifs? sorry if this doesn't make sense. i'm going to sleep now and i'll check back here tomorrow.
I was having some trouble using SendMessage to send a message to a modeless dialog box.
my dialog procedure is:
DlgProc PROC _hWnd:HWND,iMsg:DWORD,wParam:WPARAM, lParam:LPARAM
within this i have:
.elseif iMsg==MM_BUGDIALOG
...do something...
whats the difference between these two invoke statements:
1.) invoke DlgProc, DlgHndl, MM_BUGDIALOG, NULL, NULL
or
2.) invoke SendMessage,DlgHndl,MM_BUGDIALOG,NULL,NULL
SendMessage works now but i'm wondering what the difference is if any. does SendMessage just look up the window procedure for the given handle and eventually call the first invoke anyway? i guess my question is: if my window were sending itself repeated messages for example, an animation, is there a speed saving in using the first over the second or is it just bad programming practice or is there an even faster way of doing things like having a seperate procedure containing only the specific animation code to save the program having to drop through all those elseifs? sorry if this doesn't make sense. i'm going to sleep now and i'll check back here tomorrow.