-
Code Check.
Hey all Im working this project and Im using buttons and they've always givin me this problem could you tell me whats wrong with the following code. Because even though they are different buttons they show the samething.
Code:
case WM_COMMAND:
switch(LOWORD(wParam))
{
case button_1:
switch(HIWORD(wParam))
{
case BN_CLICKED:
win.w_msgbox("Hello","World");
break;
}
break;
}
break;
switch(LOWORD(wParam))
{
case button_2:
switch(HIWORD(wParam))
{
case BN_CLICKED:
win.w_msgbox("World","Hello");
break;
}
break;
}
break;
-
You have too many switches.
Code:
case WM_COMMAND:
switch(LOWORD(wParam))
{
case button_1:
switch(HIWORD(wParam))
{
case BN_CLICKED:
win.w_msgbox("Hello","World");
break;
}
break;
case button_2:
switch(HIWORD(wParam))
{
case BN_CLICKED:
win.w_msgbox("World","Hello");
break;
}
break;
}
break;
-
Dammit i didnt see what actually was wrong... I got that after I changed what i Had before which is what you just posted. I declared different names same number muahaha Im an ediot thanks anyway.