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. function WM_ERASEBKGND

function WM_ERASEBKGND

Scheduled Pinned Locked Moved C / C++ / MFC
9 Posts 5 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.
  • Y Offline
    Y Offline
    yogendra kaushik
    wrote on last edited by
    #1

    plz tell me where i found the function WM_ERASEBKGND to change color in clas wizard OnEraseBkgnd(CDC *pDC) Please mail me

    S V 2 Replies Last reply
    0
    • Y yogendra kaushik

      plz tell me where i found the function WM_ERASEBKGND to change color in clas wizard OnEraseBkgnd(CDC *pDC) Please mail me

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

      1. Go to Class Wizard and select required the message from the class (make sure that you have selected correct class) "Add Handler" there 2. Right click on the class and select "Add Message Handler" SaRath.
      "Do Next Thing..." My Blog | Understanding State Pattern in C++

      Y 1 Reply Last reply
      0
      • S Sarath C

        1. Go to Class Wizard and select required the message from the class (make sure that you have selected correct class) "Add Handler" there 2. Right click on the class and select "Add Message Handler" SaRath.
        "Do Next Thing..." My Blog | Understanding State Pattern in C++

        Y Offline
        Y Offline
        yogendra kaushik
        wrote on last edited by
        #3

        sir i am sorry what i dont understand when i go to class wizard there is no function WM_ERASEBKGND plz help me Please mail me

        S H O 3 Replies Last reply
        0
        • Y yogendra kaushik

          sir i am sorry what i dont understand when i go to class wizard there is no function WM_ERASEBKGND plz help me Please mail me

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

          How you are created you app? using classwizard? SaRath.
          "Do Next Thing..." My Blog | Understanding State Pattern in C++

          Y 1 Reply Last reply
          0
          • S Sarath C

            How you are created you app? using classwizard? SaRath.
            "Do Next Thing..." My Blog | Understanding State Pattern in C++

            Y Offline
            Y Offline
            yogendra kaushik
            wrote on last edited by
            #5

            i made a dialog based application and now i want to change my dialog box color i know that WMPAINT work for this what i want to use WM_ERASEBKGND could it be possible Please mail me

            S 1 Reply Last reply
            0
            • Y yogendra kaushik

              sir i am sorry what i dont understand when i go to class wizard there is no function WM_ERASEBKGND plz help me Please mail me

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

              one simple way insert this codes in your file(I think you need to learning VC)but anyway for solve your problem use this in header file afx_msg BOOL OnEraseBkgnd(CDC* pDC); in cpp file insert BOOL your class name::OnEraseBkgnd(CDC* pDC) { // TODO: Add your message handler code here and/or call return CDialog::OnEraseBkgnd(pDC); }_**


              **_

              whitesky


              1 Reply Last reply
              0
              • Y yogendra kaushik

                plz tell me where i found the function WM_ERASEBKGND to change color in clas wizard OnEraseBkgnd(CDC *pDC) Please mail me

                V Offline
                V Offline
                Viorel
                wrote on last edited by
                #7

                You should open your dialog in dialog editor and then click on caption bar of your dialog. Then go to View --> Properties Window, activate the panel with Windows messages by clicking a toolbar button. Then select WM_ERASEBKGND event and add the handler. The simplest handler can look like this:

                BOOL CMyDialog::OnEraseBkgnd(CDC * pDC)
                {
                	pDC->FillSolidRect(0, 0, 32000, 32000, RGB(0, 0, 255)); // blue
                	return TRUE;
                }
                
                1 Reply Last reply
                0
                • Y yogendra kaushik

                  sir i am sorry what i dont understand when i go to class wizard there is no function WM_ERASEBKGND plz help me Please mail me

                  O Offline
                  O Offline
                  ovidiucucu
                  wrote on last edited by
                  #8

                  Depending on the class type (e.g. Dialog, MDI Child Frame, etc.), ClassWizard filters the messages. To show all messages do the following:

                  • select "Class Info" tab;
                  • from "Message filter" combo box, choose "Window";
                  • go back to "Message Maps" tab; now all available messages are displayed in the "Messages" list.

                  Ovidiu Cucu Microsoft MVP - Visual C++

                  1 Reply Last reply
                  0
                  • Y yogendra kaushik

                    i made a dialog based application and now i want to change my dialog box color i know that WMPAINT work for this what i want to use WM_ERASEBKGND could it be possible Please mail me

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

                    yes SaRath.
                    "Do Next Thing..." My Blog | Understanding State Pattern in C++

                    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