Hey, congratz on releasing 7.1! Just updated (6.35 didn't notify me, tho), and...it doesn't work for me?
Or I'm still doing something wrong.
BitBlt returns black (when the window is hidden) or the topmost text (when the window is clipped).
WM_PRINT (and WM_PRINTCLIENT) with PRF_CLIENT plays nicer than before - the result is filled with the configured border color (Display > Options, Styles, Border Color) instead of black.
PrintWindow is still black.
Could it be I'm doing something wrong (again, still)?
Just to make sure, I used argv0's code this time:
HWND hwnd = hWndSrc; //$window(@picwin).hwnd
int w = 16;
int h = 16;
HDC hDC = GetDC(hwnd);
HDC hMemDC = CreateCompatibleDC(hDC);
HBITMAP bmp = CreateCompatibleBitmap(hDC, w, h);
HICON icon = NULL;
if (bmp) {
HDC hOld = (HDC)SelectObject(hMemDC, bmp);
//BitBlt(hMemDC, 0, 0, w, h, hDC, 0, 0, SRCCOPY);
//SendMessage(hwnd, WM_PRINT, (WPARAM)hMemDC, PRF_CLIENT | PRF_CHILDREN);
SendMessage(hwnd, WM_PRINTCLIENT, (WPARAM)hMemDC, PRF_ERASEBKGND | PRF_CLIENT | PRF_CHILDREN | PRF_OWNED);
//PrintWindow(hwnd, hMemDC, PW_CLIENTONLY);
SelectObject(hMemDC, hOld);
icon = HIconFromHBitmap(bmp);
DeleteDC(hMemDC);
ReleaseDC(hwnd, hDC);
}
return icon;Any ideas on whats wrong here?