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