Can I paint on Qt widget by invoking win32 sdk api?
The code is below, it seems that do not work.
I want to implement such function for some special aim.
PAINTSTRUCT ps;
HWND hwnd = (HWND)winId();
HDC hdc = BeginPaint(hwnd,&ps);
::MoveToEx(hdc, 0, 0, NULL);
bool stat = ::LineTo(hdc, 500, 500);
EndPaint(hwnd,&ps);
PAINTSTRUCT ps;
HWND hwnd = (HWND)winId();
HDC hdc = BeginPaint(hwnd,&ps);
::MoveToEx(hdc, 0, 0, NULL);
bool stat = ::LineTo(hdc, 500, 500);
EndPaint(hwnd,&ps);
To copy to clipboard, switch view to plain text mode
The codes are all in function paintEvent.
Bookmarks