Pelles C forum
C language => Windows questions => Topic started by: John Z on July 16, 2021, 02:45:43 PM
-
I would like to know what is the controlling factor that determines the value of _WIN32_WINNT.
Header file commctrl.h uses this to determine availability of several 'features', features I want to use but don't seem to be able to get.
_WIN32_WINNT >= 0x501
_WIN32_WINNT >= 0x0600
Any help will be appreciated.
John Z
-
read this:
https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-160
-
Thanks - I will.
John Z
Update. I have read it and basically already tried what it proposes.
I had seen sdkddkver.h already and have/had tried to add
#define WINVER 0x0A00 also tried 0x601
#define _WIN32_WINNT 0x0A00 also tried 0x601
it either gets overridden or I'm doing something else wrong. The symptom is LVGROUP structure is not available from commctrl.h. The include file shows it is only available if "#if (_WIN32_WINNT >= 0x501)".
I say not available because when I hover or use LVITEM I see the structure elements and they are in the dropdown list when I use it. When I hover over LVGROUP it shows nothing and when I try to load the structure by for example lvg.mask = there is not a dropdown list to pick mask or any other element of the structure. Also other ListView features are not available …..
If I make a private copy of LVGROUP in my own.h and remove the conditionals it then shows the structure and elements as expected but this is a big no no no - just did it to help troubleshoot, plus there would be many more changes required to fully implement LVGROUP this way. Definitely not the way to go.
I'll keep looking..... Thank you.
-
For me works in both cases using the PellesC native SDK, which defines WINVER and _WIN32_WINNT to the same value 0x0A00, and with my fSDK that defines those symbols to 0X0601.
Probably there is a problem with your installation.
Try to reinstall PellesC.
Remove it before.
-
Oh I didn’t think that. I’ll give it a go especially since it should but doesn’t seem to work.
Thanks,
John Z
-
This is still a very good read too ...
https://devblogs.microsoft.com/oldnewthing/20070411-00/?p=27283
There’s now just one symbol you define to specify your minimum target operating system: NTDDI_VERSION.
Once you set that, all the other symbols are set automatically to the appropriate values for your target operating system.
-
Thanks MrBcx this is a very good read. I'll try the one for all solution too.
Appreciate the assist.
John Z
-
Thanks to everyone for the tips! I'm past the version issue and have verified the version define is 'correct' for LVGROUP in commctrl.h.
John Z