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. Changing position of a CButton

Changing position of a CButton

Scheduled Pinned Locked Moved C / C++ / MFC
c++visual-studiohelptutorialquestion
4 Posts 4 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.
  • D Offline
    D Offline
    Donguy1976
    wrote on last edited by
    #1

    Hello All, I have a MFC app in VS 6.0 in which am trying to move the postion of a button during the run time. I am calling function SetWindowPos and for some reason it's not working. I tried MoveWindow and that too didn't work. The same code runs on a different dialog with a different (ID) button. But for some reason the SetWindowPos & MoveWindow functions are not working in this particular dialog. Is there any reason for that? like, all controls are locked or something.... How to resolve this issue? Thanks in advance.

    L _ M 3 Replies Last reply
    0
    • D Donguy1976

      Hello All, I have a MFC app in VS 6.0 in which am trying to move the postion of a button during the run time. I am calling function SetWindowPos and for some reason it's not working. I tried MoveWindow and that too didn't work. The same code runs on a different dialog with a different (ID) button. But for some reason the SetWindowPos & MoveWindow functions are not working in this particular dialog. Is there any reason for that? like, all controls are locked or something.... How to resolve this issue? Thanks in advance.

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

      Without seeing your code it is impossible to guess what you may be doing.

      Use the best guess

      1 Reply Last reply
      0
      • D Donguy1976

        Hello All, I have a MFC app in VS 6.0 in which am trying to move the postion of a button during the run time. I am calling function SetWindowPos and for some reason it's not working. I tried MoveWindow and that too didn't work. The same code runs on a different dialog with a different (ID) button. But for some reason the SetWindowPos & MoveWindow functions are not working in this particular dialog. Is there any reason for that? like, all controls are locked or something.... How to resolve this issue? Thanks in advance.

        _ Offline
        _ Offline
        _Superman_
        wrote on last edited by
        #3

        Controls cannot be locked. The reason for it not working is definitely something wrong with the code. So as Richard said, we need to see it.

        «_Superman_»  _I love work. It gives me something to do between weekends.

        _Microsoft MVP (Visual C++) (October 2009 - September 2013)

        Polymorphism in C

        1 Reply Last reply
        0
        • D Donguy1976

          Hello All, I have a MFC app in VS 6.0 in which am trying to move the postion of a button during the run time. I am calling function SetWindowPos and for some reason it's not working. I tried MoveWindow and that too didn't work. The same code runs on a different dialog with a different (ID) button. But for some reason the SetWindowPos & MoveWindow functions are not working in this particular dialog. Is there any reason for that? like, all controls are locked or something.... How to resolve this issue? Thanks in advance.

          M Offline
          M Offline
          Marco Bertschi
          wrote on last edited by
          #4

          Donguy1976 wrote:

          all controls are locked or something....

          Controls can't be locked. Show use the code...

          cheers Marco Bertschi


          Software Developer Twitter | Facebook | Articles


          You have absolutely no idea how glad I am that I have no idea at all. - OriginalGriff

          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