Theos PowerBasic Museum 2017

Webmaster: José Roca (PBWIN 10+/PBCC 6+) (SDK Forum) => Windows API Headers => Topic started by: José Roca on October 18, 2013, 12:01:48 AM

Title: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 12:01:48 AM
 
This project is an effort to translate the C headers of the Microsoft Platform SDK for Windows to PowerBASIC™. This version has been updated using the SDK for Windows 7.1.

These headers are freeware, not public domain. This means that you can use them for your own purposes, even in commercial applications, without paying a fee, but not to make derivative works from, sell or redistribute without permission. Also you must assume the entire risk of using them. Downloading the software indicates that you accept these terms.

Because of the use of new data types only available in PNWIN 10.0+ and PBCC 6.0+ and other features, they can only be used with the new compilers.

You must also be aware that these headers are not extensions to the ones provided with the compiler, but a full replacement. Therefore, you must not mix them with the PowerBASIC include files in any way, neither directly (via #INCLUDE), nor indirectly (via the include path in the IDE).

Unzip the attached file to a folder of your choice and replace the PB Include path in the PB Ide or the editor that you are using to that folder instead of C:\PBWin10\WinApi.

The wrapper functions for the Common Controls have been removed from CommCtrl.inc and placed in the following individual files. Therefore, the use of constants such %NOTOOLBAR, %NOUPDOWN, etc., is no longer needed. Just #INCLUDE the wanted files in your application.

AnimateCtrl.inc (Animation control)
ButtonCtrl.inc (Button control)
ComboBoxCtrl.inc (ComboBox control)
ComboBoxExCtrl.inc (ComboBoxEx control)
DateTimeCtrl.inc (Date Time control)
EditCtrl.inc (Edit control)
HeaderCtrl.inc (Header control)
HotKeyCtrl.inc (Hot Key control)
IPAddressCtrl.inc (IP Address control)
ListBoxCtrl.inc (ListBox control)
ListViewCtrl.inc (ListView control)
MonthCalCtrl.inc (Month Calendar control)
PagerCtrl.inc (Pager control)
ProgressBarCtrl.inc (Progress Bar control)
RebarCtrl.inc (Rebar control)
RichEditCtrl.inc (Rich Edit control)
ScrollBarCtrl.inc (Scroll Bar control)
StaticCtrl.inc (Static control)
StatusbarCtrl.inc (Status Bar control)
SysLinkCtrl.inc (SysLink control)
TabCtrl.inc (Tab control)
TaskDialogCtrl.inc (Task Dialog control)
ToolbarCtrl.inc (Toolbar control)
TrackbarCtrl.inc (Track Bar control)
TreeViewCtrl.inc (TreeView control)
UpDownCtrl.inc (UpDown control)

There are 1,199 files using 78,431,562 bytes.
Title: Windows API Headers III v.1.04 Help File
Post by: José Roca on October 18, 2013, 12:02:54 AM
Help file for the main classes and wrapper functions available in the version 3.1.04 of the Windows API Headers for PBWin 10+ and PBCC 6+.
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 12:05:44 AM
This is a maintenance release with some headers updated.
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 12:53:23 AM
Help file for the CSQLite3 class.
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 12:54:39 AM
Hel file for GdiPlus
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 12:56:21 AM
Help file for Windows GDI.
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 12:57:08 AM
Help file for ODBC.
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 12:58:44 AM
Help file for ADO.
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 12:59:54 AM
Help file for Scripting interfaces.
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 01:00:54 AM
Help file for WMI.
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 01:01:30 AM
Help file for WinHTTP.
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 01:02:33 AM
Help file for Structured Storage.
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 01:03:29 AM
Help file for MSXML.
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 01:05:23 AM
Help file for the WebBrowser control.
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 01:06:19 AM
Help file for Visual Styles.
Title: Re: Windows API Headers III v.1.05
Post by: Pierre Bellisle on October 18, 2013, 01:46:48 AM
Thank José....
Title: Re: Windows API Headers III v.1.05
Post by: Paul Squires on October 18, 2013, 01:53:17 AM
Thanks José, you're awesome dude!
:)
Title: Re: Windows API Headers III v.1.05
Post by: Jim Dunn on October 18, 2013, 03:06:36 AM
José, thx as always.

P.S.  Did you noticed, the title says v1.05, but the rar says v115.
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 04:55:27 AM
A little mistake.
Title: Re: Windows API Headers III v.1.05
Post by: Eddy Larsson on October 18, 2013, 07:18:40 AM
Thanks Jose'
Title: Re: Windows API Headers III v.1.05
Post by: Theo Gottwald on October 18, 2013, 08:02:30 AM
Jose, the downloading would be easier - and also the updating, if they would be all in ONE RAR Archive. Those who are interested and like it (like me) will probably not leave apples on the tree but take all of them.
Secondly i I would like to see a "Version XY from (Date).
This will make it much easier for me and others to find out if i have this one already or if i need to download it. Looking here i ask myself, if this is all new or if i have it already.
Title: Re: Windows API Headers III v.1.05
Post by: Petr Schreiber on October 18, 2013, 09:59:40 AM
Unstoppable José strikes again,

thanks a lot, your hard work is very much appreciated!


Petr
Title: Re: Windows API Headers III v.1.15
Post by: Theo Gottwald on October 18, 2013, 10:25:00 AM
The documentation is in the help-files, Tom.
Title: Re: Windows API Headers III v.1.05
Post by: David Warner on October 18, 2013, 10:56:44 AM
Thanks for all your efforts José.  8)
Title: Re: Windows API Headers III v.1.05
Post by: Marc Giao on October 18, 2013, 03:42:25 PM
 José sir, you are a Gentleman.  Thank you very much for your effort and dedication... I am still hoping PowerBASIC sees the light and your headers/work become the official standard!

All the Best,

Marc
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 18, 2013, 03:50:31 PM
As I said, it is a maintenance release, with a few headers, such SQLite, updated and reported typos in some functions and mistakes in the help file corrected. You can find the version number at the beginning of windows.inc: $JRS_HEADERS_VERSION = "3.1.05".

Putting everything in one big file is not welcomed by some users that have slow internet connections. Some have asked me to split the big one that contains the headers in four or five parts.
Title: Re: Windows API Headers III v.1.05
Post by: Darrell Price on October 19, 2013, 03:52:47 AM
Thank you, Jose.
Title: Re: Windows API Headers III v.1.05
Post by: Chris Simon on October 19, 2013, 07:30:34 AM
Thanks Jose.
Title: Re: Windows API Headers III v.1.05
Post by: Sutthisak Phongthanapanic on October 20, 2013, 08:58:24 AM
Thank you so much.
Title: Re: Windows API Headers III v.1.05
Post by: Brice Manuel on October 20, 2013, 06:04:12 PM
Thank you, José.
Title: Re: Windows API Headers III v.1.05
Post by: J.G. Huang on October 21, 2013, 09:28:36 AM
 8) Thank you very much!
Title: Re: Windows API Headers III v.1.05
Post by: Paul Squires on October 26, 2013, 05:38:28 AM
Hi José,

The help file ("WinApiHeaders.chm") for ListBox_ReplaceString is missing the second parameter "index".

Thanks - Paul
Title: Re: Windows API Headers III v.1.05
Post by: Paul Squires on October 28, 2013, 05:08:08 PM
Hi José,

I am currently converting FireFly Visual Designer to become fully unicode enabled. As such, I am leveraging the use of your functions in your various Include files. You have certainly saved me an enormous amount of work when dealing with functions in both unicode and non-unicode versions.

I do have a question regarding your AfxSetWindowText function.

' ========================================================================================
' Changes the text of a window.
' Note: SetWindowText cannot change the text of a control in another application.
' ========================================================================================
FUNCTION AfxSetWindowText (BYVAL hwnd AS DWORD, BYVAL bstrText AS WSTRING) AS LONG
   FUNCTION = SendMessage(hwnd, %WM_SETTEXT, 0, STRPTR(bstrText))
END FUNCTION
' ========================================================================================


I believe that it only works when Unicode is enabled. It accepts a WSTRING for the text but uses SENDMESSAGE. If Unicode is not defined then SENDMESSAGE will be SENDMESSAGEA which causes the WSTRING text to be truncated at the second position (the nul in the two byte unicode character). I assume that I am correct in saying that (in the absence of separate unicode/nonunicode versions) that you should using SENDMESSAGEW in the function.


' ========================================================================================
' Changes the text of a window.
' Note: SetWindowText cannot change the text of a control in another application.
' ========================================================================================
FUNCTION AfxSetWindowText (BYVAL hwnd AS DWORD, BYVAL bstrText AS WSTRING) AS LONG
   FUNCTION = SendMessageW(hwnd, %WM_SETTEXT, 0, STRPTR(bstrText))
END FUNCTION
' ========================================================================================



Hope I am clear in my explanation  :)

Title: Re: Windows API Headers III v.1.05
Post by: José Roca on October 28, 2013, 07:19:39 PM
Must have missed it because there are not separate WM_SETTEXTA and WM_SETTEXTW messages, but only WM_SETTEXT.

I have modified the function in AfxWin.inc as follows:


' ========================================================================================
' Changes the text of a window.
' Note: SetWindowText cannot change the text of a control in another application.
' ========================================================================================
FUNCTION AfxSetWindowTextA (BYVAL hwnd AS DWORD, BYVAL strText AS STRING) AS LONG
   FUNCTION = SendMessageA(hwnd, %WM_SETTEXT, 0, STRPTR(strText))
END FUNCTION
' ========================================================================================
FUNCTION AfxSetWindowTextW (BYVAL hwnd AS DWORD, BYVAL bstrText AS WSTRING) AS LONG
   FUNCTION = SendMessageW(hwnd, %WM_SETTEXT, 0, STRPTR(bstrText))
END FUNCTION
' ========================================================================================

#IF %DEF(%UNICODE)
   MACRO AfxSetWindowText = AfxSetWindowTextW
#ELSE
   MACRO AfxSetWindowText = AfxSetWindowTextA
#ENDIF

Title: Re: Windows API Headers III v.1.05
Post by: Klaas Holland on October 30, 2013, 09:56:11 AM
Thanks Jose.
Title: Re: Windows API Headers III v.1.05
Post by: Holger Taschenberger on November 04, 2013, 11:14:39 AM
typo in Shlwapi.inc:

DECLARE FUNCTION UrlEscapeW IMPORT "SHLWAPI.DLL" ALIAS "UrlescapeW" ( _
   ...
) AS LONG

should be:

DECLARE FUNCTION UrlEscapeW IMPORT "SHLWAPI.DLL" ALIAS "UrlEscapeW" ( _
   ...
) AS LONG
Title: Re: Windows API Headers III v.1.05
Post by: José Roca on November 04, 2013, 03:54:53 PM
Thanks for reporting it.
Title: Re: Windows API Headers III v.1.05
Post by: Scott Slater on January 02, 2014, 02:36:34 PM
Two thumbs up (as always)!  Thank you.
Title: Re: Windows API Headers III v.1.05
Post by: Norbert Doerre on March 15, 2014, 01:57:53 PM
Jose, astonishing - your work
Alle the best,
Norbert in his CAD submarine