About "&" character in Resources Dialogs

Post Reply
User avatar
Sakis
Posts: 41
Joined: Fri Oct 21, 2005 2:12 pm
Location: Athens

About "&" character in Resources Dialogs

Post by Sakis »

The character "&" not shown properly in dialogs titles when use them from resources. Any ideas.
FWH Ver 2.6 September 2005

Thanks in advance
Dionisis
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: About "&" character in Resources Dialogs

Post by Enrico Maria Giordano »

Works fine for me:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    DEFINE DIALOG oDlg;
           TITLE "This is a & test"

    @ 1, 1 BUTTON "&Close" ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL
EMG
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: About "&" character in Resources Dialogs

Post by Enrico Maria Giordano »

Ops. This is from resources (works fine either):

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBut

    DEFINE DIALOG oDlg;
           RESOURCE "TEST"

    REDEFINE BUTTON oBut PROMPT "&Close";
             ID 201 OF oDlg;
             ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL

Code: Select all

TEST DIALOG 40, 27, 194, 119
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "This is a & test"
FONT 8, "MS Sans Serif"
{
 DEFPUSHBUTTON "&Close", 201, 12, 96, 50, 14
}
EMG
User avatar
Sakis
Posts: 41
Joined: Fri Oct 21, 2005 2:12 pm
Location: Athens

About "&" character in Resources Dialogs

Post by Sakis »

GoodMorning Enrico

The dialogs is contained into a dll it dosen't works for me but i live
without it. I changed it to onother setence. Many thanks for your code and your valued help to all of us.

Greetings from Greece

Dionisis
Post Reply