From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

_WIN32_IE value different in CVI 2009 and CVI 2010

Solved!
Go to solution

Hello everybody, I have a quite special problem I haven't experienced before. I hope I am not the first person to face this problem...

 

I have a source code writen and succesfully compiled in CVI 2009 and I am just trying to compile it in CVI 2010 as it is, before I do my modifications. The problem is that  in 2010 the NM_CUSTOMDRAW defined in CommCtrl.h (and other things used in the source code) (see below) is not found by the pre-procesor because the value of _WIN32_IE is not the same as in CVI 2009. I wonder whether this _WIN32_IE is set by the compiler itself. I tried to change it in Build -> Configuration -> Manage configuration -> Edit -> Build options -> Compiler Defines by adding the sentence /D_WIN32_IE=0x0300 but then the compiler says "ilegal expresion" at the first time it evaluates _WIN32_IE in ShellAPI.h. I have the same error compiling for 64 and 32.

 

Any suggestions please!?

 

CommCtrl.h

...

#if (_WIN32_IE >= 0x0300)
#define NM_CUSTOMDRAW (NM_FIRST-12)

...

0 Kudos
Message 1 of 3
(3,891 Views)
Solution
Accepted by topic author josete

Hello Josete,

 

Which is the line that gives you errors? Is it in your code or in a headder file? Do you use NM_CUSTOMDRAW in your code?

/D_WIN32_IE=0x0300 in Compiler Defines should work. What is the line that gives you error in ShellAPI.h?

Could you please list the headers you include in a file that gives you error.

To understand how the preprocessor directives are expanded you can use the menu Options->Preprocess Source File from a source editor window.

 

Constantin

0 Kudos
Message 2 of 3
(3,791 Views)

Hi Constantin, thanks for your answer,

 

I have cleared this specific error with the NM_CUSTOMDRAW by using the /D_WIN32_IE=0x0300 define as you said.

 

I have tried also setting this to 0x0400 and the compiler also recognize the NM_CUSTOMDRAW, so it compiles OK.

 

I couldn't check yet if the software works because I have other problems, but in case something is wrong I will come back with the analisys.

 

Thanks!!!

 

 

 

0 Kudos
Message 3 of 3
(3,782 Views)