CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2008
    Posts
    7

    query Related to LoadImage function

    Hello Friends,

    I have developed one ATL com dll for IE tool bar.
    My Ie toolbar is having buttons which i have created dynamically.
    buttons are having Icon images also.
    but i am facing one problem...
    I can show only the Icon with "Bit Depth=8" of .ico image.
    Actually i want to show Icons with "Bit Depth=32" also.
    I am using below code..

    UINT colormap = LR_DEFAULTSIZE |LR_LOADMAP3DCOLORS| LR_LOADFROMFILE | LR_CREATEDIBSECTION|LR_LOADTRANSPARENT;

    HBITMAP hBitmap =(HBITMAP) ::LoadImage ((HINSTANCE)::GetModuleHandle(NULL),ImagePath,IMAGE_BITMAP,0,0,colormap);

    In above code...
    while Debugging i came to know that i am getting null in hBitmap variable for Icons with "Bit Depth=32". for Bit Depth=8 it is working fine.

    Please suggest me the solution....

  2. #2
    Join Date
    Sep 2010
    Posts
    29

    Re: query Related to LoadImage function

    UP

    (same problem: i can only draw 32 bit-depth icons and I want to draw 16 ones).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured