Re: Possible Bug with Windows XP

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"AliR (VC++ MVP)" <AliR@xxxxxxxxxxxxx> wrote in message
news:laJEh.2165$jx3.1844@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Did you try it?

I don't see how it could possibly work, but, it did work, thanks. I am guessing
that this same sort of process would be required to get the FontSmoothing type?


AliR.

"Peter Olcott" <NoSpam@xxxxxxxxxxxxx> wrote in message
news:q4JEh.358381$qy.152012@xxxxxxxxxxxxxxx

"AliR (VC++ MVP)" <AliR@xxxxxxxxxxxxx> wrote in message
news:4xGEh.2127$jx3.1057@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Does this work?

SystemParametersInfo(SPI_SETFONTSMOOTHINGTYPE,
0,
(void *)FE_FONTSMOOTHINGCLEARTYPE,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);

AliR.

I don't think that that would work because FE_FONTSMOOTHINGCLEARTYPE is set
to the fixed contstant of 2.


"Peter Olcott" <NoSpam@xxxxxxxxxxxxx> wrote in message
news:xsGEh.166$iz5.45@xxxxxxxxxxxxxxx

"AliR (VC++ MVP)" <AliR@xxxxxxxxxxxxx> wrote in message
news:QgGEh.2122$jx3.233@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Looks like an error in the example

According to the docs
(http://msdn2.microsoft.com/en-us/library/ms724947.aspx)

it should be like this

SystemParametersInfo(SPI_SETFONTSMOOTHING,
TRUE,
0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);

SystemParametersInfo(SPI_SETFONTSMOOTHINGTYPE,
0,
FE_FONTSMOOTHINGCLEARTYPE,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);

AliR.

That does not compile, I cut-and-pasted it verbatim.
--------------------Configuration: DFA - Win32 Release--------------------
Compiling...
dfa.cpp
O:\cpp\DFA\dfa.cpp(329) : error C2664: 'SystemParametersInfoA' : cannot
convert parameter 3 from 'const int' to 'void *'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.

DFA.exe - 1 error(s), 0 warning(s)




"Peter Olcott" <NoSpam@xxxxxxxxxxxxx> wrote in message
news:xqDEh.106920$0y4.30034@xxxxxxxxxxxxxxx
Executing the following code changes font smoothing to Standard rather
than
ClearType. This is running on Windows XP Pro and compiled with MSVC++
6.0. I tried it again with MSVC++ 2005, same result.

SystemParametersInfo(SPI_SETFONTSMOOTHING,
TRUE,
0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);

SystemParametersInfo(SPI_SETFONTSMOOTHINGTYPE,
FE_FONTSMOOTHINGCLEARTYPE,
0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);

Here is the source of the documentation:
http://msdn2.microsoft.com/en-us/ms533912.aspx













.



Relevant Pages

  • Re: Possible Bug with Windows XP
    ... That does not compile, I cut-and-pasted it verbatim. ... Conversion from integral type to pointer type requires ... C-style cast or function-style cast ... This is running on Windows XP Pro and compiled with MSVC++ ...
    (microsoft.public.vc.mfc)
  • Re: Possible Bug with Windows XP
    ... That does not compile, I cut-and-pasted it verbatim. ... Conversion from integral type to pointer type requires ... C-style cast or function-style cast ... This is running on Windows XP Pro and compiled with MSVC++ ...
    (microsoft.public.vc.mfc)
  • Re: Possible Bug with Windows XP
    ... That does not compile, I cut-and-pasted it verbatim. ... Conversion from integral type to pointer type requires ... C-style cast or function-style cast ... This is running on Windows XP Pro and compiled with MSVC++ 6.0. ...
    (microsoft.public.vc.mfc)
  • Re: Possible Bug with Windows XP
    ... That does not compile, I cut-and-pasted it verbatim. ... Conversion from integral type to pointer type requires ... C-style cast or function-style cast ... This is running on Windows XP Pro and compiled with MSVC++ ...
    (microsoft.public.vc.mfc)
  • Re: Automatically generate variables
    ... That when you force MSVC into ISO mode, it can't compile its own ... header without errors. ... MSVC is a good implementation, ... MSVC is an *excellent* implementation of C90, ...
    (comp.lang.c)