English
Forum

LoadExtMemory and Static area

 
Hello people,

plenty have I not yet with Prospeed made and therefore can it his the my question laughter auslöst.
one can Yes a Static area one BMP allocate, what before with LoadImageA read has. The background is, that one then beautiful Scrolling can without itself around the Neuaufbau the Fensters To concern.
now try I one Image I before with LoadExtMemory prepares have by SendMessage on the Static Field To transfer, what naturally not goes.
gives it a Possibility, that the Static Field the image on takes?
or a How I one Image one with CreateWindow erstelltem Window, what small as the image is, Show can and then with Scrollbars it move can?

greetings
Georg
 
04/24/04  
 



Hello Georg.

Why laughter ?
You commit the Static, to my knowledge, a lever on a Bitmap. ProSpeeds LoadExt...() gives you but whom lever the HDCs back, on whom The Bitmap yoked is. so functions SendMessage naturally not.
You müßtest whom lever the Bitmap the HDC inquire, the goes through the API GetCurrentObject():

bitmaphandle&=GetCurrentObject(prospeedhdc&,7) 7 = OBJ_BITMAP

of these lever should it free from problems functions...

Greeting, Frank
 
04/24/04  
 



Hello Frank,

many Thanks for response.
unfortunately klapt it not yet integrally, one sees of course the something happens but the image won't angezeit, see code.

directly another others question, if The Desktopauflösung from 16bit standing and one one 24bit Image indicating come into being naturally Schlieren. Can this somehow bypass, because if I it me in a Grafikprogramm ansehe becomes it correctly. displayed.

greetings
Georg
CompileMarkSeparation
 $I ProSpeed_UseDll.inc
 $I Prospeed_Funktionen.inc
DEF GetCurrentObject(2) ! "GDI32","GetCurrentObject"
Declare Bild$,Lenght&,Memory#,BildHDC&,BildHandle&,ExFenster&,BildFenster&
WindowStyle $200 + $8
WINDOW 150,100-800,600
WINDOWTITLE "HauptFenster"
SETTRUECOLOR 1
CLS RGB(212,208,200)
Bild$ = "bild.bmp"
Lenght& = FileSize(Bild$)
Dim Memory#,Lenght&
ReadFileFast(Addr(Bild$),Memory#,0,Lenght&)
BildHDC& = LoadExtMemory(Memory#,Lenght&)
BildHandle& = GetCurrentObject(BildHDC&,$7)
ExFenster& = CreateWindow(%HWND,"Test",50,50,700,500)
BildFenster& = Control("STATIC","",$5000110E,10,10,650,400,ExFenster&,2001,%hinstance)
SendMessage(BildFenster&,$172,0,BildHandle&)
WaitInput
DestroyWindow(ExFenster&)
Dispose Memory#
FreeAllExtBmps()
 $I ProSpeed_FreeDll.inc
End
 
04/24/04  
 



Hi,

can you me whom Source plus benötigter Files zusenden?
then can ichs rather testing...

Greeting, Frank
 
04/24/04  
 



Hi,

ok, Have whom Source modifiziert, sodas it now functions.
for any others Mitleser: the Have I Georg written:

so, Have your code modifiziert.
The Static-Message STM_SETIMAGE functions only with Bitmaps, The not on a HDC yoked are.
this is sometimes so, and only M$ white Why... has me yourself already some hairs cost[ed]

well Yes, I create now a Pseudobitmap and yoking tappt im dunkeln on whom HDC. Freundlicherweise becomes our Bitmap therefore
ausgekoppelt and the lever becomes zurückgegeben. we save us therefore GetCurrentObject.
on the end (as long as the Static existing!) becomes again zurückgekoppelt and the Pseudobitmap deleted.
so simply is the )
CompileMarkSeparation
 $I ProSpeed_UseDll.inc
 $I Prospeed_Funktionen.inc
DEF CreateCompatibleBitmap(3) ! "GDI32","CreateCompatibleBitmap"
DEF SelectObject(2) ! "GDI32","SelectObject"
Declare Bild$,Lenght&,Memory#,BildHDC&,ExFenster&,BildFenster&,XBig&,YBig&,x&,y&
WindowStyle $200 + $8
WINDOW 150,100-800,600
WINDOWTITLE "HauptFenster"
SETTRUECOLOR 1
CLS RGB(212,208,200)
Bild$ = "test.jpg"
Lenght& = FileSize(Bild$)
Dim Memory#,Lenght&
ReadFileFast(Addr(Bild$),Memory#,0,Lenght&)
BildHDC& = LoadExtMemory(Memory#,Lenght&)
XBig& = GetBmpWidth(BildHDC&)
YBig& = GetBmpHeight(BildHDC&)
x&=CreateCompatibleBitmap(BildHDC&,100,100) Irgendeine Bitmap erstellen
y&=SelectObject(BildHDC&,x&) und an den HDC koppeln. y&=Vorheriger Bitmaphandle (also unser)
ExFenster& = CreateWindow(%HWND,"Test",50,50,650,650)
BildFenster& = Control("STATIC","",$5000110E,10,10,XBig&,YBig&,ExFenster&,2001,%hinstance)
SendMessage(BildFenster&,$172,0,y&) STM_SETIMAGE
WaitInput
DestroyWindow(ExFenster&)
Dispose Memory#
SelectObject(BildHDC&,y&) Ursprüngliche Bitmap (unsere) wieder einsetzen
DeleteObject x& und die "irgendeine" ordnungsgemäß löschen
FreeAllExtBmps()
 $I ProSpeed_FreeDll.inc
End

Greeting, Frank
 
04/24/04  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.815 Views

Untitledvor 0 min.
funkheld01/15/22
Uwe Lang02/07/19
Andreas Koch12/19/11

Themeninformationen

this Topic has 1 subscriber:

unbekannt (5x)


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