First let me tell you what I'm trying to accomplish. I am making a windows app where the user hits the up arrow key and somthing happens...obviously I am starting to lean towards a windows game. Anyway, here is my WM_MOVE message, I think this is where my action is:
if I get rid of 'if key == VK_UP' stuff then the Textout thing works. But with it, I press the up arrow key and it doesn't work. Could someone please tell me why? thanks.Code:case WM_MOVE: { // extract the position int xpos = LOWORD(lparam); int ypos = HIWORD(lparam); // get a graphics context hdc = GetDC(hwnd); // set the foreground color to green SetTextColor(hdc, RGB(0,255,0)); // set the background color to black SetBkColor(hdc, RGB(0,0,0)); // set the transparency mode to OPAQUE SetBkMode(hdc, OPAQUE); // get the up arrow key from the user char key=getch(); if(key == VK_UP){ TextOut(hdc, 0,0, "Hi", strlen("Hi")); } // release the dc back ReleaseDC(hwnd, hdc); } break;



LinkBack URL
About LinkBacks


