• R/O
  • SSH
  • HTTPS

vima19: Commit


Commit MetaInfo

Revision568 (tree)
Time2022-03-13 20:24:47
Authorhgtterry

Log Message

Equity_ME 130322 Top Bar Class

Change Summary

Incremental Difference

--- Equity_ME/Equity_ME/Equity_ME.cpp (revision 567)
+++ Equity_ME/Equity_ME/Equity_ME.cpp (revision 568)
@@ -57,6 +57,8 @@
5757
5858 App->SetMainWin_Centre();
5959
60+ App->CL_TopBar->Start_TopBar();
61+
6062 SetTimer(App->MainHwnd, 1, 1, NULL);
6163
6264 HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_EQUITY_ME));
--- Equity_ME/Equity_ME/ME_TopBar.cpp (revision 567)
+++ Equity_ME/Equity_ME/ME_TopBar.cpp (revision 568)
@@ -23,11 +23,13 @@
2323
2424 #include "stdafx.h"
2525 #include "ME_App.h"
26+#include "resource.h"
2627 #include "ME_TopBar.h"
2728
2829
2930 ME_TopBar::ME_TopBar()
3031 {
32+ TabsHwnd = nullptr;
3133 }
3234
3335
@@ -34,3 +36,146 @@
3436 ME_TopBar::~ME_TopBar()
3537 {
3638 }
39+
40+// *************************************************************************
41+// * Start_TopBar_Globals Terry *
42+// *************************************************************************
43+bool ME_TopBar::Start_TopBar()
44+{
45+ CreateDialog(App->hInst, (LPCTSTR)IDD_TOPBAR, App->Fdlg, (DLGPROC)TopBar_Proc);
46+ //Init_Bmps_Globals();
47+ return 1;
48+}
49+
50+// *************************************************************************
51+// * TopBar_Globals_Proc Terry *
52+// *************************************************************************
53+LRESULT CALLBACK ME_TopBar::TopBar_Proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
54+{
55+
56+ switch (message)
57+ {
58+ case WM_INITDIALOG:
59+ {
60+ App->CL_TopBar->TabsHwnd = hDlg;
61+
62+ /*App->SBC_TopTabs->Start_Tabs_Headers();
63+ App->SBC_TopTabs->Start_Camera_TB();
64+ App->SBC_TopTabs->Start_Dimensions_TB();
65+ App->SBC_TopTabs->Start_Physics_TB();
66+ App->SBC_TopTabs->Start_Editors_TB();
67+ App->SBC_TopTabs->Start_Files_TB();*/
68+
69+ return TRUE;
70+ }
71+ case WM_CTLCOLORSTATIC:
72+ {
73+ return FALSE;
74+ }
75+
76+ case WM_CTLCOLORDLG:
77+ {
78+ return (LONG)App->AppBackground;
79+ }
80+
81+ case WM_NOTIFY:
82+ {
83+ LPNMHDR some_item = (LPNMHDR)lParam;
84+
85+ /*if (some_item->idFrom == IDC_TBSHOWGRID && some_item->code == NM_CUSTOMDRAW)
86+ {
87+ LPNMCUSTOMDRAW item = (LPNMCUSTOMDRAW)some_item;
88+ App->Custom_Button_Toggle(item, App->SBC_TopTabs->Toggle_Grid_Flag);
89+ return CDRF_DODEFAULT;
90+ }
91+
92+ if (some_item->idFrom == IDC_TBSHOWHAIR && some_item->code == NM_CUSTOMDRAW)
93+ {
94+ LPNMCUSTOMDRAW item = (LPNMCUSTOMDRAW)some_item;
95+ App->Custom_Button_Toggle(item, App->SBC_TopTabs->Toggle_Hair_Flag);
96+ return CDRF_DODEFAULT;
97+ }*/
98+
99+ return CDRF_DODEFAULT;
100+ }
101+
102+ case WM_COMMAND:
103+
104+ //-------------------------------------------------------- Show Grid
105+ //if (LOWORD(wParam) == IDC_TBSHOWGRID)
106+ {
107+ /*HWND Temp = GetDlgItem(hDlg, IDC_TBSHOWGRID);
108+
109+ if (App->Cl_Grid->ShowGridFlag == 1)
110+ {
111+ App->Cl_Grid->Grid_SetVisible(0);
112+ App->Cl_Grid->ShowGridFlag = 0;
113+
114+ App->SBC_TopTabs->Toggle_Grid_Flag = 0;
115+
116+ SendMessage(Temp, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)(HANDLE)App->Hnd_GridOff_Bmp);
117+ }
118+ else
119+ {
120+ App->Cl_Grid->Grid_SetVisible(1);
121+ App->Cl_Grid->ShowGridFlag = 1;
122+
123+ App->SBC_TopTabs->Toggle_Grid_Flag = 1;
124+
125+ SendMessage(Temp, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)(HANDLE)App->Hnd_GridOn_Bmp);
126+
127+ }*/
128+ //return TRUE;
129+ }
130+
131+ //-------------------------------------------------------- Show Hair
132+ //if (LOWORD(wParam) == IDC_TBSHOWHAIR)
133+ {
134+ //HWND Temp = GetDlgItem(hDlg, IDC_TBSHOWHAIR);
135+
136+ /*if (App->Cl_Grid->ShowHair == 1)
137+ {
138+ App->Cl_Grid->ShowHair = 0;
139+ App->Cl_Grid->Hair_SetVisible(0);
140+
141+ App->SBC_TopTabs->Toggle_Hair_Flag = 0;
142+
143+ SendMessage(Temp, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)(HANDLE)App->Hnd_HairOff_Bmp);
144+ }
145+ else
146+ {
147+ App->Cl_Grid->ShowHair = 1;
148+ App->Cl_Grid->Hair_SetVisible(1);
149+
150+ App->SBC_TopTabs->Toggle_Hair_Flag = 1;
151+
152+ SendMessage(Temp, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)(HANDLE)App->Hnd_HairOn_Bmp);
153+ }*/
154+ //return TRUE;
155+ }
156+
157+ //-------------------------------------------------------- Show Info
158+ //if (LOWORD(wParam) == IDC_TBINFO)
159+ {
160+ /*if (App->CL_Vm_ImGui->Show_Model_Data == 1)
161+ {
162+ App->CL_Vm_ImGui->Show_Model_Data = 0;
163+ }
164+ else
165+ {
166+ App->CL_Vm_ImGui->Show_Model_Data = 1;
167+ }*/
168+ //return TRUE;
169+ }
170+
171+ if (LOWORD(wParam) == IDCANCEL)
172+ {
173+
174+ EndDialog(hDlg, LOWORD(wParam));
175+ return TRUE;
176+ }
177+
178+ break;
179+ }
180+ return FALSE;
181+}
--- Equity_ME/Equity_ME/ME_TopBar.h (revision 567)
+++ Equity_ME/Equity_ME/ME_TopBar.h (revision 568)
@@ -27,5 +27,13 @@
2727 public:
2828 ME_TopBar();
2929 ~ME_TopBar();
30+
31+ bool Start_TopBar();
32+
33+protected:
34+
35+ static LRESULT CALLBACK TopBar_Proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
36+
37+ HWND TabsHwnd;
3038 };
3139
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Show on old repository browser