In my code I would like to use the constant (define in WinGdi.h)
CLEARTYPE_QUALI TY
But that doesn't work!!
(it's for CreateFont(...) )
A quick look at the header reveal that:
== WinGdi.h fragment ===
#if (_WIN32_WINNT >= 0x0500)
#define CLEARTYPE_QUALI TY 5
#endif
=============== ====
Now I wonder, how do I define _WIN32_WINNT ?
- should I just go into Project Properties => Configuration => C/C++ /
Preprocessor => Definition
and put some random value?
- beside how will this work?
generally speaking my product work on Windows 2000 & XP and this constant is
not a bit flag, it's a number (other constant are 1,2,3,4)
Any tips? advice? ideas? suggestion? 9 8949
Hi Lloyd! A quick look at the header reveal that: == WinGdi.h fragment === #if (_WIN32_WINNT >= 0x0500) #define CLEARTYPE_QUALI TY 5 #endif =============== ====
Now I wonder, how do I define _WIN32_WINNT ? - should I just go into Project Properties => Configuration => C/C++ / Preprocessor => Definition and put some random value?
It should not be random...
See: Using the Windows Headers http://msdn.microsoft.com/library/en...ws_headers.asp
If you have a current PSDK, you should set "NTDDI_VERS ION"
generally speaking my product work on Windows 2000 & XP and this constant is not a bit flag, it's a number (other constant are 1,2,3,4)
The define
NTDDI_VERSION=N TDDI_WIN2K
in your project settings
Or (for older PSDKs):
_WIN32_WINNT=0x 0500
WINVER=0x0500
--
Greetings
Jochen
My blog about Win32 and .NET http://blog.kalmbachnet.de/
"Lloyd Dupont" <net.galador@ld > wrote in message
news:eM******** ******@TK2MSFTN GP02.phx.gbl... In my code I would like to use the constant (define in WinGdi.h) CLEARTYPE_QUALI TY But that doesn't work!! (it's for CreateFont(...) )
A quick look at the header reveal that: == WinGdi.h fragment === #if (_WIN32_WINNT >= 0x0500) #define CLEARTYPE_QUALI TY 5 #endif =============== ====
Now I wonder, how do I define _WIN32_WINNT ? - should I just go into Project Properties => Configuration => C/C++ / Preprocessor => Definition and put some random value?
surely not a random value.
- beside how will this work? generally speaking my product work on Windows 2000 & XP and this constant is not a bit flag, it's a number (other constant are 1,2,3,4)
Any tips? advice? ideas? suggestion?
#define _WIN32_WINNT 0x0501
in stdafx.h will do best.
"Egbert Nierop (MVP for IIS)" wrote: generally speaking my product work on Windows 2000 & XP and this constant is not a bit flag, it's a number (other constant are 1,2,3,4)
Any tips? advice? ideas? suggestion?
#define _WIN32_WINNT 0x0501
in stdafx.h will do best.
Keep in mind that if you are defining _WIN32_WINNT to a specific value
because an API requires it, it is because that API requires at least that
version of Windows to run.
Therefore, if your product must work on Windows 2000, and you are using an
API that requires at least Windows XP (which is what setting _WIN32_WINNT to
0x0501 means), then you are going to have a problem later on when you try to
run your product on Windows 2000.
For your particular situation, ClearType wasn't introduced until WinXP.
Depending on what you are doing with ClearType, you may need to write code to
ascertain which version of Windows is running and to take action accordingly.
Sean
Thanks for addressing the second part of my question!
I though along those lines:
all these constants are just increasing number (1,2,3,4 and 5 for cleartype)
not only it should be available for windows 2000 in a service pack but,
hopefully, the function should gracefuly either of:
-use a known lower number
-use default DRAFT quality instead....
Anyway, any tip on how to write a simple test of the current OS?
thanks!
"Sean M. DonCarlos" <se********@new sgroups.nospam> wrote in message
news:96******** *************** ***********@mic rosoft.com... "Egbert Nierop (MVP for IIS)" wrote:
> generally speaking my product work on Windows 2000 & XP and this > constant > is not a bit flag, it's a number (other constant are 1,2,3,4) > > Any tips? advice? ideas? suggestion?
#define _WIN32_WINNT 0x0501
in stdafx.h will do best.
Keep in mind that if you are defining _WIN32_WINNT to a specific value because an API requires it, it is because that API requires at least that version of Windows to run.
Therefore, if your product must work on Windows 2000, and you are using an API that requires at least Windows XP (which is what setting _WIN32_WINNT to 0x0501 means), then you are going to have a problem later on when you try to run your product on Windows 2000.
For your particular situation, ClearType wasn't introduced until WinXP. Depending on what you are doing with ClearType, you may need to write code to ascertain which version of Windows is running and to take action accordingly.
Sean
"Lloyd Dupont" <net.galador@ld > wrote in message
news:uI******** ******@TK2MSFTN GP05.phx.gbl... Anyway, any tip on how to write a simple test of the current OS?
The short answer to the question is to say that you call GetVersionEx().
But you have to understand that if you build an application so that it only
runs on 2K or better, and if someone tries to launch that binary on NT4 say
(a platform which should be retired IMO) that your application may not ever
get to the point of calling GetVersionEx().
An application will fail to load if it makes implicit reference to a
function in a DLL which is not present at load time.
Regards,
Will
"William DePalo [MVP VC++]" <wi***********@ mvps.org> wrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. .. "Lloyd Dupont" <net.galador@ld > wrote in message news:uI******** ******@TK2MSFTN GP05.phx.gbl... Anyway, any tip on how to write a simple test of the current OS? The short answer to the question is to say that you call GetVersionEx().
But you have to understand that if you build an application so that it only runs on 2K or better, and if someone tries to launch that binary on NT4 say (a platform which should be retired IMO) that your application may not ever get to the point of calling GetVersionEx().
An application will fail to load if it makes implicit reference to a function in a DLL which is not present at load time.
If the DLL is not present, the application fails to load. If the DLL is
present but an older version so the function is missing, the application
loads and only fails if it tries to call that function, correct? Regards, Will
"Ben Voigt" <rb*@nospam.nos pam> wrote in message
news:ew******** ******@TK2MSFTN GP05.phx.gbl... If the DLL is not present, the application fails to load. If the DLL is present but an older version so the function is missing, the application loads and only fails if it tries to call that function, correct?
No.
At least not if you link the DLL implicitly. If you do that, at runtime the
loader will display a message box which says something like this:
"The procedure entry point XXXX could not be located in dynamic link
library YYYY".
Regards,
Will This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: leroybt.rm |
last post by:
I don't understand why this does not work:
<FILE1> test1.py
#Import Packages
import string
#
data=0
data=data+1
|
by: Christian Schmidbauer |
last post by:
Hello!
I prepare my XML document like this way:
-------------------------------------------------------
PrintWriter writer;
Document domDocument;
Element domElement;
// Root tag
|
by: Diandian Zhang |
last post by:
Does anyone have an idea, how to do it? Thanks in advance!
|
by: H. S. |
last post by:
Hi,
I am trying to compile these set of C++ files and trying out class
inheritence and function pointers. Can anybody shed some light why my
compiler is not compiling them and where I am going wrong?
I am using g++ (GCC) 3.3.5 on a Debian Sarge system. The compiler complains:
//****************************
//**************************** Compiler output starts ***********
cd /home/red/tmp/testprogs/
|
by: Sidney Cadot |
last post by:
Hi all,
In a discussion with Tak-Shing Chan the question came up whether the
as-if rule can cover I/O functions. Basically, he maintains it can, and
I think it doesn't.
Consider two programs:
/*** a.c ***/
| |
by: Don Wash |
last post by:
Hi All!
I'm getting the following Error:
No DLLs has been compiled yet and nothing in the \bin directory. So it is
not the versioning problem or anything like that.
And here are the source of the files...
|
by: tomy |
last post by:
Hi Group:
The confusing code is as below:
//-------------------------------------------------
#if
#define FOO foo
#else
#define FOO foobar
#endif
//-------------------------------------------------
|
by: Steven.Xu |
last post by:
hi everybody,
i am useing some classes which in System.Xml to deal with xml document. what
can i do if the document include "<" or ">"?
Thanks.
|
by: ismailc |
last post by:
Hi, I need help please.
Update system to to new version & moved on to .Net2
But now my code that worked in my .Net1 xslt does not work.
.Net1 fine:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:asp="remove" xmlns:igchart="remove" xmlns:igsch="remove">
<td class='rowDet' id="td_<xsl:value-of select='@name' />">
.Net2 don't work:
<xsl:stylesheet...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |