Author Topic: Windows API Headers III v.1.04  (Read 38039 times)

0 Members and 1 Guest are viewing this topic.

Offline James A Gant

  • Newbie
  • *
  • Posts: 1
  • User-Rate: +0/-0
Re: Windows API Headers III v.1.04
« Reply #15 on: August 30, 2012, 07:05:04 AM »
Jose,

Thank you very much for all the work you have put into these.

James A. Gant

Offline Randall Glass

  • Newbie
  • *
  • Posts: 12
  • User-Rate: +1/-1
    • RadioTelephone Tutor : Get your FCC GROL License plus Radar Endorsement
Re: Windows API Headers III v.1.04
« Reply #16 on: September 04, 2012, 11:50:38 AM »
I have the Powerbasic 9.05.

Where can I get the old headers?

Lassar

RadioTelephone Tutor : Get your FCC GROL License plus Radar Endorsement
http://RadioTelephoneTutor.com

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2481
  • User-Rate: +204/-0

Offline Patrice Terrier

  • ROMs
  • Hero Member
  • *****
  • Posts: 936
  • User-Rate: +62/-1
    • www.zapsolution.com
Re: Windows API Headers III v.1.04
« Reply #18 on: September 18, 2012, 04:40:17 PM »
José

The GetProcessHandleFromHwnd API seems to be missing in the OleAcc.inc

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2481
  • User-Rate: +204/-0
Re: Windows API Headers III v.1.04
« Reply #19 on: September 18, 2012, 09:27:48 PM »
It is not included in OleAcc.h.

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2481
  • User-Rate: +204/-0
Re: Windows API Headers III v.1.04
« Reply #20 on: September 18, 2012, 09:41:04 PM »
I will add it to OleAcc.inc, but it is not included in any of the versions of OleAcc.h that I have.

Code: [Select]
' // Documented, but not included in OleAcc.h
DECLARE FUNCTION GetProcessHandleFromHwnd IMPORT "OLEACC.DLL" ALIAS "GetProcessHandleFromHwnd" ( _
   BYVAL hwnd AS DWORD _                                ' __in HWND hwnd
 ) AS DWORD                                             ' HANDLE

Offline Patrice Terrier

  • ROMs
  • Hero Member
  • *****
  • Posts: 936
  • User-Rate: +62/-1
    • www.zapsolution.com
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2481
  • User-Rate: +204/-0
Re: Windows API Headers III v.1.04
« Reply #22 on: September 18, 2012, 11:35:23 PM »
Yet, it is documented in MSDN, but not included in the headers.

Offline Patrice Terrier

  • ROMs
  • Hero Member
  • *****
  • Posts: 936
  • User-Rate: +62/-1
    • www.zapsolution.com
Re: Windows API Headers III v.1.04
« Reply #23 on: September 19, 2012, 08:59:33 AM »
It comes up to be very handy when you need to interact with external process.

Here is an example of use:
Code: [Select]
FUNCTION ExeTerminate(BYVAL hWnd AS DWORD) AS LONG
    IF IsWindow(hWnd) THEN
        LOCAL hProcess AS DWORD
        hProcess = GetProcessHandleFromHwnd(hWnd)
        IF hProcess THEN
           IF TerminateProcess(hProcess, 9) THEN
              WaitForInputIdle(hProcess, %INFINITE)
              FUNCTION = %TRUE
           END IF
        END IF
    END IF
END FUNCTION
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Doug McDonald

  • Newbie
  • *
  • Posts: 5
  • User-Rate: +0/-1
Re: Windows API Headers III v.1.04
« Reply #24 on: January 21, 2013, 05:17:36 PM »
Thank you !!!!

Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 918
  • User-Rate: +30/-4
    • it-berater
Re: Windows API Headers III v.1.04
« Reply #25 on: July 13, 2013, 11:48:37 PM »
548 Downloads this version. I am using these only ...

In SciCtrl.inc looks like there are a few bugs inside.
One is the

SCI_AutocSetSeparator()

It needs an ASC-Value as Parameter, not a STRPTR().

Code: [Select]
FUNCTION SCI_AutocSetSeparator (BYVAL hSci AS DWORD, BYVAL strSeparator AS BYTE) AS LONG
   FUNCTION = SendMessageA(hSci, %SCI_AUTOCSETSEPARATOR, strSeparator, 0)
END FUNCTION
' ========================================================================================
' ========================================================================================
FUNCTION SCIP_AutocSetSeparator (BYVAL pSci AS DWORD, BYVAL strSeparator AS BYTE) AS LONG
   FUNCTION = Scintilla_DirectFunction(pSci, %SCI_AUTOCSETSEPARATOR, strSeparator, 0)
END FUNCTION   
« Last Edit: July 13, 2013, 11:56:48 PM by Theo Gottwald »

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2481
  • User-Rate: +204/-0
Re: Windows API Headers III v.1.04
« Reply #26 on: July 14, 2013, 12:36:44 AM »
THis should be easier to use with PB.

Code: [Select]
' ========================================================================================
FUNCTION SCI_AutocSetSeparator (BYVAL hSci AS DWORD, BYVAL strSeparator AS STRING) AS LONG
   FUNCTION = SendMessageA(hSci, %SCI_AUTOCSETSEPARATOR, ASC(strSeparator), 0)
END FUNCTION
' ========================================================================================
' ========================================================================================
FUNCTION SCIP_AutocSetSeparator (BYVAL pSci AS DWORD, BYVAL strSeparator AS STRING) AS LONG
   FUNCTION = Scintilla_DirectFunction(pSci, %SCI_AUTOCSETSEPARATOR, ASC(strSeparator), 0)
END FUNCTION
' ========================================================================================

Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 918
  • User-Rate: +30/-4
    • it-berater
Re: Windows API Headers III v.1.04
« Reply #27 on: July 14, 2013, 06:48:25 AM »
Of course, Jose, because you can just write

SCIP_AutocSetSeparator (pSci," ")
instead of
SCIP_AutocSetSeparator (pSci,32)

I found this some weeks before, there may be few more such cases in the include file.


Offline Paul Squires

  • Jr. Member
  • **
  • Posts: 90
  • User-Rate: +11/-5
    • PlanetSquires
Re: Windows API Headers III v.1.04
« Reply #28 on: September 13, 2013, 04:10:46 PM »
Edit_GetRightMargin is spelled incorrectly in "EditCtrl.inc". The "h" and the "t" are reversed.

Code: [Select]
' ========================================================================================
' Gets the width of the right margin for an edit control.
' ========================================================================================
FUNCTION Edit_GetRigthMargin (BYVAL hEdit AS DWORD) AS LONG
   FUNCTION = HI(WORD, SendMessage(hEdit, %EM_GETMARGINS, 0, 0))
END FUNCTION
' ========================================================================================

"Rigth" should be "Right"

Not sure if this was already fixed but I just came across it today while working on some code.

Paul Squires
FireFly Visual Designer SQLitening Database System JellyFish Pro Editor
http://www.planetsquires.com

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2481
  • User-Rate: +204/-0
Re: Windows API Headers III v.1.04
« Reply #29 on: September 13, 2013, 05:07:52 PM »
Thanks very much. I will post a new version soon, since I have updated some third party libraries and did some minor corrections to other files.