SENSITIVE SAY - EN WINDOWS XP, MAS DE 50 SAYS.

SENSITIVE SAY - EN WINDOWS XP, MAS DE 50 SAYS.

Postby karinha » Tue Jul 24, 2007 4:20 pm

Code: Select all  Expand view
// Sensitive Say control by Ramón Avendaño
// 23-02-00

//-> CLASSE SSAY.PRG

//----------------------------------------------------------------------------//

METHOD Paint() CLASS TSSay

   local n
   local nColorShadow, nColorLight

   DEFAULT ::lTransparent := .f.

   if ::nClrLight = Nil
      nColorLight := GetSysColor( COLOR_BTNHIGHLIGHT )
   else
      nColorLight := ::nClrLight
   endif

   ::GetDC()

   if ::lActive
   
**INI-20/02/2005 - Linares - Só começa a valer apartir do fwh fevereiro 2006
      if ::lTransparent .and. ! Empty( ::oBrush:hBitmap )
         SetBrushOrgEx( ::hDC, nBmpWidth( ::oBrush:hBitmap ) - ::nLeft, nBmpHeight( ::oBrush:hBitmap ) - ::nTop )
         FillRect( ::hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )
      endif
**FIM-20/02/2005 - Linares

      for n := 1 to len( ::aCaption )
          if ::lLight
              WSay( ::hWnd, ::hDC, ::nSTop + ( n - 1 ) * ::nTxtHeight + 1, ::nSLeft + 1, ::aCaption[ n ],;
                    nColorLight,, If( ::oFont != nil, ::oFont:hFont, 0 ), .T., .T., ::nAlign )
          endif

          WSay( ::hWnd, ::hDC, ::nSTop + ( n - 1 ) * ::nTxtHeight, ::nSLeft, ::aCaption[ n ],;
                If( ::lOver, ::nClrOver, ::nClrText ),,;
                If( ::oFont != nil, ::oFont:hFont, 0 ), .T., .T., ::nAlign )

      next
     
      if ::lDrawBox
         ::DrawBox( ::lOver )
      endif
     
   else
     
      nColorShadow := GetSysColor( COLOR_BTNSHADOW )
      nColorLight  := GetSysColor( COLOR_BTNHIGHLIGHT )

      for n := 1 to len( ::aCaption )
          WSay( ::hWnd, ::hDC, ::nSTop + ( n - 1 ) * ::nTxtHeight + 1, ::nSLeft + 1, ::aCaption[ n ], nColorLight,,;
                If( ::oFont != nil, ::oFont:hFont, 0 ), .T., .T., ::nAlign )
          WSay( ::hWnd, ::hDC, ::nSTop + ( n - 1 ) * ::nTxtHeight, ::nSLeft, ::aCaption[ n ], nColorShadow,,;
                If( ::oFont != nil, ::oFont:hFont, 0 ), .T., .T., ::nAlign )
      next

   endif

   // 3D

   if ::lShaded
      WndInset( ::hWnd, ::hDC )   // SHADED, SHADOW
   endif

   if ::lRaised
      WndRaised( ::hWnd, ::hDC )  // RAISED
   endif

   if ::lBox
      WndBoxIn( ::hDC, 0, 0, ::nBottom-::nTop, ::nRight-::nLeft )
      WndBoxRaised( ::hDC, 1, 1, ::nBottom-::nTop-1, ::nRight-::nLeft-1 )
   endif

   ::ReleaseDC()

   if ::lTransparent
      SysRefresh()
   endif

return nil

//-> Maestro Antonio... No tienes un erro aca?? Pues, Traba el DIALOGO en un
//-> FOLDER con mas de 50 SAYS... Que puede seer?
//-> Esto ocorre solo en Windows XP, en Windows 98, Funciona Normal.

Muchas gracias.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7641
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Postby Antonio Linares » Tue Jul 24, 2007 5:01 pm

Joao,

Has probado a usar estandard SAYs en vez de SSAYs y comprobar si el problema viene de usar SSAYs ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41901
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby karinha » Tue Jul 24, 2007 6:27 pm

Antonio Linares wrote:Joao,

Has probado a usar estandard SAYs en vez de SSAYs y comprobar si el problema viene de usar SSAYs ?



SI, MAESTRO!!

Code: Select all  Expand view
    IF IsWinNT() .OR. IsWin2000()  // Para Windows XP/NT e 2000 / 2003
        //-> Problemas aqui... Nao Suporta Mas que 50 Says Usando SSAY.PRG
        //-> Por enquanto, usar Says's Normais Para Colorir. Trava no XP.
        For IDCor=401 TO 456
            REDEFINE SAY oSay ID iDcor              ;
            OF oFld:aDialogs[1]                     ;
            COLOR CLR_BLACK, CLR_AMARELO            ;
            UPDATE                                  ;
            FONT oFnt
        Next IDCor
     ELSE
        For IDCor=401 TO 456
            REDEFINE SENSITIVE SAY ID iDcor         ;
            OF oFld:aDialogs[1]                     ;
            COLOR CLR_BLACK, CLR_AMARELO            ;
            UPDATE                                  ;
            RAISED TRANSPARENT                      ;
            FONT oFnt
        Next IDCor
    ENDIF
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7641
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 19 guests