Page 2 of 2

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Posted: Wed Jan 25, 2012 9:59 pm
by skywalk
Thanks Danilo...
I'm still confused why I'm getting different results using GetSystemMetrics_() and SystemParametersInfo_().
Off by 1 for the menu and caption heights...

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Posted: Thu Jan 26, 2012 9:04 am
by Danilo
skywalk wrote:Thanks Danilo...
I'm still confused why I'm getting different results using GetSystemMetrics_() and SystemParametersInfo_().
Off by 1 for the menu and caption heights...
For the captions one is the caption bar, the other is for caption buttons (-1 pixel here).
For the menu it seems to be the same issue, with a possible documentation mistake in MSDN.

Code: Select all

#SM_CYCAPTION      is the height of a caption.
ncm\iCaptionHeight is the height of a caption button.

#SM_CYMENU         is the height of a menu bar.
#SM_CYMENUSIZE     is the height of a menu bar button.
ncm\iMenuHeight    is the height of a menu bar         (says MSDN), but contains the height of a menu bar button.
ncm\iMenuWidth     is the width  of a menu bar button, so i think it's OK to assume that iMenuHeight is
                                                       the button height, not the menu height.
I just added a comment to MSDN about it: NONCLIENTMETRICS structure

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Posted: Sun Jan 29, 2012 7:50 pm
by Mistrel
Why have you decided to REMOVE structure members? Having extra members at the end of a structure will not break anything in Windows 95, unless you have to specify its size somewhere (do you?). This seems like a step backwards.