Announcement

Collapse
No announcement yet.

Control Send Statement

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

  • Control Send Statement

    I call for a report in “Report.dll” I enter into a DDT dialog that lets me select criteria for this report. The are 2 control buttons. “Continue Report” and “Cancel” My problem is that I wish to terminate the program at the end of printing or viewing the report using a “Control Send Statement” in the program instead of returning to the dialog and pressing the Cancel Button.

    I can not determine from the documation what the message should be. What should “msg&” be to cause the control to call it's callback routine as if the button had been pressed.? I know this is badly worded but I hope my problem is clear. I cannot make heads or tails of the Control Send Statement on page 213 of PB/DLL60 printed manual.

    Thanks in Advance

    Bruce




    [This message has been edited by Bruce Singleton (edited February 16, 2000).]

  • #2
    Hi Bruce,

    The win32api.hlp file says this in the messages section for buttons:

    BM_CLICK

    An application sends a BM_CLICK message to simulate the user clicking a button. This message causes the button to receive a WM_LBUTTONDOWN and a WM_LBUTTONUP message, and the button's parent window to receive a BN_CLICKED notification message.

    BM_CLICK
    wParam = 0; // not used; must be zero
    lParam = 0; // not used; must be zero


    Parameters

    This message has no parameters.

    Return Values

    This message does not return a value.

    So try this:
    control send hdlg,buttonid,%BM_CLICK,0,0

    Replace hDlg with the handle of the parent window that the button belongs to,buttonid is of course the id for your button, next is the message you want to send - in this case the %BM_CLICK message and then followed by the first and second message parameters for the %BM_CLICK message, in this case as stated in the help guide there are none so you would use 0's. Try putting the statement at the end of your printing code.

    See if that doesn't work for ya'.

    See ya',
    Adam

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

    Comment


    • #3
      Adam
      The Control Send syntax works great. Again I am reminded that I must read the Help files very very slowly . Thanks for your help.

      Bruce


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

      Comment

      Working...
      X