AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Object-Pascal / Delphi-Language Delphi MagSetWindowFilterList function not remove specified window of screenshot
Thema durchsuchen
Ansicht
Themen-Optionen

MagSetWindowFilterList function not remove specified window of screenshot

Ein Thema von flashcoder · begonnen am 27. Jan 2018 · letzter Beitrag vom 29. Jan 2018
Antwort Antwort
Seite 3 von 4     123 4      
flashcoder

Registriert seit: 10. Nov 2013
83 Beiträge
 
#21

AW: MagSetWindowFilterList function not remove specified window of screenshot

  Alt 28. Jan 2018, 21:47
I want know why my callback function not is executed
  Mit Zitat antworten Zitat
EWeiss
(Gast)

n/a Beiträge
 
#22

AW: MagSetWindowFilterList function not remove specified window of screenshot

  Alt 28. Jan 2018, 21:57
I want know why my callback function not is executed
Win10 Trouble... i think.

greets
  Mit Zitat antworten Zitat
flashcoder

Registriert seit: 10. Nov 2013
83 Beiträge
 
#23

AW: MagSetWindowFilterList function not remove specified window of screenshot

  Alt 28. Jan 2018, 22:03
Zitat von EWeiss:
Win10 Trouble... i think.
No, here my enviroment is Windows 7 Ultimate x64.
  Mit Zitat antworten Zitat
EWeiss
(Gast)

n/a Beiträge
 
#24

AW: MagSetWindowFilterList function not remove specified window of screenshot

  Alt 28. Jan 2018, 22:09
Zitat von EWeiss:
Win10 Trouble... i think.
No, here my enviroment is Windows 7 Ultimate x64.
That is hard
But as I said my code I uploaded here works.
sorry..

greets
  Mit Zitat antworten Zitat
flashcoder

Registriert seit: 10. Nov 2013
83 Beiträge
 
#25

AW: MagSetWindowFilterList function not remove specified window of screenshot

  Alt 28. Jan 2018, 22:29
Zitat von EWeiss:
That is hard
But as I said my code I uploaded here works.
The callback function ImageScaling is executed in your test?

Edition:

The callback is working to me now, i discovered that my callback function is executed always that Magnifier window is resized:

Delphi-Quellcode:
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
My trouble now is that i'm getting a black image. Some idea how fix?

Geändert von flashcoder (28. Jan 2018 um 23:48 Uhr)
  Mit Zitat antworten Zitat
EWeiss
(Gast)

n/a Beiträge
 
#26

AW: MagSetWindowFilterList function not remove specified window of screenshot

  Alt 29. Jan 2018, 00:28
Zitat:
The callback function ImageScaling is executed in your test?
as said..
Zitat:
But as I said my code I uploaded here works.
greets
  Mit Zitat antworten Zitat
Benutzerbild von Zacherl
Zacherl

Registriert seit: 3. Sep 2004
4.629 Beiträge
 
Delphi 10.2 Tokyo Starter
 
#27

AW: MagSetWindowFilterList function not remove specified window of screenshot

  Alt 29. Jan 2018, 00:34
I want know why my callback function not is executed
Win10 Trouble... i think.
The (corrected) C++ example works on my Windows 10, but the Delphi code crashes somewhere inside MagSetWindowSource (breakpoint inside callback does not trigger) - again, only if I set the callback.
Projekte:
- GitHub (Profil, zyantific)
- zYan Disassembler Engine ( Zydis Online, Zydis GitHub)
  Mit Zitat antworten Zitat
flashcoder

Registriert seit: 10. Nov 2013
83 Beiträge
 
#28

AW: MagSetWindowFilterList function not remove specified window of screenshot

  Alt 29. Jan 2018, 01:14
Zitat von Zacherl:
The (corrected) C++ example works on my Windows 10, but the Delphi code crashes somewhere inside MagSetWindowSource
@Zacherl,

MagSetWindowSource not is necessary, i tested here (Delphi code) without this api and screenshot still is works.

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:

MagSetWindowSource and MagSetImageScalingCallback works fine since that (Form1) is maximized. My trouble now really is with the black capture in callback function.
Miniaturansicht angehängter Grafiken
cpra_chxtjywrqubw8yy8w.jpg  

Geändert von flashcoder (29. Jan 2018 um 01:32 Uhr)
  Mit Zitat antworten Zitat
EWeiss
(Gast)

n/a Beiträge
 
#29

AW: MagSetWindowFilterList function not remove specified window of screenshot

  Alt 29. Jan 2018, 02:05
Zitat von Zacherl:
The (corrected) C++ example works on my Windows 10, but the Delphi code crashes somewhere inside MagSetWindowSource
@Zacherl,

MagSetWindowSource not is necessary, i tested here (Delphi code) without this api and screenshot still is works.

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:

MagSetWindowSource and MagSetImageScalingCallback works fine since that (Form1) is maximized. My trouble now really is with the black capture in callback function.
Hi,
sorry your should learn C++ before translate any..
as i see, what your do here? as example

ImageScaling(hwnd: hwnd;
that looks very bad for me.

you can use in C++
Code:
hwnd Hwnd
but not in Delphi to..

should be
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

Geändert von EWeiss (29. Jan 2018 um 02:08 Uhr)
  Mit Zitat antworten Zitat
flashcoder

Registriert seit: 10. Nov 2013
83 Beiträge
 
#30

AW: MagSetWindowFilterList function not remove specified window of screenshot

  Alt 29. Jan 2018, 02:12
Delphi is case insensitive and is able to know waht is a variable name and a type.
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 3 von 4     123 4      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:53 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz