Pelles C forum

C language => Windows questions => Topic started by: John Z on July 16, 2021, 02:45:43 pm

Title: _WIN32_WINNT
Post 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
Title: Re: _WIN32_WINNT
Post by: TimoVJL on July 16, 2021, 03:27:22 pm
read this:
Title: Re: _WIN32_WINNT
Post by: John Z on July 16, 2021, 03:36:43 pm
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.
Title: Re: _WIN32_WINNT
Post by: frankie on July 16, 2021, 06:49:11 pm
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.
Title: Re: _WIN32_WINNT
Post by: John Z on July 16, 2021, 09:06:36 pm
Oh I didn’t think that. I’ll give it a go especially since it should but doesn’t seem to work.

John Z
Title: Re: _WIN32_WINNT
Post by: MrBcx on July 17, 2021, 03:34:35 am
This is still a very good read too ...

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.
Title: Re: _WIN32_WINNT
Post by: John Z on July 17, 2021, 10:43:21 am
Thanks MrBcx this is a very good read.  I'll try the one for all solution too.

Appreciate the assist.

John Z
Title: Re: _WIN32_WINNT
Post by: John Z on July 17, 2021, 01:26:49 pm
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