English
Forum

DrawPic

 
- Page 1 -



Georg
Hovenbitzer
Hello together,

how can I one with Create(hSizedPic erzeugtes and DrawPic angezeigtes Image again delete ?
without the program To terminate and new to start
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
04/11/07  
 



 
- Page 1 -


@Georg
means by me works it
CompileMarkSeparation
Declare bild&,pfad$
pfad$=GETDIR$(@)
bild&=Create(hPic,-1,pfad$+\test.bmp) Dein Bild einsetzen
CLS RGB(255,255,0)
DrawSizedPic bild&, 50,50-150,150;0
WAITINPUT
USEBRUSH 1,RGB(255,255,0)
USEPEN 0,1,RGB(255,255,0)
RECTANGLE 50,50-200,200
WAITINPUT
04/12/07  
 




Peter
Max
Müller
and here with Statik:
CompileMarkSeparation
 $H WINDOWS.PH
DEF LoadImage(6)         ! USER32,LoadImageA
Declare bild&,pfad$,image$,bmpstat&
Pfad$=GETDIR$(@)
Image$=Create(hPic,-1,pfad$+\test.bmp)Dein Bild einsetzen
CLS RGB(255,255,0)
BmpStat& = Control(STATIC,,$5400130E,50,50,150,150,%hwnd,0,%hinstance,$0)
Bild& = ~LoadImage(0,Addr(Image$),~IMAGE_BITMAP,150,150,~LR_LOADFROMFILE)
SendMessage(BmpStat&,~STM_SETIMAGE,~IMAGE_BITMAP,BILD&)
WAITINPUT
ShowWindow(BmpStat&,0)
WAITINPUT
ShowWindow(BmpStat&,1)
WAITINPUT
XProfan X3, X4ß, Win 10.1
04/12/07  
 



@Peter
Since I PROFAN-Purist be, are by me naturally The Opportunities of XProfan primarily. therefore position itself me The question, Why for task, one Bildchen To delete, same The windows.ph To bemühen. already The Zeilenzahl is with my code small and probably therefore too resourcenschonender or
 
04/12/07  
 




Jörg
Sellmeyer
Horst horn
@Peter
Since I PROFAN-Purist be, are by me naturally The Opportunities of XProfan primarily. therefore position itself me The question, Why for task, one Bildchen To delete, same The windows.ph To bemühen. already The Zeilenzahl is with my code small and probably therefore too resourcenschonender or


Hello Horst,
by the windows.ph increased not The Zeilenzahl Your Program! The Compiler sees in the *.ph-File to Begriffen, The in the Source with of/ one Tilde (~) eingeleitet and be supplant these by the suitable worth from the *.ph-File. its simply one expressed komfortables Profanfeature.
Greeting
Jörg
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/12/07  
 



@rather Jörg
my code exists from 11 Lines and two variables -

The Code Peter contain 15 Lines and 4 variables -
in the Grunde too unwichtig. what I with my Erbsenzählerei say wants, is the following:
one must still not always with Kanonen on Spatzen shooting ! -


its simply one expressed komfortables Profanfeature.


Womit You without doubt right have. but must it always apply go - this is here The question ?
 
04/12/07  
 



Ne XProfan.PH increased IMHO The Zeilenanzahl not - power but the Compile gammy - the reading lasts forever... thatswhy XPSE - no PHs - blitzschnelle Umsetzung the Apis.
 
04/12/07  
 



 
- Page 2 -


Have I the Topic misses?!

If itself the image patu not of Window Remove can (hwnd?) can You too time try directly on the hdc2 To malen. XProfan uses whom well at hwnd for restore.
 
04/12/07  
 




Peter
Max
Müller

must time try it on one Static To lay and this To destroy.


therefore the of me gepostete code.
the many ways to Rom lead (and many Lösungsansätze to Problemlösung) might generally famous his.

Tschüssikovski
 
XProfan X3, X4ß, Win 10.1
04/12/07  
 




Dieter
Zornow
Hello Peter,

Why using You Loadimage, the can Yes only Bmp loading mach it still simply so
CompileMarkSeparation
Declare bild&,bmpstat&
 $H Windows.ph
CLS RGB(255,255,0)
bild&=Create(hPic,-1,dein bild)Dein Bild einsetzen
BmpStat& = Control(STATIC,,$5400130E,50,50,150,150,%hwnd,0,%hinstance,$0)
SendMessage(BmpStat&,~STM_SETIMAGE,~IMAGE_BITMAP,BILD&)
WAITINPUT
ShowWindow(BmpStat&,0)
WAITINPUT
ShowWindow(BmpStat&,1)
WAITINPUT
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
04/12/07  
 




Peter
Max
Müller
Nabend,
the GetDir Gedöns have I from the Vorposting simply übernommen.
use I really too never.but what reserves.are hold only Examples.

and LoadImage have I only taken because the Codeschnipsel so in of my PRF-Sammelkiste was.
without the now moreover ausgetestet to have see I but the with the LoadImage Solution The Bildgröße with indicated go can.

Machts well.
 
XProfan X3, X4ß, Win 10.1
04/12/07  
 




Georg
Hovenbitzer
Hello together,

many Thanks for many hints
three Solutions klappen:
- one CLS (by me of course not, I already something drawn have and this then lane is)
- with RECTANGLE
- and the Static

time see I take will be.
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
04/12/07  
 




Frank
Abbing
You can whom HDC and so too The Bitmap solve with the API SelectObject. Übergib simply a zero, and the Return Value destroy You with DeleteObject. this is the regular vorgesehene lane.
 
04/13/07  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.618 Views

Themeninformationen



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