<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Fonts in Dialog Boxes in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fonts-in-Dialog-Boxes/m-p/838656#M56736</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;i am building a QuickWin application using Compaq Visual Fortran. The application uses dialog boxes. In such dialog boxes, i need to include text with fonts other than the System font (which appears to be the default). I need for example Symbol (greek) for the labels of some edit fields. I am just interested in choosing the fonts for those labels (static text fields), i don't need to feed special fonts into edit fields.&lt;BR /&gt;Is there a way to have a dialog box containig text using various fonts, in a QuickWin application ? Is there a way, at least, to do it in a general Fortran Windows application?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;Yuric</description>
    <pubDate>Thu, 10 Oct 2002 23:43:04 GMT</pubDate>
    <dc:creator>yuric</dc:creator>
    <dc:date>2002-10-10T23:43:04Z</dc:date>
    <item>
      <title>Fonts in Dialog Boxes</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fonts-in-Dialog-Boxes/m-p/838656#M56736</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;i am building a QuickWin application using Compaq Visual Fortran. The application uses dialog boxes. In such dialog boxes, i need to include text with fonts other than the System font (which appears to be the default). I need for example Symbol (greek) for the labels of some edit fields. I am just interested in choosing the fonts for those labels (static text fields), i don't need to feed special fonts into edit fields.&lt;BR /&gt;Is there a way to have a dialog box containig text using various fonts, in a QuickWin application ? Is there a way, at least, to do it in a general Fortran Windows application?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;Yuric</description>
      <pubDate>Thu, 10 Oct 2002 23:43:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fonts-in-Dialog-Boxes/m-p/838656#M56736</guid>
      <dc:creator>yuric</dc:creator>
      <dc:date>2002-10-10T23:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Fonts in Dialog Boxes</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fonts-in-Dialog-Boxes/m-p/838657#M56737</link>
      <description>DFLOGM is totally independent from QuickWin (although Compaq's documentation doesn't state it explicitly). DFLOGM is convenient wrapper for Windows dialog APIs, but, being a wrapper, it can't do everything.&lt;BR /&gt;&lt;BR /&gt;What you want is possible with some help of Win32 API. First, you should define "dialog-initialization" callback (triggered immediately after DlgModal):&lt;PRE&gt;
EXTERNAL OnDlgInit
...
i = DlgSetSub(Dlg, IDD_MYDIALOG, OnDlgInit)
iRet = DlgModal(Dlg)&lt;/PRE&gt;And after that use CreateFont(Indirect) and WM_SETFONT.&lt;PRE&gt;...
SUBROUTINE OnDlgInit(Dlg,ID,iEvent)
USE DFWIN
USE DFLOGM
TYPE(Dialog):: Dlg
INTEGER::  ID, iEvent
TYPE(T_LOGFONT):: LF
INTEGER::  i, hFont


LF=T_LOGFONT(-12,0,0,0,0,0_1,0_1,0_1,0_1, &amp;amp;
   0_1,0_1,0_1,0_1,"Symbol"C) !12-point Symbol font
hFont = CreateFontIndirect(LF)
!Repeat for each control ID where you want to set the font
i = SendMessage(GetDlgItem(Dlg%hWnd,IDC_TEXT1), &amp;amp;
    WM_SETFONT, hFont, 0)

END SUBROUTINE OnDlgInit&lt;/PRE&gt;Note that the sample above, as written, has a memory leak, because hFont must be destroyed explicitly when not used anymore. You should make hFont (if you use more fonts, each one) global and after DlgModal destroy it via DeleteObject(hFont).&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Jugoslav&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Oct 2002 15:14:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fonts-in-Dialog-Boxes/m-p/838657#M56737</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2002-10-11T15:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Fonts in Dialog Boxes</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fonts-in-Dialog-Boxes/m-p/838658#M56738</link>
      <description>Many Greek symbols are available without any special programming. Simply press Alt+(3-digit code), when NumLock is on. See ASCII Character Codes under Help. Especially useful are Alt+248 for the degrees symbol, and Alt+241 for plus/minus symbol.&lt;BR /&gt; &lt;BR /&gt;Greg</description>
      <pubDate>Sat, 12 Oct 2002 06:12:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fonts-in-Dialog-Boxes/m-p/838658#M56738</guid>
      <dc:creator>gregscvf</dc:creator>
      <dc:date>2002-10-12T06:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Fonts in Dialog Boxes</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fonts-in-Dialog-Boxes/m-p/838659#M56739</link>
      <description>It doesn't seem to be that simple. Inserting ASCII characters (e.g. from the "IBM" set) works totally fine when outputting to the screen, not so when you want to write in a dialog box. For example, if i right-click on a static text field and type Alt+241 in the 'Caption' field, i will correctly see the +/- symbol. This works also for &lt;BR /&gt;Alt+248 (to stick with your two examples.) However, if i type Alt+235 (the greek delta) i get a normal "d".&lt;BR /&gt;Moreover, if i address the static text field from code&lt;BR /&gt;with &lt;BR /&gt;&lt;BR /&gt;retlog = DlgSet(dlg, ID_Static_text, char(235))&lt;BR /&gt;&lt;BR /&gt;i get a "e" with the umlat.&lt;BR /&gt;Conversely, if i type&lt;BR /&gt;&lt;BR /&gt;print*,char(235)&lt;BR /&gt;&lt;BR /&gt;i do get a greek delta on the screen.&lt;BR /&gt;&lt;BR /&gt;Just as a reminder, I am using Windows2000 (CVF is version 6.6.0 ).&lt;BR /&gt;&lt;BR /&gt;Thx,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Yuric</description>
      <pubDate>Thu, 17 Oct 2002 01:18:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fonts-in-Dialog-Boxes/m-p/838659#M56739</guid>
      <dc:creator>yuric</dc:creator>
      <dc:date>2002-10-17T01:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Fonts in Dialog Boxes</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fonts-in-Dialog-Boxes/m-p/838660#M56740</link>
      <description>I have also met such problem, which was baffling me.&lt;BR /&gt;I have use font of "SYMBOL" on my costom dialog. I use the method of "LOGFONT" to abtain it. But I find the the texts which should be SYMBOL can not displayed nomally on the discreen. &lt;BR /&gt;The way I thought out to overwholm it is that I change the properity of the whole dialog, to change the dialog font to SYMBOL. Then change texts which should be SYSTEM(font). &lt;BR /&gt;If there any simple way to conqour it. &lt;BR /&gt;I mean that I can just change the font of SYMBOL by easy commond in CVF system.</description>
      <pubDate>Sat, 19 Oct 2002 13:17:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fonts-in-Dialog-Boxes/m-p/838660#M56740</guid>
      <dc:creator>yaodong</dc:creator>
      <dc:date>2002-10-19T13:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Fonts in Dialog Boxes</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fonts-in-Dialog-Boxes/m-p/838661#M56741</link>
      <description>I tried the code snippet suggested by Jugoslav in his reply and it works perfectly in my case.&lt;BR /&gt;&lt;BR /&gt;It should work for you too (unless the problem is elsewhere.) Make sure you follow exactly the right procedure to implement it.&lt;BR /&gt;Here's what i've written (the ID of the text that will show greek fonts is "ID_anytext"):&lt;BR /&gt;&lt;BR /&gt;!---------------------	Makes greek_font global		&lt;BR /&gt;MODULE MyModule&lt;BR /&gt;	INTEGER greek_font&lt;BR /&gt;END MODULE MyModule&lt;BR /&gt;&lt;BR /&gt;!---------------------	Sub to create the dialog box&lt;BR /&gt;SUBROUTINE dialog_box		&lt;BR /&gt;	&lt;BR /&gt;	USE	DFWIN&lt;BR /&gt;	USE	DFLOGM&lt;BR /&gt;	USE 	MyModule&lt;BR /&gt;&lt;BR /&gt;TYPE(dialog)	dlg&lt;BR /&gt;LOGICAL	retlog&lt;BR /&gt;INCLUDE	'resource.fd'&lt;BR /&gt;EXTERNAL	OnDlgInit&lt;BR /&gt;&lt;BR /&gt;IF (.NOT. DlgInit(ID_MyDialog) ) THEN&lt;BR /&gt;	  WRITE (*,*)'Error: dialog not found'&lt;BR /&gt;ELSE&lt;BR /&gt;  retlog = DlgSetSub(dlg, ID_MyDialog, OnDlgInit)&lt;BR /&gt;  retlog = DlgSet(dlg, ID_anyText, "Some Text")&lt;BR /&gt;   &lt;BR /&gt;retlog = DlgModal(dlg)&lt;BR /&gt;retlog = DeleteObject(greek_font)&lt;BR /&gt;&lt;BR /&gt;	CALL DlgUninit(dlg)&lt;BR /&gt;&lt;BR /&gt;END SUBROUTINE dialog_box&lt;BR /&gt;&lt;BR /&gt;!--------------------------------------- Creates the font&lt;BR /&gt;SUBROUTINE OnDlgInit(dlg, ID, iEvent)&lt;BR /&gt;	USE	DFWIN&lt;BR /&gt;	USE	DFLOGM&lt;BR /&gt;	USE 	MyModule&lt;BR /&gt;&lt;BR /&gt;TYPE(dialog)	dlg&lt;BR /&gt;TYPE(T_Logfont)	LF&lt;BR /&gt;INTEGER ID, iEvent, i&lt;BR /&gt;INCLUDE 'resource.fd'&lt;BR /&gt;&lt;BR /&gt;	LF = T_Logfont(-18, 0,0,0,0,0_1,0_1,0_1,0_1 &amp;amp;&lt;BR /&gt;				0_1,0_1,0_1,0_1,0_1, "Symbol"C)&lt;BR /&gt;&lt;BR /&gt;greek_font=CreateFontIndirect(LF)&lt;BR /&gt;i=SendMessage(GetDlgItem(Dlg%hWnd,ID_anytext), &amp;amp;&lt;BR /&gt;				WM_SETFONT,greek_font,0)&lt;BR /&gt;&lt;BR /&gt;END SUBROUTINE OnDlgInit&lt;BR /&gt;!-------------------&lt;BR /&gt;&lt;BR /&gt;As i said, it works fine: when i run it, only the ID_anytext field will show the created font. Any other control has system default fonts (or whichever other font I've assigned to it).&lt;BR /&gt;&lt;BR /&gt;Good luck!&lt;BR /&gt;&lt;BR /&gt;yuric</description>
      <pubDate>Fri, 25 Oct 2002 22:20:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fonts-in-Dialog-Boxes/m-p/838661#M56741</guid>
      <dc:creator>yuric</dc:creator>
      <dc:date>2002-10-25T22:20:38Z</dc:date>
    </item>
  </channel>
</rss>

