FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Alert Message Function
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Alert Message Function
Posted: Wed May 02, 2012 04:00 PM
To All

Is there a way to clean up the message text of the Alert function .. As you can see the text of the message is very light and difficult to read.

Any way to make the text more viewable ?

Thanks
Rick Lipkin

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Alert Message Function
Posted: Wed May 02, 2012 06:19 PM
Rick, I would suggest Metro style.
Best regards,
Otto

Code (fw): Select all Collapse
function MetroMsgInfo( cTitel, cAnzeige1 )
//MetroMsgInfo( "Infobox",
   local lVar           := .f.
    local oDlg, oBTNNaviWeiter, obtnAbbruch
   local nWidth         := GetSysMetrics( 0 )
    local nLine       := 0
    local nRowSpace   := 20
    local nRowOffset  := 20

   *----------------------------------------------------------
      
      nLine := 16
        DEFINE DIALOG oDlg ;
           TITLE "Auswahl" ;
            FROM 0, 5 ;
              TO nRowSpace * nLine, nWidth + 6 ;
           PIXEL ;
           STYLE nOr( DS_MODALFRAME, WS_POPUP ) ;
           COLOR CLR_WHITE, SetUp():nRibbonTopClr ;
            FONT Setup():oFntDialog
    oDlg:SetFont( Setup():oFntMetroNormal2 )


       nLine := 0.5
  @ nRowOffset * nLine , nWidth/5/2.05 ;
         SAY cTitel ;
          OF oDlg ;
       PIXEL ;
         FONT Setup():oFntMetroMedium ;
       COLOR CLR_WHITE, SetUp():nRibbonTopClr
   
  
          nLine := 1
    @ nRowOffset + nRowSpace * nLine , nWidth/5/2.05 ;
         SAY  cAnzeige1  ;
          OF oDlg ;
       PIXEL ;
       FONT Setup():oLbxFont ;
       COLOR CLR_WHITE, SetUp():nRibbonTopClr
  
 
   *----------------------------------------------------------
        nLine := 4
    @ nRowOffset + nRowSpace * nLine,nWidth/5/2.05  ;
     FLATBTN oBTNNaviWeiter ;
      PROMPT "OK" ;
        FONT Setup():oFntMetroFLATBTN ;
        SIZE 76/2.05, ( FONT4HOEHE + 4 ) /2.05 ;
          OF oDlg ;
      ACTION ( lVar := .t., oDlg:End() ) ;
       COLOR CLR_GREEN, RGB( 210, 210, 210 )

     

   ACTIVATE DIALOG oDlg CENTERED

   
RETURN NIL
//----------------------------------------------------------------------------//


Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Alert Message Function
Posted: Wed May 02, 2012 06:20 PM

Rick,

maybe have a look at :

viewtopic.php?f=3t=23025p=123453#p123453

Best Regards
Uwe :?:

&&

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Alert Message Function
Posted: Wed May 02, 2012 07:08 PM
Uwe

I modified the Alert.prg like this .. I did not need the scroll bars and the OtherWise case will always work for me .. the mods are not perfect but work for me.

You do have to be careful with SetDlgGradient().. I did not have time to set up a background brush and make the background look like a regular windows message ...

Rick Lipkin

ps .. Antonio.. with all the changes you have made with transparencies .. it would be nice to update and re-work Alert()

Code (fw): Select all Collapse
DO CASE
CASE lHScroll .and. lVScroll
      @ 25, 70 GET oGet VAR cSay OF oDlg READONLY MEMO;
         SIZE nWidth, nHeight PIXEL FONT oFont ;
         COLOR NIL, GetSysColor( COLOR_BTNFACE ) ;
         NOBORDER HSCROLL WHEN .f.
CASE lHScroll .and. !lVScroll
      @ 25, 70 GET oGet VAR cSay OF oDlg READONLY MEMO;
         SIZE nWidth, nHeight PIXEL FONT oFont ;
         COLOR NIL, GetSysColor( COLOR_BTNFACE ) ;
         NOBORDER HSCROLL NO VSCROLL WHEN .f.
CASE !lHScroll .and. lVScroll
      @ 25, 70 GET oGet VAR cSay OF oDlg READONLY MEMO;
         SIZE nWidth, nHeight PIXEL FONT oFont ;
         COLOR NIL, GetSysColor( COLOR_BTNFACE ) ;
         NOBORDER WHEN .f.
OTHERWISE

  *    @ 25, 70 GET oGet VAR cSay OF oDlg READONLY MEMO;
  *       SIZE nWidth, nHeight PIXEL FONT oFont ;
  *       COLOR NIL, GetSysColor( COLOR_BTNFACE ) ;
  *       NOBORDER NO VSCROLL WHEN .f.

       // made changes here Rick Lipkin

       @ 25, 70 SAY oGet VAR cSay OF oDlg ;
         SIZE nWidth, nHeight PIXEL FONT oFont TRANSPARENT UPDATE


END CASE


Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Alert Message Function
Posted: Wed May 02, 2012 07:47 PM

Rick,

It seems as you are not using themes in your app.

Simply copy FWH\samples\tutor01.rc and rename it as yourapp.rc (your app name)m and your dialogs will look much nicer :-)

Please notice that FWH\samples\tutor01.rc uses some files stored in FWH\samples\winxp folder

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Alert Message Function
Posted: Wed May 02, 2012 09:27 PM

Antonio

Never used the Windows Manifest .. I just added it to my .rc compile .. it does add some nice features.

Thanks
Rick

Continue the discussion