English
Source / code snippets

adjust Image Bildes Window Size loading

 

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
 
06/05/05  
 



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.
 
06/05/05  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

6.639 Views

Untitledvor 0 min.
H.Brill02/10/22
Tommy05/11/17
Joerg06/16/16
Pedro Miguel09/20/13
More...

Themeninformationen

this Topic has 2 subscriber:

iF (1x)
Frank Abbing (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie