| |
|
|
Frank Abbing | Hi,
adopted, one would like one Load image and in a Window Show. the Image is 640x480 Pixel big. Öffnet one now one Window of these Ausmassen and loading the image one, then becomes one check, that the image right and under not complete into Window fit. welt, Titelleiste, Menu etc. care for, the the eigentliche Content the Fensters shrink. one should the window means already in the Vorraus greater style. only how much greater? For this, could one through umfangreiche APIs The sizes the individual Fensterelemente one Betriebssystems ermittel and its Berechnungen einfliessen let. It's all right but too plenty plainer and only with Profanmitteln:
Declare x&,y&,breite&,hoehe&,positionx&,positiony&
Windowstyle 24
Window %maxx,0-1,1 Pseudofenster öffnen
LoadBmp Bildname.bmp,0,0;0
breite&=%bmpx
hoehe&=%bmpy
SetWindowPos %hwnd=%maxx,%maxy-breite&,hoehe& Window original present, but yet not visible
x&=Width(%hwnd)
y&=Height(%hwnd)
breite&=breite&+(breite&-x&)
hoehe&=hoehe&+(hoehe&-y&)
SetWindowPos %hwnd=(%maxx/2-(breite&/2)),(%maxy/2-(hoehe&/2))-breite&,hoehe& Window present
WaitInput
End
|
|
|
| |
|
|
|
| here my Posting about: ( I mags short) The procedure setting The wide and Höhe the Anzeigebereiches the Mainwindow %hwnd on The as Parameter übergebenen values.
salvo, iF. |
|
|
| |
|
|