Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SystemParametersInfo

4 views
Skip to first unread message

Piet

unread,
Sep 29, 2008, 5:46:39 AM9/29/08
to
I'm using SystemParametersInfo to get scrollwidth for use with a
stringgrid:

NONCLIENTMETRICS ncmStruct;

// find scrollbar width
ncmStruct.cbSize = sizeof(NONCLIENTMETRICS);
// get current non-client window metrics
SystemParametersInfo(SPI_GETNONCLIENTMETRICS,
sizeof(NONCLIENTMETRICS),
&ncmStruct,
0);
sgEvents->DefaultColWidth = sgEvents->Width - m_ScrollWidth;

This has always worked well with previous versions of Builder, but
with C++Builder 2007 it only gives the proper value with a debug
build. A release build gives 0 (also for iCaptionHeight). Library
paths are the same except $(BDS)\lib\debug for debug and $(BDS)\lib
\release for release. Conditional defines _DEBUG;NO_STRICT and
NDEBUG;NO_STRICT respectively. Dynamic RTL and Runtime packages
unchecked.

Any ideas?
Piet

Piet

unread,
Oct 2, 2008, 6:03:36 AM10/2/08
to
I've found a solution (sort of); check cppbuilder.migration group.
Piet
0 new messages