Results 1 to 3 of 3

Thread: Windows API

Share/Bookmark
  1. #1

    Windows API

    How would I go about converting PowerBasic code which uses the API? The interpreter doesn't like "getdlgitem" for example. Do I have to include other modules than GUI to do this, and if so, which?



  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    50
    Posts
    8,113
    Blog Entries
    2
    Rep Power
    10

    Re: Windows API

    Chris,

    thinBasic API declaration is almost the same as PowerBasic or FreeBasic. Just add the same DECLARE you would do in PowerBasic:

    [code=thinbasic]


    DECLARE FUNCTION GetDlgItem LIB "USER32.DLL" ALIAS "GetDlgItem" (BYVAL hDlg AS DWORD, BYVAL nIDDlgItem AS LONG) AS DWORD



    [/code]

    Than use GetDlgItem(...) as you would in PowerBasic.
    In general thinBasic declares are very compatible with PowerBasic INC files apart MACRO command. thinBasic does not manage macro commands (for the moment).

    Some often used API has been created in thinBasic as native keywords. For example API IsIconic has its thinBasic equivalent WIN_IsIconic, API GetForeGroundWindow has its thinBasic equivalent WIN_GetForeGround, and so on.

    Regarding standard windows equates, we have included a lot in UI (User Interface) module. You can get the list of them using the following attached script.

    Hope to have replied to your question.
    Ciao
    Eros

    Attached Files Attached Files
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  3. #3

    Re: Windows API

    Thanks Eros!

Similar Threads

  1. Windows on Mac Pro
    By jack in forum Shout Box Area
    Replies: 0
    Last Post: 28-03-2011, 00:44
  2. Windows 95
    By JosephE in forum General
    Replies: 13
    Last Post: 10-09-2010, 03:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •