From: x27 on
Hello

I am trying to extract a bitmap from an imagelist (VC6, SDK, XP and +)

I create a DC(NULL) then i use ImageList_Draw to display the image in this
DC, i get the HBITMAP and it works fine but the image is displayed on
screen. How can i get an invisible DC ?

Jean


From: Christian ASTOR on
On 9 fév, 12:44, "x27" <titanes...(a)blabla.com> wrote:

> I am trying to extract a bitmap from an imagelist (VC6, SDK, XP and +)
> I create a DC(NULL) then i use ImageList_Draw to display the image in this
> DC, i get the HBITMAP and it works fine but the image is displayed on
> screen. How can i get an invisible DC ?

Just use a memory DC (CreateCompatibleDC(), ...)
From: x27 on
>Just use a memory DC (CreateCompatibleDC(), ...)

yes, i tried that but i get a black bitmap

Jean

"Christian ASTOR" <castorix(a)club-internet.fr> a �crit dans le message de
news: 60db5943-0b6a-430d-82d9-4a15ee25acf3(a)3g2000yqn.googlegroups.com...
On 9 f�v, 12:44, "x27" <titanes...(a)blabla.com> wrote:

> I am trying to extract a bitmap from an imagelist (VC6, SDK, XP and +)
> I create a DC(NULL) then i use ImageList_Draw to display the image in this
> DC, i get the HBITMAP and it works fine but the image is displayed on
> screen. How can i get an invisible DC ?

Just use a memory DC (CreateCompatibleDC(), ...)


From: x27 on
OK, i got it :-)
I was using the compatible DC to create my compatible bitmap, i forgot that
to get a colored bitmap i MUST use the original DC :-))))

Jean

"x27" <titanesque(a)blabla.com> a �crit dans le message de news:
4b715576$0$921$ba4acef3(a)news.orange.fr...
> >Just use a memory DC (CreateCompatibleDC(), ...)
>
> yes, i tried that but i get a black bitmap
>
> Jean
>
> "Christian ASTOR" <castorix(a)club-internet.fr> a �crit dans le message de
> news: 60db5943-0b6a-430d-82d9-4a15ee25acf3(a)3g2000yqn.googlegroups.com...
> On 9 f�v, 12:44, "x27" <titanes...(a)blabla.com> wrote:
>
>> I am trying to extract a bitmap from an imagelist (VC6, SDK, XP and +)
>> I create a DC(NULL) then i use ImageList_Draw to display the image in
>> this
>> DC, i get the HBITMAP and it works fine but the image is displayed on
>> screen. How can i get an invisible DC ?
>
> Just use a memory DC (CreateCompatibleDC(), ...)
>