PureBasic 4.61 beta 1 - WinAPI structure changes

Developed or developing a new product in PureBasic? Tell the world about it.
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 »

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...
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 »

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
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: PureBasic 4.61 beta 1 - WinAPI structure changes

Post 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.
Post Reply