I need to rotate picture by pressing arrows.
rotate(dots, 90, 150, 120, size.cx, size.cy); PlgBlt(dc, dots, my_dc, 0, 0, size.cx, size.cy, my_mask, 0, 0); There is a function - rotate. But I don't know where to put this part. When I put it into WM_TIMER - happens nothing. In WM_PAINT - too. What's wrong? Where put this code and where call this?
Here is WM_PAINT and WM_TIMER
case WM_PAINT: dc = BeginPaint(hwnd, &ps); GetClientRect(hwnd, &rect); BitBlt(mdc, 0, 0, info.bmWidth, info.bmHeight, bdc, 0, 0, SRCCOPY); MaskBlt(mdc, my_pos.x, my_pos.y, my_size.cx, my_size.cy, my_dc, 0, 0, my_mask, 0, 0, MAKEROP4(SRCCOPY, SRCPAINT)); BitBlt(dc, 0, 0, rect.right, rect.bottom, mdc, 0, 0, SRCCOPY); EndPaint(hwnd, &ps); break; case WM_TIMER: if(LOWORD(wParam) == 777u) { if(GetAsyncKeyState(VK_LEFT)) { if (GreatFuncLeftRight(my_pos.x,my_pos.y)) { my_pos.x -= 2; } else my_pos.x-=0; } if(GetAsyncKeyState(VK_RIGHT)) { if (GreatFuncLeftRightReverse(my_pos.x,my_pos.y)) { my_pos.x += 2; } else my_pos.x+=0; } if(GetAsyncKeyState(VK_UP)) { if (GreatFuncUpDown(my_pos.x,my_pos.y)) { my_pos.y -= 2; } else my_pos.y-=0;// вверх } if(GetAsyncKeyState(VK_DOWN)) { if (GreatFuncUpDownReverse(my_pos.x,my_pos.y)) { my_pos.y += 2; } else my_pos.y+=0; } InvalidateRect(hwnd, NULL, FALSE); } break; Related questions 1 Windows System programming 1 Running Commandline 0 How to change walllpaper in c using winapi? Related questions 1 Windows System programming 1 Running Commandline 0 How to change walllpaper in c using winapi? 1 Using BitBlt to capture desktop pixel colors 1 How to use WndProc? 1 Loading and painting bmp win32api c++ 2 How to use WAVEHDR 1 ColorBlend not found 1 Win32 Application Programming C++, Error with parameter Type LPCWSTR 2 Microsoft C library _beginthreadex Load 7 more related questions Show fewer related questions
Reset to default