• R/O
  • SSH
  • HTTPS

gd10: Commit


Commit MetaInfo

Revisão54 (tree)
Hora2019-08-02 06:17:07
Autorhgtterry

Mensagem de Log

Dimensions 010819

Mudança Sumário

Diff

--- Equity10/EQ_App.cpp (revision 53)
+++ Equity10/EQ_App.cpp (revision 54)
@@ -268,6 +268,8 @@
268268
269269 Brush_White = CreateSolidBrush(RGB(255,255,255));
270270
271+ Brush_Grey = CreateSolidBrush(RGB(223,223,223));
272+
271273 Brush_Red = CreateSolidBrush(RGB(252,85,63));
272274 Brush_Green = CreateSolidBrush(RGB(0,255,0));
273275 Brush_Blue = CreateSolidBrush(RGB(0,180,255));
@@ -769,6 +771,71 @@
769771 }
770772
771773 // *************************************************************************
774+// * Custom_GreyGreen_Toggle Terry Bernie *
775+// *************************************************************************
776+bool EQ_App::Custom_GreyGreen_Toggle(LPNMCUSTOMDRAW item, bool Toggle)
777+{
778+ static HBRUSH defaultbrush = NULL;
779+ static HBRUSH hotbrush = NULL;
780+ static HBRUSH selectbrush = NULL;
781+
782+ {
783+ if (item->uItemState & CDIS_HOT) //Our mouse is over the button
784+ {
785+ //Select our color when the mouse hovers our button
786+
787+ if (Toggle == 1)
788+ {
789+ hotbrush = CreateGradientBrush(RGB(0, 240, 0), RGB(0, 240, 0), item);
790+ }
791+ else
792+ {
793+ hotbrush = CreateGradientBrush(RGB(240, 240, 240), RGB(240, 240, 240), item);;
794+ }
795+
796+ HPEN pen = CreatePen(PS_INSIDEFRAME, 0, RGB(0, 0, 0));
797+
798+ HGDIOBJ old_pen = SelectObject(item->hdc, pen);
799+ HGDIOBJ old_brush = SelectObject(item->hdc, hotbrush);
800+
801+ RoundRect(item->hdc, item->rc.left, item->rc.top, item->rc.right, item->rc.bottom, 7, 7);
802+
803+ SelectObject(item->hdc, old_pen);
804+ SelectObject(item->hdc, old_brush);
805+ DeleteObject(pen);
806+
807+ return CDRF_DODEFAULT;
808+ }
809+
810+ //Select our color when our button is doing nothing
811+
812+ if (Toggle == 1)
813+ {
814+ defaultbrush = App->Brush_Green;
815+ }
816+ else
817+ {
818+ defaultbrush = App->Brush_Grey;
819+ }
820+
821+ HPEN pen = CreatePen(PS_INSIDEFRAME, 0, RGB(0, 0, 0));
822+
823+ HGDIOBJ old_pen = SelectObject(item->hdc, pen);
824+ HGDIOBJ old_brush = SelectObject(item->hdc, defaultbrush);
825+
826+ RoundRect(item->hdc, item->rc.left, item->rc.top, item->rc.right, item->rc.bottom, 7, 7);
827+
828+ SelectObject(item->hdc, old_pen);
829+ SelectObject(item->hdc, old_brush);
830+ DeleteObject(pen);
831+
832+ return CDRF_DODEFAULT;
833+ }
834+
835+ return CDRF_DODEFAULT;
836+}
837+
838+// *************************************************************************
772839 // * CreateGradientBrush *
773840 // *************************************************************************
774841 HBRUSH EQ_App::CreateGradientBrush(COLORREF top, COLORREF bottom, LPNMCUSTOMDRAW item)
--- Equity10/EQ_App.h (revision 53)
+++ Equity10/EQ_App.h (revision 54)
@@ -153,7 +153,7 @@
153153
154154 // Toggle Button Yellow Green/White
155155 bool Custom_Button_Toggle(LPNMCUSTOMDRAW item,bool Toggle);
156-
156+ bool Custom_GreyGreen_Toggle(LPNMCUSTOMDRAW item, bool Toggle);
157157 // Normal Button Red
158158 bool Custom_Button_Red(LPNMCUSTOMDRAW item);
159159
@@ -200,6 +200,7 @@
200200 HBRUSH BannerBrush;
201201 HBRUSH Brush_Blue;
202202 HBRUSH Brush_White;
203+ HBRUSH Brush_Grey;
203204 HBRUSH Brush_Green;
204205 HBRUSH Brush_But_Normal;
205206 HBRUSH Brush_But_Hover;
--- Equity10/Eq_Dialogs.cpp (revision 53)
+++ Equity10/Eq_Dialogs.cpp (revision 54)
@@ -1069,6 +1069,19 @@
10691069 {
10701070 return (LONG)App->AppBackground;
10711071 }
1072+
1073+ case WM_NOTIFY:
1074+ {
1075+ LPNMHDR some_item = (LPNMHDR)lParam;
1076+
1077+ if (some_item->idFrom == IDOK && some_item->code == NM_CUSTOMDRAW)
1078+ {
1079+ LPNMCUSTOMDRAW item = (LPNMCUSTOMDRAW)some_item;
1080+ App->Custom_Button_Normal(item);
1081+ return CDRF_DODEFAULT;
1082+ }
1083+ return CDRF_DODEFAULT;
1084+ }
10721085 case WM_COMMAND:
10731086 if (LOWORD(wParam) == IDOK)
10741087 {
@@ -1075,12 +1088,8 @@
10751088 char buff[256];
10761089 int result=0;
10771090 GetDlgItemText(hDlg,IDC_EDIT1,(LPTSTR)buff,256);
1078- // strcpy(App->CL_Dialogs->Chr_Float,buff);
1079- // App->CL_Dialogs->mFloat = atof(buff);
1080-
1091+
10811092 App->GDCL_Dialogs->Canceled = 0;
1082-
1083- App->CL_Dialogs->Active_DlgFloat = 0;
10841093 EndDialog(hDlg, LOWORD(wParam));
10851094 return TRUE;
10861095 }
@@ -1980,6 +1989,20 @@
19801989 {
19811990 return (LONG)App->AppBackground;
19821991 }
1992+
1993+ case WM_NOTIFY:
1994+ {
1995+ LPNMHDR some_item = (LPNMHDR)lParam;
1996+
1997+ if (some_item->idFrom == IDOK && some_item->code == NM_CUSTOMDRAW)
1998+ {
1999+ LPNMCUSTOMDRAW item = (LPNMCUSTOMDRAW)some_item;
2000+ App->Custom_GreyGreen_Toggle(item, bool(IsWindowEnabled(GetDlgItem(hDlg, IDOK))));
2001+ return CDRF_DODEFAULT;
2002+ }
2003+ return CDRF_DODEFAULT;
2004+ }
2005+
19832006 case WM_COMMAND:
19842007 if (LOWORD(wParam) == IDOK)
19852008 {
--- Equity10/VersionNo2.h (revision 53)
+++ Equity10/VersionNo2.h (revision 54)
@@ -39,21 +39,21 @@
3939 #ifndef _VERSIONNO__H_
4040 #define _VERSIONNO__H_
4141
42-#define VERSION_FULL 1.18.212.37
42+#define VERSION_FULL 1.18.212.46
4343
4444 #define VERSION_BASEYEAR 2019
4545 #define VERSION_DATE "2019-08-01"
46-#define VERSION_TIME "20:28:39"
46+#define VERSION_TIME "22:15:38"
4747
4848 #define VERSION_MAJOR 1
4949 #define VERSION_MINOR 18
5050 #define VERSION_BUILDNO 212
51-#define VERSION_EXTEND 37
51+#define VERSION_EXTEND 46
5252
53-#define VERSION_FILE 1,18,212,37
54-#define VERSION_PRODUCT 1,18,212,44
55-#define VERSION_FILESTR "1,18,212,37\0"
56-#define VERSION_PRODUCTSTR "1,18,212,44\0"
53+#define VERSION_FILE 1,18,212,46
54+#define VERSION_PRODUCT 1,18,212,53
55+#define VERSION_FILESTR "1,18,212,46\0"
56+#define VERSION_PRODUCTSTR "1,18,212,53\0"
5757 #define VERSION_EVERSION "0.3.2.1\0"
5858
5959 #endif
\ No newline at end of file
Show on old repository browser