11 out of 13 rated this helpful - Rate this topic

TextOut

This content has moved to another location. See TextOut for the latest version.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Complicated C++

I have copyied the text above and as usual, there appear some errors.


Here it is:

------ Build started: Project: Novy, Configuration: Release Win32 ------

Compiling...

Novy.cpp

.\Novy.cpp(161) : error C2440: 'initializing' : cannot convert from 'const char [32]' to 'TCHAR []'

There is no context in which this conversion is possible

.\Novy.cpp(162) : error C2893: Failed to specialize function template 'char (*RtlpNumberOf(T (&)[N]))[N]'

With the following template arguments:

'TCHAR'

.\Novy.cpp(165) : error C2360: initialization of 'text' is skipped by 'case' label

.\Novy.cpp(161) : see declaration of 'text'

.\Novy.cpp(168) : error C2361: initialization of 'text' is skipped by 'default' label

.\Novy.cpp(161) : see declaration of 'text'

Build log was saved at "file://d:\Janko's Documents\Visual Studio 2008\Projects\Novy\Release\BuildLog.htm"

Novy - 4 error(s), 0 warning(s)

  1. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
DrawText and TextOut are sensitive to memory aligment when drawing to a DIBSection
DrawTextW on 2000 and XP will not render to a DIBSection if the string is not WCHAR aligned in memory. But it does work in Vista.
TextOutW will not render to a DIBSection when the string is non WCHAR aligned on any of 2000, XP or Vista.
Both DrawTextW and TextOutW work find when drawing to either a screen DC or a printer DC on all three Windows flavours.

see http://louis.steelbytes.com/DrawTextBug.html for more info