Announcement

Collapse
No announcement yet.

Edit control

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

  • Graham Guthrie
    replied
    Thank you for your quick reply Lance.
    I used the API you recomended and now working fine.

    Thank you, rgds Graham.

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

    Leave a comment:


  • Lance Edmonds
    replied
    POwerGEN generates pure SDK-style API-based code. Because your controls and dialogs are created this way, you cannot use DDT statements to communicate with the controls because the DDT engine did not create the controls (ie, there are no internal "tables" for DDT to utilize).

    In general terms, you should avoid intermixing SDK code with DDT... it is possible to use most API calls with DDT dialogs and controls, however the reverse is not true.

    Solution: instead of using CONTROL GET TEXT, use the GetWindowText() API function.


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

    Leave a comment:


  • Graham Guthrie
    started a topic Edit control

    Edit control

    This is my first attempt at windows programming and I am having a problem in retrieving data from an edit control. Can someone help. What am I doing wrong?

    I used DLGEDIT to create my dialog and added a number of radio buttons, push buttons and 1 edit box. Created the .rc and .pbr files and then used powerGEN to create the .bas .inc files.

    I wanted to use the en_change event on the edit control to initiate the reading of the value that had been entered into the edit control. The code in the En_change event is as follows:
    Code:
    Function MainWnd_IDCount_En_change(ByVal hDlg As Dword, ByVal wParam As Dword, ByVal lParam As Dword) As Long
    Control Get Text %DLGmain,%IDCount To count$
    Comm Send #hComm, count$
    End Function
    count$ never gets updated and is always blank. What am I doing incorrectly?

    Graham.
    Last edited by Gary Beene; 19 Jul 2014, 08:06 PM. Reason: Code: tag
Working...
X
😀
🥰
🤢
😎
😡
👍
👎