English
Forum

Iconhandle from Memory bitmap

 

Jörg
Sellmeyer
is it possible from the Memory bitmap one Iconhandle To get?
One Bitmaphandle goes, Thanks Uwe Pascal Niemeier:
CompileMarkSeparation
window 100,100-300,300
settruecolor 1
 $H Windows.ph
 $H Messages.ph
declare bmp&,Static&
mcls 100,100
startpaint -1
cls rgb(255,255,0)
usepen 0,5,rgb(255,0,255)
usebrush 1,rgb(0,255,255)
rectangle 10,10,90,90
--------------------------------------------------
bmp&=~GetCurrentObject(%hdc,~OBJ_BITMAP)
~DeleteDC(%hdc)
--------------------------------------------------
endpaint
Static&=control(static,,$5040000e,50,50,0,0,%hwnd,1,0)
sendmessage(Static&,~STM_SETIMAGE,0,bmp&)
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
09/06/06  
 




Sebastian
König
Hello Jörg,

a Possibility would this here (simply to the EndPaint in your Sourcecode insert):
CompileMarkSeparation
--------------------------------------------------
struct IconInfo = ~IconInfo
declare ii#
dim ii#,IconInfo

with ii#

    .fIcon& = 1
    .hbmMask& = Bmp&
    .hbmColor& = Bmp&

endwith

declare Icon&
Icon& = ~CreateIconIndirect(ii#)
~DrawIcon(%hdc,0,0,Icon&)
-------------------------------------------------2>-

unfortunately becomes thereby The Size automatically minimizes, by me on 32x32... but really should the Bitmap too directly into a ImageList insert let - what very goes because there schief?

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
09/06/06  
 




Jörg
Sellmeyer
thanks, Sebastian!
the functions. If I bmp& directly on

Def @ImageList_AddIcon(2) !comctl32.dll,ImageList_AddIcon

commit, functions not. then is no Icon in the List view To see. with Your code goes it.
depending on How I The Imagelist dimensioniere is too the Icon properly big (too larger as 32x32)

Greeting
Jörg
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
09/06/06  
 




Sebastian
König
I have it now not probiert, but really müsstest You herewith too directly the Bitmap-lever using can:


int ImageList_Add(
HIMAGELIST himl,
HBITMAP hbmImage,
HBITMAP hbmMask
);
[...]
-- himl
lever to the image list.
-- hbmImage
lever to the bitmap that contains the image or images. The number of images is inferred from the width of the bitmap.
-- hbmMask
lever to the bitmap that contains the mask. If no mask is used with the image list, this parameter is ignored.


Presumably does AddIcon namely nothing other, as the two Bitmaps again from the Icon To procure and so Add aufzurufen...

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
09/06/06  
 




Jörg
Sellmeyer
super! the wars. thanks!
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
09/06/06  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.572 Views

Untitledvor 0 min.
H.Brill09/18/23
Jörg Sellmeyer06/05/20
Uwe Lang03/25/20
Ernst05/16/14
More...

Themeninformationen

this Topic has 2 subscriber:

Jörg Sellmeyer (3x)
Sebastian König (2x)


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