colors in dialog

colors in dialog

jenny_s's picture

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.

7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Jugoslav Dujic's picture

Is it created with DialogBox(Param) or with DLGMODAL?

Jugoslav www.xeffort.com
jenny_s's picture

I used DLGMODAL.

Jugoslav Dujic's picture
Jugoslav www.xeffort.com
jenny_s's picture

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

Jugoslav Dujic's picture

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

Jugoslav www.xeffort.com
jenny_s's picture

Dear Jugoslav,

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

// Jenny

Login to leave a comment.