VO28GUI - Window:_createSelfBitmap
From
Stefan Ungemach@21:1/5 to
All on Wed Apr 12 10:57:08 2023
The SDK function
METHOD __CreateSelfBitmap() AS PTR PASCAL CLASS Window
//PP-030828 Strong typing
LOCAL hBitmap AS PTR
LOCAL hBitmapOld AS PTR
LOCAL hDIB AS PTR
LOCAL _hDC AS PTR
LOCAL hMemDC AS PTR
LOCAL rc IS _WINRECT
LOCAL x, y AS INT
_hDC := GetWindowDC(hWnd)
IF (_hDC != NULL_PTR)
hMemDC := CreateCompatibleDC(hDC)
IF (hMemDC != NULL_PTR)
GetWindowRect(hWnd, @rc)
x := rc.right - rc.left
y := rc.bottom - rc.top
hBitmap := CreateCompatibleBitmap(_hDC, x, y)
IF (hBitmap != NULL_PTR)
hBitmapOld := SelectObject(hMemDC, hBitmap)
PatBlt(hMemDC, 0, 0, x, y, WHITENESS)
BitBlt(hMemDC, 0, 0, x, y, _hDC, 0, 0, SRCCOPY)
SelectObject(hMemDC, hBitmapOld)
ENDIF
DeleteDC(hMemDC)
ENDIF
ReleaseDC(hWnd, _hDC)
ENDIF
IF (hBitmap != NULL_PTR)
hDIB := __WCDIBFromBitmap(hBitmap)
DeleteObject(hBitmap)
ENDIF
RETURN hDIB
(which is used internally by the FabWindowHardcopyToFile) doesn't render an embedded WebView2 control. Does anyone have an alternative to create a hardcopy of such a dialog?
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)