Announcement

Collapse
No announcement yet.

Remove Buttons entirely from a window

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Remove Buttons entirely from a window

    How do you Remove Buttons entirely from a window.

    Lets say I create a window with a button on it
    and I only need that button while some process is going.
    After that I need it to dissapear, perhaps even add something
    in its place (not another button)

    I guess I could do it with a child window but then I got all that
    code and a callback function etc etc. If I could ERASE the CONTROL
    alltogether that would be much easier for me.

    CONTROL ERASE hDlg, 101

    ------------------
    Kind Regards
    Mike

  • #2
    I Think I have some code at home that does that, but I am just taking a swag here, may want to try it though...

    SendMessage hWnd,%WM_DELETEITEM, GetDlgItem(hWnd,101) (Or just use %myitem), 0




    ------------------
    Scott Turchin
    MCSE, MCP+I
    Computer Creations Software
    http://www.tngbbs.com/ccs
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

    Comment


    • #3
      Either hide the button with: ShowWindow GetDlgItem(hDlg, 101), %SW_HIDE
      or destroy the button with: DestroyWindow GetDlgItem(hDlg, 101)


      ------------------

      Comment


      • #4
        How about the DDT statement CONTROL KILL?

        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment


        • #5
          Along the same lines as this thread, is there a way to ADD a
          control to a DDT dialog WHILE it's being displayed? Common
          sense suggests to me that there isn't, but, I've got VERY little
          experience in that sort of programming, so, if somebody could
          let me know, it'd be greatly appreciated.

          Thanks in advance!


          ------------------
          Clay C. Clear

          mailto:[email protected][email protected]</A>

          Clay Clear's Software

          Comment


          • #6
            CONTROL ADD can be used to add controls to a dialog at any time. Just
            remember to prepare ID's in advance and whatever code needed for the
            new control under for example the dialog's WM_COMMAND.


            ------------------

            Comment


            • #7
              Thanks, Borje! That's the info I needed!

              Regards,


              ------------------
              Clay C. Clear

              mailto:[email protected][email protected]</A>

              Clay Clear's Software

              Comment

              Working...
              X