Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

colors in dialog

jenny_s
Beginner
1,467 Views
Hello!
Does anyone know if it is possible to change the color of the text in a dialogbox? I am using a Windows-projecttype. I would like to change the color of the text depending on the calculationresult.
0 Kudos
6 Replies
Jugoslav_Dujic
Valued Contributor II
1,467 Views
Is it created with DialogBox(Param) or with DLGMODAL?
0 Kudos
jenny_s
Beginner
1,467 Views
I used DLGMODAL.
0 Kudos
Jugoslav_Dujic
Valued Contributor II
1,467 Views
See my extended version of DFLOGM.

Jugoslav
0 Kudos
jenny_s
Beginner
1,467 Views
Hi Jugoslav,

and thank you very much for helping me. I downloaded your testfile, and I tried to include your XFLOGM-file in my project, but I got a linking error. Have I done anything wrong?
error LNK2001: unresolved external symbol _DLGSETTITLE@12
0 Kudos
Jugoslav_Dujic
Valued Contributor II
1,467 Views
No you didn't. XFLOGM is based on DFLOGM from CVF 6.0; I didn't manage to keep it up to date with Compaq's additions in the meantime (there aren't many, but DlgSetTitle and ActiveX support are the most important). Thus, the versions "diverged".

Guess I'll add DlgSetTitle support soon; in the meantime, the workaround is to use a dialog-initialization callback:
i = DlgSetSub(dlg, IDD_DIALOG1, SetDlgTitle)
...
subroutine SetDlgTitle(Dlg,ID,iEvent)
use dflogm
use dfwin, only: SetWindowText
type(Dialog):: Dlg
integer::      id, iEvent, i
i = SetWindowText(Dlg%hWnd, "Your Dialog Title"C)
end subroutine SetDlgTitle

Sorry for the inconvenience.

Jugoslav
0 Kudos
jenny_s
Beginner
1,467 Views
Dear Jugoslav,

Thank you very much for your help. It is now working perfectly.

// Jenny
0 Kudos
Reply