That's not batch file. Because in batch files you don't have methods like that ( but you do have grouping). I'm not sure but I'm going to say
break;
case WM_COMMAND:
break;
}
}
That's you key ( I think). Just a guess.
hmm, not sure what's different there. The syntax of the original was ok- it was just missing a necessary function call. In a way, it was actually a trick question.
Anyway- nope, wasn't batch, that was C- So in a way one could say I was cheating... Not everybody programs in C, and even fewer of them write window procedures... but it was actually missing a single, very important line:
LRESULT CALLBACK WndProcedure(HWND hwnd,
UINT message,
WPARAM wparam
LPARAM lparam)
{
switch(message)
{
case WM_CREATE:
break;
case WM_COMMAND:
break;
}
return DefWindowProc(hStatusWnd, uMsg, wParam, lParam);
}
Since the code there doesn't actually
do anything- it has to pass the message on to the default window procedure. One might ask, "whats that do?"... well, the default window procedure provides default handling for window sizing and movement, as well as handling the "close" button when it's clicked.
Without it- the window won't even paint- none of the buttons will do anything, mousing over the border won't work, etc.
It's really quite a useful procedure though, I've had to subclass a Visual Basic form several times so that I could write my own window procedure for stuff VB didn't provide, usually messages introduced from Windows 2000 onwards.