PureBasic 4.61 beta 1 - WinAPI structure changes

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

PureBasic 4.61 beta 1 - WinAPI structure changes

Post by Danilo »

I checked, corrected and changed all WinAPI structures for PB4.61 (beta). Here some informations about it.

There are quite some changes:
  • 4 structures have members removed because they are not Win95 compatible, please read below
  • 2 structures have been renamed because of spelling mistakes before
  • 3 structures were added because required to fix other structures
  • some structure members had to be rename, please read below
About the removed members that are > Win95 only:
The PB team is thinking about a more general solution to this problem
because many more structures have new members for new versions of Windows.
Please be patient, only 4 structures were changed because of this.
For now you have to create new structures with Extends if you used
one of this structures.

About the renamed members for many structures:
If your source uses one of the structures with renamed members, the compiler
will give you an error about missing/unknown member in your source.
If this is the case, please open the structure viewer tool and check the members
or look in the list below.

I wrote some small tools with PureBasic and C++ to automate the checking
of WinAPI structures a little bit.
With this tools the PB team can check all included WinAPI structures for:
  • PureBasic Windows 32bit
  • PureBasic Windows 32bit, Unicode
  • PureBasic Windows 64bit
  • PureBasic Windows 64bit, Unicode
There are 3 checks that are done between VisualC++ and PureBasic and for all 4 modes:
  1. compare the structure size
  2. compare the size of all members within the structure
  3. compare the offset of all members within the structure
To automate this checks with C++ and PB tools, PB structures and
its members need to have exactly the same names/spelling for members
as in the MS Windows Platform SDK.
This is the reason some structure members had to be renamed.
It makes it easier to automate the WinAPI structure checking. Now and for future versions of PureBasic.

Here is a complete list for reference with all my changes:
(i hope Fred didn't change anything after that ;))

Code: Select all

;>-----------------------------------------------------------------------------------
;
;- removed members For Win95 compatibility (WINVER = 0x0400)
;
;>-----------------------------------------------------------------------------------

MENUITEMINFO        \ hbmpItem.i removed, WINVER >= 0x0500, = Windows 2000+

LV_ITEM             \ iGroupId   removed, WINVER >= 0x0501, = Windows XP+
                    \ cColumns   removed, WINVER >= 0x0501, = Windows XP+
                    \ puColumns  removed, WINVER >= 0x0501, = Windows XP+
                    \ piColFmt   removed, WINVER >= 0x0600, = Windows Vista+
                    \ iGroup     removed, WINVER >= 0x0600, = Windows Vista+

LV_HITTESTINFO      \ iGroup     remoced, WINVER >= 0x0600, = Windows Vista+

LV_COLUMN           \ cxMin      remoced, WINVER >= 0x0600, = Windows Vista+
                    \ cxDefault  remoced, WINVER >= 0x0600, = Windows Vista+
                    \ cxIdeal    remoced, WINVER >= 0x0600, = Windows Vista+

;>-----------------------------------------------------------------------------------
;- renamed structures
;>-----------------------------------------------------------------------------------

EMRSAVEDC           renamed, was EMREMRSAVEDC
EMRPOLYBEZIERTO16   renamed, was EMRPLOYBEZIERTO16

;>-----------------------------------------------------------------------------------
;- added structures
;>-----------------------------------------------------------------------------------

EXTLOGPEN32         added, required by EMREXTCREATEPEN
LOGCOLORSPACEA      added, lcsFileName always ASCII   -> required by EMRCREATECOLORSPACE
LOGCOLORSPACEW      added, lcsFileName always UNICODE

;>-----------------------------------------------------------------------------------
;- general fixes
;>-----------------------------------------------------------------------------------

PERF_DATA_BLOCK             alignment For x86 And x64
DEV_BROADCAST_USERDEFINED   alignment For x86 And x64

EMREXTCREATEPEN     \ elp.EXTLOGPEN     -> elp.EXTLOGPEN32
MENUITEMTEMPLATE    \ mtString.b        -> mtString.u[1]
MIXERCONTROLDETAILS \ item.i            -> StructureUnion With hwndOwner.i And cMultipleItems.l
LANA_ENUM           \ lana.b[#MAX_LANA] -> lana.b[#MAX_LANA+1], alignment

PELARRAY            \ paRGBs        .w  To .a And corrected alignment after
URL_COMPONENTS      \ nPort         .l  To .w And corrected alignment after
RB_HITTESTINFO      \ iBand         .w  To .l
MENUITEMINFO        \ dwTypeData    .l  To .u
VARIANT             \ cyVal         .l  To .LARGE_INTEGER
EMRCREATECOLORSPACE \ lcs.LOGCOLORSPACE To .LOGCOLORSPACEA

NAME_BUFFER         \ name_num      .b  To .a
                    \ name_flags    .b  To .a

M128A               \ changed both  .i  To .q

OUTLINETEXTMETRIC   \ otmsUnderscoreSize -> corrected position within the Structure

INPUT_RECORD        \ changed the StructureUnion to Event.INPUT_RECORD_EVENT

SAFEARRAY           \ added StructureUnion With dummyrgsabound member
                    \ rgsabound moved into same StructureUnion

FORM_INFO_1         *pName.l -> *pName.Character

DEVMODE             \ added dmPanningWidth,  matches _WIN32_WINNT_NT4 0x0400
                    \ added dmPanningHeight, matches _WIN32_WINNT_NT4 0x0400

MULTIKEYHELP        corrected For unicode
HELPWININFO         corrected For unicode
MONHSZSTRUCT        corrected For unicode
DEV_BROADCAST_PORT  corrected For unicode

;>-----------------------------------------------------------------------------------
;
;- fixed For 64bit:
;
;>-----------------------------------------------------------------------------------

NMOBJECTNOTIFY              hResult         changed from .i To .l And corrected alignment

NMHDR                       idFrom          changed from .l To .i And corrected alignment
MCI_STATUS_PARMS            dwReturn        changed from .l To .i And corrected alignment
HELPINFO                    dwContextId     changed from .l To .i And corrected alignment
ENDROPFILES                 hDrop           changed from .l To .i And corrected alignment
MIXERLINE                   dwUser          changed from .l To .i And corrected alignment

LOGBRUSH                    lbHatch         changed from .l To .i
ICMP_ECHO_REPLY             Data            changed from .l To .i

IP_OPTION_INFORMATION       \ Ttl           changed from .b To .a
                            \ Tos           changed from .b To .a
                            \ Flags         changed from .b To .a
                            \ OptionsSize   changed from .b To .a
                            \ OptionsData   changed from .l To .i

MSG                         corrected alignment
POLYTEXT                    corrected alignment
PAGESETUPDLG                corrected alignment
REOBJECT                    corrected alignment

SHFILEINFO                  corrected alignment For non-unicode mode on x64
MODULEENTRY32               corrected alignment For non-unicode mode on x64

PROCESSENTRY32              corrected alignment For     unicode mode on x64
NMCBEDRAGBEGIN              corrected alignment For     unicode mode on x64
NMCBEENDEDIT                corrected alignment For     unicode mode on x64


TBBUTTON                    added CompilerIf For x64 To  correct member bReserved For x64
XMM_SAVE_AREA32             added CompilerIf For x64 And correct members
WSADATA                     added CompilerIf For x64 And correct members
SERVENT                     added CompilerIf For x64 And correct members

;>-----------------------------------------------------------------------------------
;- changed member names
;>-----------------------------------------------------------------------------------

ACCEL                      \ Pad                -> PB_Align
NETENT                     \ pad                -> PB_Align

NEWTEXTMETRIC              \ ntmAveWidth        -> ntmAvgWidth
WIN32_FIND_DATA            \ cAlternate         -> cAlternateFileName
NMTBRESTORE                \ nmhdr              -> hdr
SECURITY_DESCRIPTOR        \ lGroup             -> Group
MEMORY_BASIC_INFORMATION   \ lType              -> Type
EXCEPTION_POINTERS         \ pExceptionRecord   -> ExceptionRecord
CANDIDATELIST              \ dwOffset1          -> dwOffset[1]
METARECORD                 \ rdParam1           -> rdParam[1]
ENHMETARECORD              \ dParam1            -> dParam[1]
DDEDATA                    \ Value1             -> Value[1]
DDEPOKE                    \ Value1             -> Value[1]
DDEUP                      \ xRGB1              -> rgb[1]
DDEML_MSG_HOOK_DATA        \ Data.l             -> Data.l[8] And corrected alignment
EMRPOLYBEZIERTO16          \ apts.POINT[1]      -> apts.POINTS[1]
METAFILEPICT               \ imm                -> mm
EMRGDICOMMENT              \ xData              -> Data
EMRSCALEVIEWPORTEXTEX      \ yDemon             -> yDenom
EMRSCALEWINDOWEXTEX        \ yDemon             -> yDenom
EMRCREATEDIBPATTERNBRUSHPT \ ihBursh            -> ihBrush
CHARSETINFO                \ xlfs               -> fs
MCI_GETDEVCAPS_PARMS       \ dwIten             -> dwItem
JOB_INFO_2                 \ iSize              -> Size
FORM_INFO_1                \ isize              -> Size
NAME_BUFFER                \ xname              -> name
PERF_DATA_BLOCK            \ PerTime100nSec     -> PerfTime100nSec
TVITEMEX                   \ integral           -> iIntegral
PARAFORMAT                 \ wReserved          -> wEffects
CHOOSEFONT                 \ Alignment          -> ___MISSING_ALIGNMENT___
TC_ITEM                    \ lpReserved1        -> dwState
                           \ lpReserved2        -> dwStateMask
WIN32_STREAM_ID            \ dwStreamSizeLow    -> Size.LARGE_INTEGER
                           \ dwStreamSizeHigh   -> also in Size
IMAGE_EXPORT_DIRECTORY     \ nBase              -> Base
                           \ nName              -> Name
COLORMAP                   \ cmFrom             -> from
                           \ cmTo               -> To
ADAPTER_STATUS             \ max_dgram_isize    -> max_dgram_size
                           \ max_sess_pkt_isize -> max_sess_pkt_size
DEBUGHOOKINFO              \ hModuleHook        -> idThread
                           \ Reserved           -> idThreadInstaller

CRITICAL_SECTION           \ changed all member names, they were dummies before
USER_INFO_3                \ changed all member names And corrected all types
GROUP_INFO_2               \ changed all member names And corrected all types
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post by IdeasVacuum »

Fantastic job you have done there Danilo. The majority of PB Users will benefit from it, thank you for your hard work on things that are not the most fun to do.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post by Danilo »

Thank you IdeasVacuum! :)

It took only 2 days full time, including writing the tools and converting all
structures to a format that C++ and PB can both compile without changes. :D
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post by dige »

Well done, Danilo!
"Daddy, I'll run faster, then it is not so far..."
User avatar
Ajm
Enthusiast
Enthusiast
Posts: 242
Joined: Fri Apr 25, 2003 9:27 pm
Location: Kent, UK

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post by Ajm »

Thanks Danilo,

You must have been bored or mad to have taken on that task. Well Done.
Regards

Andy

Image
Registered PB & PureVision User
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post by nco2k »

great work danilo. :)

but what about the DEVMODE structure? dmPosition is still missing. :?:

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post by Danilo »

nco2k wrote:but what about the DEVMODE structure? dmPosition is still missing. :?:
Thank you nco2k, i will check again. It is in a StructureUnion, so structure size
and other members are all correct. :)
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post by Danilo »

Nice one, nco2k. :)

I wanted to correct it now, but it's in a StructureUnion with an anonymous
structure and that's not supported by PureBasic.

The C part of the DEVMODE struct is:

Code: Select all

    union {
      struct {
        short dmOrientation;
        short dmPaperSize;
        short dmPaperLength;
        short dmPaperWidth;
      };
      POINTL dmPosition;
    };
The best solution i can find is:

Code: Select all

  StructureUnion
    dmOrientation.w
    dmPaperSize.w
    dmPositionX.l    ; first half of dmPosition.POINTL
  EndStructureUnion
  StructureUnion
    dmPaperLength.w
    dmPaperWidth.w
    dmPositionY.l    ; second half of dmPosition.POINTL
  EndStructureUnion
If i use dmPosition.POINTL correctly, the other 4 members can not be
accessed directly, like:

Code: Select all

Structure DEVMODE_STRUCTUREUNION1
    dmOrientation.w
    dmPaperSize.w
    dmPaperLength.w
    dmPaperWidth.w
EndStructure

Structure DEVMODE
  [...]
  StructureUnion
    union.DEVMODE_STRUCTUREUNION1
    dmPosition.POINTL
  EndStructureUnion
I think the first one is the better solution (dmPositionX + dmPositionY) because
it does not change old code. I have to ask the boss about this. ;)

EDIT:
Forget it, first solution is wrong because the members would all stay
at the same place with StructureUnion.

EDIT2:
Actually you do not use both versions at the same time. Some members are
for Printers only, the other members (dmPosition) are for Display devices only.
Would it make sense to leave the DEVMODE like it is and add DEVMODE_SCREEN
to PureBasic with the 3 display device members?

In DEVMODE are:

Code: Select all

  dmOrientation.w
  dmPaperSize.w
  dmPaperLength.w
  dmPaperWidth.w
  dmScale.w
  dmCopies.w
  dmDefaultSource.w
  dmPrintQuality.w
They are only used with printers.

DEVMODE_DISPLAY or DEVMODE_SCREEN would replace
the 8 above members with:

Code: Select all

  dmPosition.POINTL
  dmDisplayOrientation.l
  dmDisplayFixedOutput.l
Should be OK like this, no? You don't use them together and you see
it in Intellisense popup while typing DEVMODE... ;)
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post by nco2k »

what the hell is an anonymous structure and why isnt it supported by pb? :o

> Would it make sense to leave the DEVMODE like it is and add DEVMODE_SCREEN to PureBasic with the 3 display device members?
sounds good enough for me. :)

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post by Danilo »

nco2k wrote:what the hell is an anonymous structure and why isnt it supported by pb? :o
An anonymous struct does not have a name. You can do that in C.
BASIC and C are different programming languages, so they have different feature sets -
like the other 1000 programming languages.
nco2k wrote:> Would it make sense to leave the DEVMODE like it is and add DEVMODE_SCREEN to PureBasic with the 3 display device members?
sounds good enough for me. :)
I added now 2 helper structures to it (after asking Fred about it), so it is
DEVMODE\printer\ to access the printer member and DEVMODE\display\ for
the display members.
This are the latest changes i made some days ago. I already sent it to Fred and
it is up to him and his team from now on. My job is done.

Code: Select all

;>-----------------------------------------------------------------------------------
;
;- re-introduced members that were removed before for Win95 compatibility
;
;>-----------------------------------------------------------------------------------

MENUITEMINFO        \ hbmpItem.i re-introduced, WINVER >= 0x0500, = Windows 2000+

LV_ITEM             \ iGroupId   re-introduced, WINVER >= 0x0501, = Windows XP+
                    \ cColumns   re-introduced, WINVER >= 0x0501, = Windows XP+
                    \ puColumns  re-introduced, WINVER >= 0x0501, = Windows XP+
                    \ piColFmt   re-introduced, WINVER >= 0x0600, = Windows Vista+
                    \ iGroup     re-introduced, WINVER >= 0x0600, = Windows Vista+

LV_HITTESTINFO      \ iGroup     re-introduced, WINVER >= 0x0600, = Windows Vista+

LV_COLUMN           \ cxMin      re-introduced, WINVER >= 0x0600, = Windows Vista+
                    \ cxDefault  re-introduced, WINVER >= 0x0600, = Windows Vista+
                    \ cxIdeal    re-introduced, WINVER >= 0x0600, = Windows Vista+


;>-----------------------------------------------------------------------------------
;- added structures
;>-----------------------------------------------------------------------------------

DEVMODE_UNION_PRINTER   required by DEVMODE
DEVMODE_UNION_DISPLAY   required by DEVMODE
POINTL                  required by DEVMODE


;>-----------------------------------------------------------------------------------
;- DEVMODE changes
;>-----------------------------------------------------------------------------------

DEVMODE                 \ dmOrientation      ---
                        \ dmPaperSize           |
                        \ dmPaperLength         |
                        \ dmPaperWidth          |-->  moved To DEVMODE\printer.DEVMODE_UNION_PRINTER
                        \ dmScale               |
                        \ dmCopies              |
                        \ dmDefaultSource       |
                        \ dmPrintQuality     ---

                        \ display \ dmPosition.POINTL           ; added
                        \ display \ dmDisplayOrientation.l      ; added
                        \ display \ dmDisplayFixedOutput.l      ; added
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post by skywalk »

Is NONCLIENTMETRICS on the list also?
What am I doing wrong trying to read "iPaddedBorderWidth" on Windows7?
It always returns 0.

Code: Select all

Structure NONCLIENTMETRICSX2 Extends NONCLIENTMETRICS
  iPaddedBorderWidth.i    ; If OSVersion() >= #PB_OS_Windows_XP
EndStructure

Structure NONCLIENTMETRICSX
  cbSize.i
  iBorderWidth.i
  iScrollWidth.i
  iScrollHeight.i
  iCaptionWidth.i
  iCaptionHeight.i
  lfCaptionFont.LOGFONTW
  iSMCaptionWidth.i
  iSMCaptionHeight.i
  lfSMCaptionFont.LOGFONTW
  iMenuWidth.i
  iMenuHeight.i
  lfMenuFont.LOGFONTW
  lfStatusFont.LOGFONTW
  lfMessageFont.LOGFONTW
  iPaddedBorderWidth.i    ; If OSVersion() >= #PB_OS_Windows_XP
EndStructure

Define ncm.NONCLIENTMETRICSX
ncm\cbSize = SizeOf(NONCLIENTMETRICSX)
SystemParametersInfo_(#SPI_GETNONCLIENTMETRICS, SizeOf(NONCLIENTMETRICSX), @ncm, 0)
Debug "--- NONCLIENTMETRICSX ---"
Debug "iCaptionHeight = " + Str(ncm\iCaptionHeight)
Debug "iMenuHeight = " + Str(ncm\iMenuHeight)
Debug "iScrollHeight = " + Str(ncm\iScrollHeight)
Debug "iPaddedBorderWidth = " + Str(ncm\iPaddedBorderWidth)  ;<-- Default = 4, and I set mine = 2

Define ncm2.NONCLIENTMETRICSX2
ncm2\cbSize = SizeOf(NONCLIENTMETRICS)+4
SystemParametersInfo_(#SPI_GETNONCLIENTMETRICS, SizeOf(NONCLIENTMETRICS)+4, @ncm2, 0)
Debug "--- NONCLIENTMETRICS Extended ---"
Debug "iCaptionHeight = " + Str(ncm2\iCaptionHeight)
Debug "iMenuHeight = " + Str(ncm2\iMenuHeight)
Debug "iScrollHeight = " + Str(ncm2\iScrollHeight)
Debug "iPaddedBorderWidth = " + Str(ncm2\iPaddedBorderWidth)  ;<-- Default = 4, and I set mine = 2

Debug "--- GetSystemMetrics_() for these constants ---"
Debug "#SM_CYCAPTION = " + Str(GetSystemMetrics_(#SM_CYCAPTION))
Debug "#SM_CYMENU = " + Str(GetSystemMetrics_(#SM_CYMENU))
Debug "#SM_CYHSCROLL = " + Str(GetSystemMetrics_(#SM_CYHSCROLL))
Debug "#SM_CYVSCROLL = " + Str(GetSystemMetrics_(#SM_CYVSCROLL))
Debug "#SM_CXPADDEDBORDER = " + Str(GetSystemMetrics_(#SM_CXPADDEDBORDER))
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post by Danilo »

The structure is correct, it is an other issue with application compatibility.
To get the correct border size, you have to add iBorderWidth and iPaddedBorderWidth.

Code: Select all

Structure NONCLIENTMETRICSX2 Extends NONCLIENTMETRICS
  iPaddedBorderWidth.l    ; If OSVersion() >= #PB_OS_Windows_XP
EndStructure

Define ncm.NONCLIENTMETRICSX2
ncm\cbSize = SizeOf(NONCLIENTMETRICSX2)
SystemParametersInfo_(#SPI_GETNONCLIENTMETRICS, SizeOf(NONCLIENTMETRICSX2), @ncm, 0)
Debug "--- NONCLIENTMETRICS Extended ---"
Debug "iCaptionHeight = "       + Str(ncm\iCaptionHeight)
Debug "iMenuHeight = "          + Str(ncm\iMenuHeight)
Debug "iScrollHeight = "        + Str(ncm\iScrollHeight)
Debug "iPaddedBorderWidth = "   + Str(ncm\iPaddedBorderWidth)  ;<-- Default = 4, and I set mine = 2
Debug "iBorderWidth = "         + Str(ncm\iBorderWidth)
Debug "real border size = "     + Str(ncm\iBorderWidth + ncm\iPaddedBorderWidth)

Debug "--- GetSystemMetrics_() for these constants ---"
Debug "#SM_CYCAPTION = "    + Str(GetSystemMetrics_(#SM_CYCAPTION))
Debug "#SM_CYMENU = "       + Str(GetSystemMetrics_(#SM_CYMENU))
Debug "#SM_CYHSCROLL = "    + Str(GetSystemMetrics_(#SM_CYHSCROLL))
Debug "#SM_CYVSCROLL = "    + Str(GetSystemMetrics_(#SM_CYVSCROLL))
Debug "#SM_CXPADDEDBORDER = " + Str(GetSystemMetrics_(#SM_CXPADDEDBORDER))
If found something there: GetSystemMetrics and SM_CXPADDEDBORDER

Code: Select all

The difference between the subsystems is:
 
For < 6.0 apps (at 96dpi):
   iBorderWidth = 5
   iPaddedBorderWidth = SM_CXPADDEDBORDER = 0
   SM_CXFRAME = 8
For 6.0+ apps (at 96dpi):
   iBorderWidth = 1
   iPaddedBorderWidth = SM_CXPADDEDBORDER = 4
   CXFRAME = 4
So it looks like it returns the correct splitted value (1 and 4) only if your application manifest
specifies a windows version 6.0+, otherwise it returns the combined value (5) in iBorderWidth.

I think "realBorderSize = ncm\iBorderWidth + ncm\iPaddedBorderWidth" should be correct.

Please note that iPaddedBorderWidth is .l, not .i
Last edited by Danilo on Wed Jan 25, 2012 8:27 pm, edited 1 time in total.
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post by utopiomania »

Is this related to the problem I have with PB:
Select ChildWindowFromPoint_(GadgetID(#Img1), Pt\X, Pt\Y)
Line 127: ChildWindowFromPoint_(): Incorrect number of parameters.
I can't compile my sources anymore because of this, or similar error messages,
and I don't know what to do to fix them.

I know the keep breaking their own syntax, but this is is hopeless for me.
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post by Danilo »

utopiomania wrote:Is this related to the problem I have with PB:
Select ChildWindowFromPoint_(GadgetID(#Img1), Pt\X, Pt\Y)
Line 127: ChildWindowFromPoint_(): Incorrect number of parameters.
I can't compile my sources anymore because of this, or similar error messages,
and I don't know what to do to fix them.

I know the keep breaking their own syntax, but this is is hopeless for me.
Please read the topic [SOLVED] WindowFromPoint_() not working?
The 2nd and 3rd parameters are now combined to a quad.
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post by utopiomania »

Thanks, Danilo.

I can't wait to find out what part of my sources that fails the next time they
break their own syntax.
Post Reply