Announcement

Collapse
No announcement yet.

Easy Click Question

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

  • Easy Click Question

    In my message pump I've got code to save a ton of variables..
    It's what the app does.

    Rather than gather all these variables from the dialog box/text boxes etc twice and have repetitive code I just need to either SAVE to the same file or if no filename exists I will use the SAVEAS.

    However, if a filename DOES exist, then I want the SAVEAS to come up when the SAVEAS menu is clicked.

    I do not recall how to differentiate how a menu was clicked with %BM_CLICK..???


    Case %IDM_SAVE, %IDM_SAVEAS
    IF WAS CLICKED IDM_SAVEAS Then always show dialog box else just save.


    Thanks!

    Scott
    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

  • #2
    OK That was easy.

    Code:
    Case %IDM_SAVE, %IDM_SAVEAS
          If LoWrd(CbWParam) = %IDM_SAVEAS And CbCtlMsg = %BN_CLICKED Then MsgBox "YES!" Else Exit Function
           'Same Function except SAVEAS will use the file dialog for a new name
    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
      Another way, see PBNOTE.BAS example.
      The world is full of apathy, but who cares?

      Comment

      Working...
      X