-
Notifications
You must be signed in to change notification settings - Fork 1
/
derbar.rc
210 lines (175 loc) · 8.11 KB
/
derbar.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
//****************************************************************************
// Copyright (c) 2009-2022 Daniel D Miller
// DerBar.exe - a system-information monitoring utility
//
// Written by: Danial D Miller
//****************************************************************************
// Interesting notes about this file:
//
// > SS_NOTIFY and "Static" controls
// If SS_NOTIFY is not specified in the control styles,
// you cannot attach tooltips to the control.
//
//****************************************************************************
//lint -e129 declaration expected, identifier 'LTEXT' ignored - this was in my .RC file
#include <windows.h>
#include "resource.h"
#include "version.h"
IDI_MAINICON ICON tmap.ico
IDC_LEDBMPS BITMAP "leds.tiny.bmp"
// IDM_POPMENU MENU DISCARDABLE
IDM_POPMENU MENU
BEGIN
POPUP "DerMenu"
BEGIN
MENUITEM "Toggle Title Bar", IDM_TOGGLE_TBAR
MENUITEM "Relocate DerBar", IDM_RELOCATE
MENUITEM "Options", IDM_OPTIONS
MENUITEM "Interfaces", IDM_IFACES
MENUITEM SEPARATOR
MENUITEM "Select new icon color", IDM_SET_COLOR
MENUITEM "Set icon colors now", IDM_SET_NOW
MENUITEM SEPARATOR
MENUITEM "About DerBar", IDM_ABOUT
MENUITEM "Exit", IDM_APP_EXIT
END
END
//*******************************************************************
// main dialog
// Using WS_EX_TOOLWINDOW, instead of WS_EX_APPWINDOW,
// removes the application bar from the Toolbar.
//*******************************************************************
#define Y0 1
#define DY 11
IDD_MAIN DIALOGEX 0, 200, 449, DY
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
// EXSTYLE WS_EX_APPWINDOW
EXSTYLE WS_EX_TOOLWINDOW
CAPTION "DerBar"
FONT 11, "Times New Roman"
BEGIN
CTEXT "DerBar", IDC_DERBAR, 0, Y0, 34, 9, SS_SUNKEN //lint !e2 Unclosed Quote
LTEXT " ", IDC_STATIC, 36, 0, 2, DY, SS_SUNKEN //lint !e2 Unclosed Quote
LTEXT "Mem:", IDS_MEMORY, 40, Y0, 20, 9,SS_NOTIFY
LTEXT "Free", IDS_FREEMEM, 64, Y0, 16, 9,SS_NOTIFY
CTEXT " ", IDC_FREEMEM, 80, Y0, 35, 9, SS_SUNKEN | SS_NOTIFY
LTEXT "Total", IDS_TOTALMEM, 118, Y0, 20, 9,SS_NOTIFY
CTEXT " ", IDC_TOTALMEM, 138, Y0, 35, 9, SS_SUNKEN | SS_NOTIFY
LTEXT " ", IDC_STATIC, 176, 0, 2, DY, SS_SUNKEN
LTEXT "Uptime:", IDS_UPTIME, 181, Y0, 25, 9,SS_NOTIFY
CTEXT " ", IDC_UPTIME, 206, Y0, 60, 9, SS_SUNKEN | SS_NOTIFY
LTEXT " ", IDC_STATIC, 268, 0, 2, DY, SS_SUNKEN
LTEXT "RX:", IDS_RXBYTES, 273, Y0, 12, 9,SS_NOTIFY
CTEXT " ", IDC_RXBYTES, 286, Y0, 30, 9, SS_SUNKEN | SS_NOTIFY
LTEXT "TX:", IDS_TXBYTES, 321, Y0, 12, 9,SS_NOTIFY
CTEXT " ", IDC_TXBYTES, 336, Y0, 30, 9, SS_SUNKEN | SS_NOTIFY
LTEXT " ", IDC_STATIC, 368, 0, 2, DY, SS_SUNKEN
LTEXT "CPU:", IDS_CPUTIME, 373, Y0, 18, 9,SS_NOTIFY
CTEXT " ", IDC_CPUTIME, 393, Y0, 15, 9, SS_SUNKEN | SS_NOTIFY
LTEXT " ", IDC_STATIC, 410, 0, 2, DY, SS_SUNKEN
CTEXT "c", IDC_KBD_CAPS, 414, Y0, 9, 9, SS_SUNKEN | SS_NOTIFY
CTEXT "n", IDC_KBD_NUM , 426, Y0, 9, 9, SS_SUNKEN | SS_NOTIFY
CTEXT "s", IDC_KBD_SCRL, 438, Y0, 9, 9, SS_SUNKEN | SS_NOTIFY
END
//*******************************************************************
// options dialog
//*******************************************************************
// #define OPT_DX 160
#define OPT_DX 160
#define OPT_DONE_DX 70
#define OPT_DONE_X ((OPT_DX - OPT_DONE_DX) / 2)
IDD_OPTIONS DIALOGEX 300, 200, OPT_DX, 116
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "DerBar Options"
FONT 10, "Times New Roman"
BEGIN
LTEXT "Info Fgnd (0XBBGGRR): ",IDS_CLR_FGND, 5, 8,78,10,SS_NOTIFY
EDITTEXT IDC_EDIT_FGND, 85, 8,37,10,SS_NOTIFY
PUSHBUTTON "Browse",IDC_CLR_FGND, 126, 8,30,10
LTEXT "Info Bgnd (0XBBGGRR): ",IDS_CLR_BGND, 5,22,78,10,SS_NOTIFY
EDITTEXT IDC_EDIT_BGND, 85,22,37,10,SS_NOTIFY
PUSHBUTTON "Browse",IDC_CLR_BGND, 126,22,30,10
CONTROL "Keep On Top",IDM_ONTOP,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP, 5,36,140,10
CONTROL "Use Login for Uptime",IDM_LOGIN_UPTIME,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP, 5,46,140,10
CONTROL "Show seconds for Uptime",IDM_LOGIN_SECONDS,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP, 5,56,140,10
CONTROL "Enable WinMsgs (debug)",IDM_WINMSGS,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP, 5,66,140,10
LTEXT "Min Free Memory (MB): ",IDS_MIN_FREEMEM, 5,81, 77,10,SS_NOTIFY
CTEXT "", IDC_MIN_FREEMEM, 85,80, 37,10,SS_NOTIFY | SS_SUNKEN
PUSHBUTTON "Reset", IDC_CLR_MIN_FMEM,126,80,30,10
DEFPUSHBUTTON "Accept Changes", IDOK, OPT_DONE_X,97,OPT_DONE_DX,14
END
//***************************************************************************
// Network-interface listview dialog
//***************************************************************************
#define LV_DX 400
#define LV_DY 100
IDD_LV_IFACES DIALOGEX 200, 200, LV_DX,LV_DY
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
EXSTYLE WS_EX_APPWINDOW
CAPTION "Network Interfaces"
FONT 10, "Times New Roman"
// FONT 12, "MS Sans Serif"
BEGIN
// PUSHBUTTON "Test", IDM_APP_TEST, 300,TOP_Y, 50,14
CONTROL "List1", IDC_LV_IFACES,"SysListView32",
LVS_REPORT | LVS_EDITLABELS | WS_BORDER | WS_TABSTOP | LVS_SHAREIMAGELISTS,
0,0,LV_DX,LV_DY
END
//*******************************************************************
IDD_ABOUT DIALOG DISCARDABLE 200, 200, 180, 90
// STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "About DerBar"
// FONT 8, "MS Sans Serif"
FONT 10, "Times New Roman"
BEGIN
ICON IDI_MAINICON,IDC_STATIC,9,12
LTEXT "DerBar System Monitor",IDC_STATIC, 36,15, 75,12
LTEXT VerNum,IDC_VERNUM, 111,15, 50,12
LTEXT "Copyright (c) 2008-2024",IDC_STATIC, 36,28,100,12
LTEXT "Daniel D Miller",IDC_STATIC, 36,41,100,12
// PUSHBUTTON "home.comcast.net/~derelict",IDC_WEBLINK, 36,54,100,12
LTEXT "http://derelllicht.42web.io/DerBar.html",IDC_WEBLINK, 36,54,140,12
DEFPUSHBUTTON "Close",IDOK,36,70,100,14
END
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "DerBar - Windows performance monitor."
VALUE "CompanyName", "Cathartes Aura"
VALUE "FileDescription", "DerBar Windows performance monitor"
VALUE "FileVersion", VerNum
VALUE "InternalName", "DerBar"
VALUE "LegalCopyright", "Copyright © 2008-2024"
VALUE "OriginalFilename", "DerBar.exe"
VALUE "ProductName", "DerBar Windows performance monitor"
VALUE "ProductVersion", VerNum
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END