NO

Author Topic: _WIN32_WINNT  (Read 1187 times)

Offline John Z

  • Member
  • *
  • Posts: 368
_WIN32_WINNT
« 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

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1950
May the source be with you

Offline John Z

  • Member
  • *
  • Posts: 368
Re: _WIN32_WINNT
« Reply #2 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.
« Last Edit: July 16, 2021, 04:04:52 pm by John Z »

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1875
Re: _WIN32_WINNT
« Reply #3 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.

Offline John Z

  • Member
  • *
  • Posts: 368
Re: _WIN32_WINNT
« Reply #4 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.

Thanks,
John Z

Offline MrBcx

  • Global Moderator
  • Member
  • *****
  • Posts: 91
    • Bcx Basic to C/C++ Translator
Re: _WIN32_WINNT
« Reply #5 on: July 17, 2021, 03:34:35 am »
This is still a very good read too ...

https://devblogs.microsoft.com/oldnewthing/20070411-00/?p=27283

Quote
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.

Offline John Z

  • Member
  • *
  • Posts: 368
Re: _WIN32_WINNT
« Reply #6 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

Offline John Z

  • Member
  • *
  • Posts: 368
Re: _WIN32_WINNT
« Reply #7 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