flat assembler
Message board for the users of flat assembler.
Index
> Windows > How to get info for the font CharSet |
Author |
|
revolution 15 Dec 2008, 12:11
Use TranslateCharsetInfo to fill the CHARSETINFO structure.
|
|||
15 Dec 2008, 12:11 |
|
habran 15 Dec 2008, 14:49
Thanks for your answer revolution but for that function I need to supply that information which I actually need
In a mid time I have found solution for my need: I call 'EnumFontFamiliesEx' with proper parameters and get the answer at location lpelfe + 09Ch ('western' or 'symbol' and so on) I appreciate your effort, thanks regards |
|||
15 Dec 2008, 14:49 |
|
revolution 15 Dec 2008, 23:45
habran wrote: Thanks for your answer revolution but for that function I need to supply that information which I actually need |
|||
15 Dec 2008, 23:45 |
|
habran 16 Dec 2008, 00:06
No, I just read the CharSet info direct from location
Quote:
here are the code EnumFontFamExProc proc lpelfe:ENUMLOGFONTEX , lpntme:NEWTEXTMETRICEX , FontType:DWORD, lParam:LPARAM mov eax, dword ptr lpelfe;.elfFullName mov edx,extent add eax,edx;3ch;9ch push eax invoke lstrcmp, Head,eax ; check if it is the same name .if eax ; not the same name inc index pop eax invoke lstrcpy, Tail,eax m2m Head,Tail invoke lstrlen, Tail inc eax add Tail,eax .else pop eax .endif mov eax,rval ret 16 EnumFontFamExProc endp and Caller is: invoke GetDC,NULL mov mDC,eax invoke lstrcpy,addr lpLogfont.lfFaceName,addr szWork mov lpLogfont.lfCharSet, DEFAULT_CHARSET mov extent,09ch lea eax,CharsetBuff mov Head,eax mov Tail,eax mov index,0 mov rval,1 invoke EnumFontFamiliesEx, mDC,addr lpLogfont,addr EnumFontFamExProc,0,0; invoke ReleaseDC, NULL, mDC invoke lstrcmp,addr CharsetBuff,addr szSymbol .if eax mov lf.lfCharSet,ANSI_CHARSET .else mov lf.lfCharSet,SYMBOL_CHARSET .endif invoke lstrcpy, offset FontName, offset lf.lfFaceName invoke CreateFontIndirect,addr lf mov hFont,eax mov al, lf.lfCharSet mov charF.bCharSet,al;SYMBOL_CHARSET invoke SendMessage,hEdit, EM_SETCHARFORMAT, SCF_SELECTION, offset charF regards |
|||
16 Dec 2008, 00:06 |
|
habran 16 Dec 2008, 05:21
I just uploaded new version of the MDIRichEditor and if you are interestid how is it done have look Combos.asm and also WndProc ".elseif eax = 81"
don't hesitate to ask for more explanation regards |
|||
16 Dec 2008, 05:21 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.