| Author |
Message |
ionymous
Joined: 15 May 2009 Posts: 1
|
Posted: Fri May 15, 2009 4:00 pm Post subject: #if (WINVER >= 0x0600) |
|
|
I'm using SystemParametersInfo to get NONCLIENTMETRICS, as demonstrated here.
It is working for me in XP, but I suspect it might have problems in Vista. (I hope to test this soon).
According to this msdn page, "int iPaddedBorderWidth" has been added to the structure for Vista and later.
So, MS suggests using "#if (WINVER >= 0x0600)" within the struct.
But in C# I can't use a preprocessor conditional with >=.
How do I work around this?
Thanks for any help.
Ion |
|
| Back to top |
|
 |
theloon
Joined: 03 Sep 2009 Posts: 2
|
Posted: Thu Sep 03, 2009 9:52 pm Post subject: |
|
|
You could try:
Declare a new structure which contains the additional member, eg NONCLIENTMETRICS_VISTA.
Declare a new method signature which takes the new structure in place of the old.
When running on Vista use the new signature otherwise use the old. |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group