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 not getting loaded

Bitmap not getting loaded

Scheduled Pinned Locked Moved C / C++ / MFC
c++graphics
10 Posts 3 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.
  • S Offline
    S Offline
    sheetal_06
    wrote on last edited by
    #1

    Hi, I have written a code like this: .h file ======= class CPressuresResultsPropertyPage : public CPropertyPage { CBitmapButton m_BitMapButton; }; .cpp file ========= BOOL CPressuresResultsPropertyPage::OnInitDialog() { CPropertyPage::OnInitDialog(); m_BitMapButton.AutoLoad(IDC_ROTATE,this); } After VS2005 conversion the button is not loading the bitmap IDC_ROTATE.Before that it was working properly. If the dialogs immediate base class is CDialog then it is loading the bitmap.Eventhough CPropertyPage is inherited from CDialog the bitmap is not getting loaded. Thanks.

    S H 2 Replies Last reply
    0
    • S sheetal_06

      Hi, I have written a code like this: .h file ======= class CPressuresResultsPropertyPage : public CPropertyPage { CBitmapButton m_BitMapButton; }; .cpp file ========= BOOL CPressuresResultsPropertyPage::OnInitDialog() { CPropertyPage::OnInitDialog(); m_BitMapButton.AutoLoad(IDC_ROTATE,this); } After VS2005 conversion the button is not loading the bitmap IDC_ROTATE.Before that it was working properly. If the dialogs immediate base class is CDialog then it is loading the bitmap.Eventhough CPropertyPage is inherited from CDialog the bitmap is not getting loaded. Thanks.

      S Offline
      S Offline
      Sarath C
      wrote on last edited by
      #2

      are you sure the bitmap ID is valid? Please break into CBitmapButton::AutoLoad function in debug mode and check what is the strange thing happening?

      -Sarath. "Great hopes make everything great possible" - Benjamin Franklin

      My blog - Sharing My Thoughts, An Article - Understanding Statepattern

      S 1 Reply Last reply
      0
      • S Sarath C

        are you sure the bitmap ID is valid? Please break into CBitmapButton::AutoLoad function in debug mode and check what is the strange thing happening?

        -Sarath. "Great hopes make everything great possible" - Benjamin Franklin

        My blog - Sharing My Thoughts, An Article - Understanding Statepattern

        S Offline
        S Offline
        sheetal_06
        wrote on last edited by
        #3

        yes,bitmap id is valid.If i go into Autoload,it is returning success. Please help.It is urgent. Thanks.

        1 Reply Last reply
        0
        • S sheetal_06

          Hi, I have written a code like this: .h file ======= class CPressuresResultsPropertyPage : public CPropertyPage { CBitmapButton m_BitMapButton; }; .cpp file ========= BOOL CPressuresResultsPropertyPage::OnInitDialog() { CPropertyPage::OnInitDialog(); m_BitMapButton.AutoLoad(IDC_ROTATE,this); } After VS2005 conversion the button is not loading the bitmap IDC_ROTATE.Before that it was working properly. If the dialogs immediate base class is CDialog then it is loading the bitmap.Eventhough CPropertyPage is inherited from CDialog the bitmap is not getting loaded. Thanks.

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          Did you set bitmap to true of preperty window of Button?

          S 1 Reply Last reply
          0
          • H Hamid Taebi

            Did you set bitmap to true of preperty window of Button?

            S Offline
            S Offline
            sheetal_06
            wrote on last edited by
            #5

            Hi, Thanks for your suggestion. Bitmap is set to false.That way it is working before VS2005 conversion.Not only that if we make the base class CDialog then tha bitmap is coming.CPropertyPage also has tha base class as CDialog. But as per the design i cannot chabge the base class to CDialog. Please suggest a solution. Regards.

            H 1 Reply Last reply
            0
            • S sheetal_06

              Hi, Thanks for your suggestion. Bitmap is set to false.That way it is working before VS2005 conversion.Not only that if we make the base class CDialog then tha bitmap is coming.CPropertyPage also has tha base class as CDialog. But as per the design i cannot chabge the base class to CDialog. Please suggest a solution. Regards.

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              You must set bitmap to true if you want bitmap on the button but also yo can use of OwnerDraw for set bitmap and some effects to button.

              S 1 Reply Last reply
              0
              • H Hamid Taebi

                You must set bitmap to true if you want bitmap on the button but also yo can use of OwnerDraw for set bitmap and some effects to button.

                S Offline
                S Offline
                sheetal_06
                wrote on last edited by
                #7

                Hi, We are settignowner draw to true and then trying to load the bitmap on to the button.It was working properly before VS2005. Please help. Thanks.

                H 1 Reply Last reply
                0
                • S sheetal_06

                  Hi, We are settignowner draw to true and then trying to load the bitmap on to the button.It was working properly before VS2005. Please help. Thanks.

                  H Offline
                  H Offline
                  Hamid Taebi
                  wrote on last edited by
                  #8

                  Does it work on the vs2003 and not work at vs2005?

                  S 1 Reply Last reply
                  0
                  • H Hamid Taebi

                    Does it work on the vs2003 and not work at vs2005?

                    S Offline
                    S Offline
                    sheetal_06
                    wrote on last edited by
                    #9

                    In Visual Studio 6.0 it was working.In Visual Studio 2005 it is not working.

                    H 1 Reply Last reply
                    0
                    • S sheetal_06

                      In Visual Studio 6.0 it was working.In Visual Studio 2005 it is not working.

                      H Offline
                      H Offline
                      Hamid Taebi
                      wrote on last edited by
                      #10

                      Can you show your code?

                      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