News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Change PopupMenu Font

Started by jbullard, August 22, 2006, 12:57:33 AM

Previous topic - Next topic

Kongbo

Partly soluted.Not soluted completely,
The define of LOGFONT struct is very strict,
Even a very little different in the struct, the display string is WRONG.

eg:
1:If the character's wide is just a little wider or thinner , the position of cursor
  is in the middle of a letter:<
2:If the user change the RichEdit's font face or size ,even a very little different
  in the LOGFONT struct will make Windows select another font.
SO,Windows drive us MUST really fill in every field of the LOGFONT corectly. 

------------------------------------------
typedef struct tagLOGFONT {
   LONG lfHeight;
   LONG lfWidth; ----?
   LONG lfEscapement; ----?
   LONG lfOrientation;
   LONG lfWeight; ----?
   BYTE lfItalic;
   BYTE lfUnderline;
   BYTE lfStrikeOut;
   BYTE lfCharSet;
   BYTE lfOutPrecision;----?
   BYTE lfClipPrecision; ----?
   BYTE lfQuality;
   BYTE lfPitchAndFamily;
   TCHAR lfFaceName[LF_FACESIZE];
} LOGFONT;


typedef struct _charformat {
    UINT     cbSize;
    _WPAD    _wPad1;
    DWORD    dwMask;
    DWORD    dwEffects;
    LONG     yHeight;
    LONG     yOffset;
    COLORREF crTextColor;
    BYTE     bCharSet;
    BYTE     bPitchAndFamily;
    TCHAR    szFaceName[LF_FACESIZE];
    _WPAD    _wPad2;
} CHARFORMAT;