colors in dialog

colors in dialog

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.

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

Jugoslav www.xeffort.com

I used DLGMODAL.

See my extended version of DFLOGM.

Jugoslav

Jugoslav www.xeffort.com

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

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

Dear Jugoslav,

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

// Jenny

Leave a Comment

Please sign in to add a comment. Not a member? Join today