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

    CBitmapButton and 24bits pictures

    hi,
    i'm trying to construct dynamically a CBitmapButton and i have an assertion fault when i use a bitmap that is not 4bpp.
    Is there a way to avoid that problem ?
    If not, how to have transparency with 4bpp ?
    Here is part of the code that crashes :
    Signal.Boutton.Create(szState, BS_OWNERDRAW|WS_VISIBLE|WS_CHILD,
    CRect(GetEnd().GetX()-10,
    GetEnd().GetY()-20,
    GetEnd().GetX(),
    GetEnd().GetY()),
    AfxGetMainWnd(),
    WM_USER+GetNumber());
    Signal.Boutton.LoadBitmaps(IDB_RED);

    Pascal Van Caldenborgh
    Telecom and Real-Time Analyst Programmer

  2. #2
    Join Date
    Apr 1999
    Posts
    16

    Re: CBitmapButton and 24bits pictures

    Why you use the owner-draw style when you creating the button,this is the fail cause,
    remove it and try again,you will find it works.


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