Gdip - Bildergröße in Gui weit vom Original ab

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Gdip - Bildergröße in Gui weit vom Original ab

Re: Gdip - Bildergröße in Gui weit vom Original ab

Post by Holle » 11 Feb 2014, 08:18

Genial, vielen Dank!

Re: Gdip - Bildergröße in Gui weit vom Original ab

Post by just me » 11 Feb 2014, 08:06

Moin,

versuch mal, SS_REALSIZECONTROL = 0x00000040 zu setzen.

Gdip - Bildergröße in Gui weit vom Original ab

Post by Holle » 11 Feb 2014, 07:56

Wenn ich Icons in eine Gui lade dann kann ich mit "w" und "h" die breite und höhe bestimmen.
Wenn ich das gleiche nun per Gdip mache weicht die Größe jedoch ab, warum?

Hier ist ein Beispiel-Script:

Code: Select all

#SingleInstance
; #include GDIP.ahk ;remove comment, if GDIP is not in the standard library

if !FileExist("Clipboard.png")
    URLDownloadToFile, http://der-holle.de/ahk/Clipboard.png, Clipboard.png
if !FileExist("Save.png")
    URLDownloadToFile, http://der-holle.de/ahk/Save.png, Save.png
if !FileExist("Print.png")
    URLDownloadToFile, http://der-holle.de/ahk/Print.png, Print.png
if !FileExist("Close.png")
    URLDownloadToFile, http://der-holle.de/ahk/Close.png, Close.png

OnExit, Exit
pToken := Gdip_Startup()

Gui, Add, GroupBox, x10 y10 w220 h70, From PNG
Gui, Add, Picture, x20 y30 w40 h40, Clipboard.png
Gui, Add, Picture, x+10 w40 h40, Save.png
Gui, Add, Picture, x+10 w40 h40, Print.png
Gui, Add, Picture, x+15 w40 h40, Close.png

Gui, Add, GroupBox, x10 y100 w220 h70, From Gdip
Gui, Add, Picture, x20 y120 w40 h40 hwndhClipboard 0xE
Gui, Add, Picture, x+10 w40 h40 hwndhSave 0xE
Gui, Add, Picture, x+10 w40 h40 hwndhPrint 0xE
Gui, Add, Picture, x+15 w40 h40 hwndhClose 0xE

Gui, Show

pBitmap := Gdip_CreateBitmapFromFile("Clipboard.png")
hBitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
SetImage(hClipboard, hBitmap)
pBitmap := Gdip_CreateBitmapFromFile("Save.png")
hBitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
SetImage(hSave, hBitmap)
pBitmap := Gdip_CreateBitmapFromFile("Print.png")
hBitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
SetImage(hPrint, hBitmap)
pBitmap := Gdip_CreateBitmapFromFile("Close.png")
hBitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
SetImage(hClose, hBitmap)
return

ESC::
Exit:
   Gdip_DisposeImage(pBitmap)
   DeleteObject(hBitmap)
   Gdip_Shutdown(pToken)
ExitApp

Top