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. VC++/MFC

VC++/MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
8 Posts 4 Posters 23 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.
  • M Offline
    M Offline
    Member_14869339
    wrote on last edited by
    #1

    how to create a button in mfc dialog and drag and drop the button or any control in the same dialog. please answer with complete MFC code. by gopal

    D V L 4 Replies Last reply
    0
    • M Member_14869339

      how to create a button in mfc dialog and drag and drop the button or any control in the same dialog. please answer with complete MFC code. by gopal

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Uhhh...nobody is going to write your code for you. mfc add button to dialog - Google Search[^]

      Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
      Dave Kreskowiak

      1 Reply Last reply
      0
      • M Member_14869339

        how to create a button in mfc dialog and drag and drop the button or any control in the same dialog. please answer with complete MFC code. by gopal

        V Offline
        V Offline
        Victor Nijegorodov
        wrote on last edited by
        #3

        Member 14869339 wrote:

        how to create a button in mfc dialog and drag and drop the button or any control in the same dialog.

        Do you mean the dialog resource editor or you'd like to "drag and drop" existing controls within your running application?

        M 1 Reply Last reply
        0
        • M Member_14869339

          how to create a button in mfc dialog and drag and drop the button or any control in the same dialog. please answer with complete MFC code. by gopal

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          And at some point, you're going to demand a job too, right?

          "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

          1 Reply Last reply
          0
          • M Member_14869339

            how to create a button in mfc dialog and drag and drop the button or any control in the same dialog. please answer with complete MFC code. by gopal

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            You use the resource editor in Visual Studio, which will generate the code for you.

            1 Reply Last reply
            0
            • V Victor Nijegorodov

              Member 14869339 wrote:

              how to create a button in mfc dialog and drag and drop the button or any control in the same dialog.

              Do you mean the dialog resource editor or you'd like to "drag and drop" existing controls within your running application?

              M Offline
              M Offline
              Member_14869339
              wrote on last edited by
              #6

              i mean, create a button or checkbox dynamically on MFC dialog window(not sdi or mdi) and drag and drop that button on the same dialog.(dialog is main window). thanks in advance.

              L V 2 Replies Last reply
              0
              • M Member_14869339

                i mean, create a button or checkbox dynamically on MFC dialog window(not sdi or mdi) and drag and drop that button on the same dialog.(dialog is main window). thanks in advance.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                If you create it dynamically that means you already control where it is positioned. So what do you hope to achieve with drag and drop?

                1 Reply Last reply
                0
                • M Member_14869339

                  i mean, create a button or checkbox dynamically on MFC dialog window(not sdi or mdi) and drag and drop that button on the same dialog.(dialog is main window). thanks in advance.

                  V Offline
                  V Offline
                  Victor Nijegorodov
                  wrote on last edited by
                  #8

                  To create "a button or checkbox dynamically on MFC ... window" you do the following steps: 1. create a variable of the CButton class 2. Call CButton::Create method to create a button or checkbox window. That's all. You only need to read the Microsoft Docs and know the exact size and position of your button within the parent (dialog or form view or some other) window.

                  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