Hello - I'm trying to write a program that executes a function on a button press. My code compiles and runs properly, but when the button is pushed, nothing happens.
Here is my code:
1 2 3 4 5 6 7 8 9 10 11 12
case WM_COMMAND:
{
switch(LOWORD(wParam))
{
case NEWCUSTBOOKING:
{
int rundbc();
}
break;
}
break;
}
because i dont see this happen to much, good job op! a lot of new users will delete the post. you a) left it up, and b) provided the solution to your issue. i know this might not seem major, but it could easily help someone. doing what you did is also a very good habit
Why didn't you just add your buttons id to your MESSAGE_MAP and assign an event to fire on the ON_BN_CLICKED message being sent to your window/dialog class? You don't need to re-invent the wheel here.
I just started learning the Win32 API, I like to try to start low level to understand what the other libraries are doing under the hood. Plus, I'm not to familiar with how I would even use the MFC.