COLORES EN GROUP BOX
Posted: Fri Aug 31, 2007 7:10 pm
Buenas Amigos...
Por favor, una ayuda...
No consigo poner COLORES en un GROUPBOX.
Ya modifique el DIALOGO... Mas...
//
BROWSE_CADASTRO_BANCOS DIALOG 1, 20, 530, 275
STYLE DS_ABSALIGN | DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_THICKFRAME
CAPTION "SCB - Gerenciamento do Cadastro de Bancos - Browse"
FONT 8, "MS Sans Serif"
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
{
EDITTEXT 20, 98, 33, 312, 12, WS_BORDER | WS_TABSTOP
CONTROL "", 101, "TWBrowse", WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 3, 49, 523, 200
PUSHBUTTON "", 301, 120, 255, 70, 16
PUSHBUTTON "", 302, 193, 255, 70, 16
PUSHBUTTON "", 303, 266, 255, 70, 16
PUSHBUTTON "", 304, 340, 255, 70, 16
AUTORADIOBUTTON " &1 Por Nome", 201, 188, 13, 72, 12
AUTORADIOBUTTON " &2 Por Código", 202, 270, 13, 72, 12
LTEXT "Busca Rápida:", 402, 4, 33, 90, 12, NOT WS_GROUP
LTEXT "<- BackSpace Apaga", 403, 415, 33, 110, 12, NOT WS_GROUP
GROUPBOX "Escolha Índice da Pesquisa", 501, 177, 3, 176, 27, BS_GROUPBOX | WS_GROUP
LTEXT "<- Use ALT+1 ou ALT+2", 401, 360, 13, 110, 12, NOT WS_GROUP
}
//
REDEFINE GROUP oGroup ID 501 COLOR CLR_VERMELHO, CLR_AMARELO OF oDlg ;
FONT oFnt TRANSPARENT
//
Ya modifique la classe GROUP.PRG, mas...
//
#define WM_UPDATEUISTATE 296 // 0x0128
//
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TGroup
local nResult
if ::lDrag .and. nMsg == WM_NCHITTEST // To have a standard behavior on Clicks
return DefWindowProc( ::hWnd, nMsg, nWParam, nLParam )
endif
if nMsg == WM_UPDATEUISTATE // Groups and contained controls were erased when pressing ALT
nResult = Super:HandleEvent( nMsg, nWParam, nLParam )
::oWnd:Refresh()
return nResult
endif
return Super:HandleEvent( nMsg, nWParam, nLParam )
//
METHOD Colors( hDC ) CLASS TGroup
DEFAULT ::nClrText := GetTextColor( hDC ),;
::nClrPane := GetBkColor( hDC ),;
::oBrush := TBrush():New( , ::nClrPane )
SetTextColor( hDC, ::nClrText )
SetBkColor( hDC, ::nClrPane )
if ::oBrush:hBitmap != nil
SetBrushOrgEx( hDC, ::nLeft(), nBmpHeight( ::oBrush:hBitmap ) - ::nTop )
endif
return ::oBrush:hBrush
//
Donde esta mi erro??
Muchas gracias.
Regards, saludos.
Por favor, una ayuda...
No consigo poner COLORES en un GROUPBOX.
Ya modifique el DIALOGO... Mas...
//
BROWSE_CADASTRO_BANCOS DIALOG 1, 20, 530, 275
STYLE DS_ABSALIGN | DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_THICKFRAME
CAPTION "SCB - Gerenciamento do Cadastro de Bancos - Browse"
FONT 8, "MS Sans Serif"
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
{
EDITTEXT 20, 98, 33, 312, 12, WS_BORDER | WS_TABSTOP
CONTROL "", 101, "TWBrowse", WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 3, 49, 523, 200
PUSHBUTTON "", 301, 120, 255, 70, 16
PUSHBUTTON "", 302, 193, 255, 70, 16
PUSHBUTTON "", 303, 266, 255, 70, 16
PUSHBUTTON "", 304, 340, 255, 70, 16
AUTORADIOBUTTON " &1 Por Nome", 201, 188, 13, 72, 12
AUTORADIOBUTTON " &2 Por Código", 202, 270, 13, 72, 12
LTEXT "Busca Rápida:", 402, 4, 33, 90, 12, NOT WS_GROUP
LTEXT "<- BackSpace Apaga", 403, 415, 33, 110, 12, NOT WS_GROUP
GROUPBOX "Escolha Índice da Pesquisa", 501, 177, 3, 176, 27, BS_GROUPBOX | WS_GROUP
LTEXT "<- Use ALT+1 ou ALT+2", 401, 360, 13, 110, 12, NOT WS_GROUP
}
//
REDEFINE GROUP oGroup ID 501 COLOR CLR_VERMELHO, CLR_AMARELO OF oDlg ;
FONT oFnt TRANSPARENT
//
Ya modifique la classe GROUP.PRG, mas...
//
#define WM_UPDATEUISTATE 296 // 0x0128
//
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TGroup
local nResult
if ::lDrag .and. nMsg == WM_NCHITTEST // To have a standard behavior on Clicks
return DefWindowProc( ::hWnd, nMsg, nWParam, nLParam )
endif
if nMsg == WM_UPDATEUISTATE // Groups and contained controls were erased when pressing ALT
nResult = Super:HandleEvent( nMsg, nWParam, nLParam )
::oWnd:Refresh()
return nResult
endif
return Super:HandleEvent( nMsg, nWParam, nLParam )
//
METHOD Colors( hDC ) CLASS TGroup
DEFAULT ::nClrText := GetTextColor( hDC ),;
::nClrPane := GetBkColor( hDC ),;
::oBrush := TBrush():New( , ::nClrPane )
SetTextColor( hDC, ::nClrText )
SetBkColor( hDC, ::nClrPane )
if ::oBrush:hBitmap != nil
SetBrushOrgEx( hDC, ::nLeft(), nBmpHeight( ::oBrush:hBitmap ) - ::nTop )
endif
return ::oBrush:hBrush
//
Donde esta mi erro??
Muchas gracias.
Regards, saludos.