Page 1 of 1

Say with no hot key parsing

Posted: Tue Dec 18, 2007 6:01 am
by AlexSchaft
Hi,

I modified the say class to be able to pass a parameter to not interpret the & key as an accelerator (using SS_NOPREFIX), but now my inserted CRLF don't get interpreted either.

Has anybody seen this before, or know what else I should pass to make it work properly?

Alex

Posted: Tue Dec 18, 2007 8:29 am
by Antonio Linares
Alex,

Please post the portion of source code where you use SS_NOPREFIX to review how you are using it, thanks

Say mods

Posted: Tue Dec 18, 2007 8:34 am
by AlexSchaft

Code: Select all


METHOD New( nRow, nCol, bText, oWnd, cPicture, oFont,;
            lCentered, lRight, lBorder, lPixels, nClrText, nClrBack,;
            nWidth, nHeight, lDesign, lUpdate, lShaded, lBox, lRaised,;
            plNoHotKey, plShortenPath  ) ; // AS 18/12/2007
            CLASS TSay
.
.
.
.


   ::nStyle    = nOR( WS_CHILD, WS_VISIBLE,;
                 If( lDesign, nOr( WS_CLIPSIBLINGS, WS_TABSTOP ), 0 ),;
                 If( lCentered, SS_CENTER, If( lRight, SS_RIGHT, SS_LEFT ) ),;
                 If( lBorder, WS_BORDER, 0 ),;
                 If( lShaded, SS_BLACKRECT, 0 ),;
                 If( lBox,    SS_GRAYRECT,  0 ),;
                 If( lRaised, SS_WHITERECT, 0 ), ;
                 If( plNoHotKey, SS_NOPREFIX, 0 ), ;// AS 18/12/2007
                 If( plShortenPath, SS_PATHELLIPSIS, 0 )) // AS 18/12/2007

Posted: Tue Dec 18, 2007 9:17 am
by Antonio Linares
Alex,

SS_NOPREFIX and CRLFs and working fine here on SAYs

What define value have you used for SS_NOPREFIX ?

Posted: Tue Dec 18, 2007 9:21 am
by AlexSchaft
Antonio Linares wrote:Alex,

SS_NOPREFIX and CRLFs and working fine here on SAYs

What define value have you used for SS_NOPREFIX ?
#define SS_NOPREFIX 128.

From xhb\include\winuser.ch

Posted: Tue Dec 18, 2007 9:28 am
by Antonio Linares
Alex,

The define value is right. Strange, it should work fine for you.

What FWH version are you using ? Here it is working fine with FWH 7.12

As a workaround you may use:
::cCaption = StrTran( ::cCaption, "&", "&&" )

Working

Posted: Tue Dec 18, 2007 9:39 am
by AlexSchaft
It's fine now, after I removed one too many comma's :oops:

Posted: Tue Dec 18, 2007 9:40 am
by Antonio Linares
very good! :-)