PLEASE TRY THIS
- Code: Select all Expand view
- #include "FiveWin.ch"
#include "Constant.ch"
#define DLG_nColorDlg RGB( 245,245,235)
#define DLG_nColortitle1 RGB( 219, 230, 244)
#define DLG_nColortitle2 RGB( 207, 221, 239)
#define DLG_nColorBar1 RGB( 250,250,245)
#define DLG_nColorBar2 RGB( 245,245,235)
#define DLG_nColorBtn1 RGB( 245,245,235)
#define DLG_nColorBtn2 RGB(250,250,245)
#define DLG_nColorBtnB RGB(195,195,185)
Function test()
local oDlg,oFont,oBold
local oCursorBtn :=TCursor():New(,'HAND')
local oBtn:=array(4)
local nWd := GetSysMetrics(0) * .58
local nHt := (GetSysMetrics(1) / 2 ) -20
local nRow:= 10,nCol:= 10
oFont := TFont():New( "TAHOMA", 0, 14,, )
oBold := TFont():New( "TAHOMA", 0, 14,,.t. )
DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL ;
FONT oFont COLOR CLR_BLACK, DLG_nColorDlg ;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MINIMIZEBOX)
@ nRow, nCol BTNBMP obtn[1] ;
PROMPT "text" LEFT ;
FILENAME "1.bmp" ;
SIZE 45, 13 PIXEL FLAT NOROUND GDIP OF oDlg ;
ACTION NIL
nCol+=48
@ nRow, nCol BTNBMP obtn[2] ;
PROMPT "text" LEFT ;
FILENAME "2.bmp" ;
COLOR RGB(30,30,30),DLG_nColorBtn2;
SIZE 45, 13 PIXEL FLAT NOROUND GDIP OF oDlg ;
ACTION NIL
nCol+=48
@ nRow, nCol BTNBMP obtn[3] ;
PROMPT "text" LEFT ;
FILENAME "3.bmp" ;
SIZE 45, 13 PIXEL FLAT NOROUND GDIP OF oDlg ;
ACTION NIL
nCol+=48
@ nRow,nCol BTNBMP obtn[4] FILE "3.bmp" ;
SIZE 45, 13 PIXEL OF oDlg FLAT NOROUND GDIP;
PROMPT "text" LEFT ;
ACTION NIL
For n= 1 to len(oBtn)
obtn[n]:nClrText := CLR_BLACK
*obtn[n]:setcolor( DLG_nColorBtn2,DLG_nColorBtn1)
obtn[n]:bClrGrad := { | lPressed | If( ! lPressed,;
{ { 1, DLG_nColorBar2, DLG_nColorBar1} },;
{ { 1, DLG_nColorBar1, DLG_nColorBar2} } ) }
obtn[n]:nClrBorder := { |lMouseOver,oBtn| If( lMouseOver, DLG_nColorBtnB, DLG_nColorBtnB ) }
obtn[n]:oCursor:= oCursorBtn
next
Activate DIALOG oDlg
return nil