Reputation: 339
I meet that problem:
LOWORD undeclared
with this piece of code:
case WM_COMMAND:
{
if (lParam==0)
{
if ((LOWORD)wParam==IDM_HELLO)
MessageBox(0, L"Hello", (LPCSTR)szClassName, MB_OK);
}
break;
}
I don't know what I loss. Anyone help me?
Upvotes: 1
Views: 514
Reputation: 30418
LOWORD
is not a type that you cast a variable to, but a macro to extract the lower 16 bits of a 32-bit value. Your code will probably compile if you change it to this:
case WM_COMMAND:
{
if (lParam==0)
{
if (LOWORD(wParam) == IDM_HELLO)
{
MessageBox(0, L"Hello", (LPCSTR)szClassName, MB_OK);
}
}
break;
}
Upvotes: 2