switch (msg)
{
case WM_COMMAND:
{
switch (LOWORD(wParam))
{
case ID_EDITMANP_LB:
{
switch (HIWORD(wParam))
{
case LBN_SELCHANGE:
{
int i = 0;
...
...
...
I'm simply unsure now when to return TRUE and when to return FALSE. Do I return TRUE if I process WM_COMMAND, but none of the cases of the LOWORD of wParam match? Do I generally return TRUE when I'm in a case like ID_EDITMANP_LB in the example above?
Cheers,
Brick
Returning from Dialog Proc (win32)
Hi,
I have a question about when and how to return from a dialog procedure.
I have a pretty big dialog box that does a lot of stuff and quite frankly I'm getting confused.
I have sections like this for example:
Return FALSE when you want default processing.
If LOWORD(wParam) of WM_COMMAND doesn't equal the id of any control that your code created then you definitely want default processing so return FALSE.
If LOWORD(wParam) of WM_COMMAND equals ID_EDITMANP_LB, which I assume is a list box you created, return TRUE if it's actually a notification you care about and in fact handle -- e.g. say, your app cares about LBN_SELCHANGE, handle it and return TRUE -- otherwise, return FALSE.
If LOWORD(wParam) of WM_COMMAND doesn't equal the id of any control that your code created then you definitely want default processing so return FALSE.
If LOWORD(wParam) of WM_COMMAND equals ID_EDITMANP_LB, which I assume is a list box you created, return TRUE if it's actually a notification you care about and in fact handle -- e.g. say, your app cares about LBN_SELCHANGE, handle it and return TRUE -- otherwise, return FALSE.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement