kyuseo의 게임 프로그래밍

DrawText :: DT_NOPREFIX 의 용법 본문

C++ 개발

DrawText :: DT_NOPREFIX 의 용법

kyuseo 2008. 5. 26. 17:52

개요..

 

DrawText 함수는 다양한 DT_... 포맷을 가지고 다양한 출력을 할 수 있습니다.

 

특히 일반적으로 "김&정호 " 로 출력을 하면 "김호" 로 원하지 않는 모양으로 출력이 되는 것을 해결하기 위해서는 DT_NOPREFIX 포맷을 사용하면 쉽게 해결됩니다.

 

 

실제 사용 모습

 

 

 

기타 DT_ 용법

 

/*

* DrawText() Format Flags

*/

#define DT_TOP 0x00000000

#define DT_LEFT 0x00000000

#define DT_CENTER 0x00000001

#define DT_RIGHT 0x00000002

#define DT_VCENTER 0x00000004

#define DT_BOTTOM 0x00000008

#define DT_WORDBREAK 0x00000010

#define DT_SINGLELINE 0x00000020

#define DT_EXPANDTABS 0x00000040

#define DT_TABSTOP 0x00000080

#define DT_NOCLIP 0x00000100

#define DT_EXTERNALLEADING 0x00000200

#define DT_CALCRECT 0x00000400

#define DT_NOPREFIX 0x00000800

#define DT_INTERNAL 0x00001000

 

#if(WINVER >= 0x0400)

#define DT_EDITCONTROL 0x00002000

#define DT_PATH_ELLIPSIS 0x00004000

#define DT_END_ELLIPSIS 0x00008000

#define DT_MODIFYSTRING 0x00010000

#define DT_RTLREADING 0x00020000

#define DT_WORD_ELLIPSIS 0x00040000

#if(WINVER >= 0x0500)

#define DT_NOFULLWIDTHCHARBREAK 0x00080000

#if(_WIN32_WINNT >= 0x0500)

#define DT_HIDEPREFIX 0x00100000

#define DT_PREFIXONLY 0x00200000

#endif /* _WIN32_WINNT >= 0x0500 */

#endif /* WINVER >= 0x0500 */