Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Bitmap in headcontrol does not work fine in Windows XP style

Bitmap in headcontrol does not work fine in Windows XP style

Scheduled Pinned Locked Moved C / C++ / MFC
helpdatabasegraphicsquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lisoft
    wrote on last edited by
    #1

    Hi all: I have a program using a listctrl to display information from database which can sort the data by left click the headcontrol and then an image represent the sort state will be displayed. Everything works fine except running in Windows XP style. When I drag the column head with sort state image on it, the drag image become a whole black thing with nothing on it instead of the normal drag image with some transparency. This happens only for columns which have the sort state image on. I use the following steps to set the sort image on the headcontrol: CBitmap *pTempBmp = NULL; if( bAsc ) pTempBmp = &m_bmpArrowUp; // m_bmpArrowUp is a pre-loaded bitmap object else pTempBmp = &m_bmpArrowDown;// m_bmpArrowDown is a pre-loaded bitmap object HD_ITEM Item; Item.mask = HDI_FORMAT; GetItem( nCol, &Item ); Item.mask = HDI_BITMAP | HDI_FORMAT; Item.fmt |= HDF_BITMAP; Item.hbm = (HBITMAP)pTempBmp->GetSafeHandle(); SetItem( nCol, &Item ); So can anybody help me to solve this tiny problem?

    Lisoft

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups