Announcement

Collapse
No announcement yet.

Simple $%@! Dialog ?

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

  • Brad D Byrne
    replied
    Your right Mike

    I was just going to add that--- But Lance replyed perfectly
    before I my post was written


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

    Leave a comment:


  • Michael Mattias
    replied
    Slightly off-topic...

    I notice, Lance, that you addressed the question on the assumption Mr. Byrne was using 'DDT' to create the dialog.

    When I read it, I assumed it was 'SDK' style.

    It might help for anyone asking questions here about GUI concerns to specify (if not obvious) which technique is in use...

    MCM

    Leave a comment:


  • Brad D Byrne
    replied
    Ok--------
    I understand---The handle is defined upon creation of Dlg
    I was trying to give the handle an ID

    Thanks B.

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

    Leave a comment:


  • Brad D Byrne
    replied
    Thanks for response Lance

    I guess I shouldn't ask questions when I'm frustrated,
    I'll clairfy question in a minute-----B

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

    Leave a comment:


  • Lance Edmonds
    replied
    Dialogs use handles, not ID's. Controls have both a handle and an ID.

    When you use DIALOG NEW... TO hDlg& then hDlg& is the dialog window handle. If you are doing this from the dialog's own callback, then use CBHNDL.

    To send a message, use CONTROL SEND, DIALOG SEND or the API functions SendMessage() and PostMessage().
    ie:
    Code:
    ' DDT callback pseudocode
    CALLBACK FUNCTION DlgCB
      SELECT CASE CBMSG
        CASE %WM_COMMAND
          IF CBCTL = %ID_BUTTON AND CBCTLMSG = %BN_CLICKED THEN
            DIALOG SEND CBHNDL, %WM_USER + 999&, wparam&, lparam&
          END IF
        CASE %WM_USER + 999&
          ...
      END SELECT
    END FUNCTION

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

    Leave a comment:


  • Brad D Byrne
    started a topic Simple $%@! Dialog ?

    Simple $%@! Dialog ?

    I'm getting Frustrated!

    Calmly----
    I want to send message to a dialog from inside the
    WndProc function.

    1)How ?
    2)How do you get the Dialog handle when you only know the ID?

    Thanks---- I love this forum B

    ------------------
Working...
X