![]() |
AW: MagSetWindowFilterList function not remove specified window of screenshot
I want know why my callback function not is executed :wall: :(
|
AW: MagSetWindowFilterList function not remove specified window of screenshot
Zitat:
greets |
AW: MagSetWindowFilterList function not remove specified window of screenshot
Zitat:
|
AW: MagSetWindowFilterList function not remove specified window of screenshot
Zitat:
But as I said my code I uploaded here works. sorry.. greets |
AW: MagSetWindowFilterList function not remove specified window of screenshot
Zitat:
Edition: The callback is working to me now, i discovered that my callback function is executed always that Magnifier window is resized:
Delphi-Quellcode:
My trouble now is that i'm getting a black image. Some idea how fix?
function MagImageScalingCallback(hwnd: hwnd; srcdata: Pointer;
srcheader: MAGIMAGEHEADER; destdata: Pointer; destheader: MAGIMAGEHEADER; unclipped: TRect; clipped: TRect; dirty: HRGN): BOOL; stdcall; var lpbmih: TBitmapInfoHeader; lpbmi: TBitmapInfo; aBitmap: HBITMAP; aDC: HDC; bmp: TBitmap; begin Fillchar(lpbmih, SizeOf(lpbmih), 0); lpbmih.biSize := SizeOf(lpbmih); lpbmih.biWidth := srcheader.width; lpbmih.biHeight := srcheader.height; lpbmih.biPlanes := 1; lpbmih.biBitCount := Floor(lpbmih.biSizeImage / lpbmih.biHeight / lpbmih.biWidth * 8); lpbmih.biCompression := BI_RGB; Fillchar(lpbmi, SizeOf(lpbmi), 0); lpbmi.bmiHeader.biSize := SizeOf(lpbmi.bmiHeader); lpbmi.bmiHeader.biWidth := srcheader.width; lpbmi.bmiHeader.biHeight := srcheader.height; lpbmi.bmiHeader.biPlanes := 1; lpbmi.bmiHeader.biBitCount := Floor(lpbmi.bmiHeader.biSizeImage / lpbmi.bmiHeader.biHeight / lpbmi.bmiHeader.biWidth * 8); lpbmi.bmiHeader.biCompression := BI_RGB; aDC := GetWindowDC(hwnd); bmp := TBitmap.Create; aBitmap := 0; try aBitmap := CreateDIBitmap(aDC, lpbmih, 0, nil, lpbmi, DIB_RGB_COLORS); bmp.handle := aBitmap; bmp.SaveToFile('c:\tela.bmp'); finally DeleteObject(aBitmap); DeleteDC(aDC); bmp.Free; end; Result := True; end; //... if (not MagSetImageScalingCallback(hwndMag, MagImageScalingCallback)) then |
AW: MagSetWindowFilterList function not remove specified window of screenshot
Zitat:
Zitat:
|
AW: MagSetWindowFilterList function not remove specified window of screenshot
Zitat:
Delphi-Quellcode:
(breakpoint inside callback does not trigger) - again, only if I set the callback.
MagSetWindowSource
|
AW: MagSetWindowFilterList function not remove specified window of screenshot
Liste der Anhänge anzeigen (Anzahl: 1)
Zitat:
Delphi-Quellcode:
not is necessary, i tested here (Delphi code) without this api and screenshot still is works.
MagSetWindowSource
About callback also is working fine here, my callback function is executed when Magnifier window (Form1) is maximized, now i need of some help to fix this trouble of black capture :) Edition:
Delphi-Quellcode:
and
MagSetWindowSource
Delphi-Quellcode:
works fine since that (Form1) is maximized. My trouble now really is with the black capture in callback function.
MagSetImageScalingCallback
|
AW: MagSetWindowFilterList function not remove specified window of screenshot
Zitat:
sorry your should learn C++ before translate any.. as i see, what your do here? as example
Delphi-Quellcode:
ImageScaling(hwnd: hwnd;
that looks very bad for me. you can use in C++
Code:
but not in Delphi to..
hwnd Hwnd
should be
Delphi-Quellcode:
ImageScaling(Handle: HWND;
then your set your Window not on TopMost that is bad also... and so on. read the API then create a application from beginning, just my 2 Cent. greets |
AW: MagSetWindowFilterList function not remove specified window of screenshot
Delphi is case insensitive and is able to know waht is a variable name and a type.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:22 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz