NO

Author Topic: _WIN32_WINNT  (Read 6967 times)

Offline John Z

  • Member
  • *
  • Posts: 860
_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: 2115
May the source be with you

Offline John Z

  • Member
  • *
  • Posts: 860
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: 2113
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.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline John Z

  • Member
  • *
  • Posts: 860
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: 189
    • 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.
Bcx Basic to C/C++ Translator
https://www.BcxBasicCoders.com

Offline John Z

  • Member
  • *
  • Posts: 860
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: 860
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