Results 1 to 3 of 3

Thread: Windows API

  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
    57
    Posts
    8,777
    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/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  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

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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