Sorry but I have a last problem with skeet shoot.
Can someone tell me how set a win32 switch case for an on screen menu?
I'm on test 21 out of 24.
I have got as far as
but I can't get the switch code to work. So that option 1 will restart a new game and option 2 will close the window.Code:void Endgame(){ TCHAR buff[10]; RECT rc; rc.left=x; rc.top=y; rc.right=a; rc.bottom=b+2; FillRect(hdc, &rc, (HBRUSH) BrushBlue); rc.left=h; rc.top=j; rc.right=k; rc.bottom=l+2; FillRect(hdc, &rc, (HBRUSH) BrushBlue); SelectObject(hdc, BrushGreen); Rectangle(hdc,0,200,575,475); TextOut(hdc, 350,0,TEXT("score="),6); TextOutA(hdc, 410,0,buff,wsprintf(buff,TEXT("%d"), score)); TextOut(hdc, 350,20,TEXT("skeets="),6); TextOutA(hdc, 410,20,buff,wsprintf(buff,TEXT("%d"), skeet)); TextOut(hdc, 150,160, TEXT(" Press 1 to play again"), 22); TextOut(hdc, 150,180, TEXT("Press 2 to quit"), 15); switch(reset){ case 1: skeet = 0; score = 0; break; case 2: PostQuitMessage(0); break; }



LinkBack URL
About LinkBacks


