locked
How to load bitmap in statusbar in mfc? RRS feed

  • Question

  • Hi,

    How to load a bitmap in the status bar?

    i dont want to add an external class which includes ownerdraw and drawitem.

    Loading up of bitmap should be in the dialog class and simple lines of codes should suffice the requirements.

    regards

    ewas

    Monday, October 22, 2012 10:47 AM

Answers

All replies

  • Loadin a bitmpa to a statusbar is no a implemented behaviour, witout writing own code you will not get it. You can add an icon to a pane using SB_SETICON message / SetIcon member of CStatusBarCtrl.
    • Edited by Bordon Monday, October 22, 2012 10:57 AM
    Monday, October 22, 2012 10:56 AM
  • Thanks for the reply

    Can we write the piece of code in the dialog class itself, if yes please specify the line of codes it would be really helpful for me

    regards

    ewas

    Monday, October 22, 2012 11:08 AM
  • From my point of few you must modify the Statusbar class not the dialog window code. Yo uhave at least to handle the statusbar paint messages not the dialog window paint messages.

    • Proposed as answer by Elegentin Xie Monday, October 29, 2012 5:39 AM
    • Marked as answer by Elegentin Xie Tuesday, October 30, 2012 7:03 AM
    Monday, October 22, 2012 11:36 AM
    • Proposed as answer by Elegentin Xie Monday, October 29, 2012 5:39 AM
    • Marked as answer by Elegentin Xie Tuesday, October 30, 2012 7:03 AM
    Monday, October 22, 2012 2:34 PM