{
HWND hWnd = winId();
HDC hdc;
PAINTSTRUCT ps;
hdc = BeginPaint(hWnd, &ps);
BOOL b = StretchDIBits(hdc, 0, 0, rect().width(), rect().height(), 0, 0,
bmh.biWidth, bmh.biHeight*-1, frm->frame, &bmi,
DIB_RGB_COLORS, SRCCOPY);
EndPaint(hWnd, &ps);
}
void MyWidget::paintEvent(QPaintEvent *p)
{
HWND hWnd = winId();
HDC hdc;
PAINTSTRUCT ps;
hdc = BeginPaint(hWnd, &ps);
BOOL b = StretchDIBits(hdc, 0, 0, rect().width(), rect().height(), 0, 0,
bmh.biWidth, bmh.biHeight*-1, frm->frame, &bmi,
DIB_RGB_COLORS, SRCCOPY);
EndPaint(hWnd, &ps);
}
To copy to clipboard, switch view to plain text mode
Bookmarks