Skip to content

Commit 28dbea6

Browse files
author
leadedge
committed
Fixed command line for Message Box
1 parent e5841ad commit 28dbea6

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

SPOUTPANEL/SpoutPanel.exe

-512 Bytes
Binary file not shown.

SPOUTPANEL/SpoutPanel/src/main.cpp

+20-2
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@
102102
// 16.01.17 - Rebuild VS2012
103103
// 21.01.17 - include zero char in command line checks
104104
// 22.01.17 - rebuild VS2012 /MD to avoid virus false postive
105+
// 10.02.17 - Fixed command line for Message Box
106+
// - Version 2.20
105107
//
106108
#include <windows.h>
107109
#include <vector>
@@ -182,14 +184,16 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
182184
FILE* pCout; // should really be freed on exit
183185
AllocConsole();
184186
freopen_s(&pCout, "CONOUT$", "w", stdout);
185-
printf("SpoutPanel 2.19\n");
187+
printf("SpoutPanel 2.20\n");
186188
*/
187189

190+
188191
// Find the current active window to restore to the top when SpoutPanel quits
189192
hWnd = GetForegroundWindow();
190193

191194
// Check for arguments
192195
// printf("CmdLine [%s]\n", lpCmdLine);
196+
193197
UserMessage[0] = 0;
194198
bFileOpen = false;
195199
bFontOpen = false;
@@ -198,10 +202,15 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
198202

199203
argc = ParseCommandline();
200204
if( argc > 1) { // 0 = "SpoutPanel"
205+
206+
// printf("Argc = %d\n", argc);
207+
201208
hWnd = GetActiveWindow();
202209
EnableWindow(hWnd, FALSE);
203210
for( i=1; i <argc; i++ ) {
211+
204212
// printf("Arg[%d] = [%s]\n", i, argv[i]);
213+
205214
// Argument /DX9 or default
206215
if(strcmp(argv[i], "/DX9") == 0) {
207216
// printf("DX9 mode\n");
@@ -236,12 +245,21 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
236245
bFileOpen = false;
237246
bFontOpen = false;
238247
bMemoryMode = false;
248+
if(lpCmdLine && lpCmdLine[0]) {
249+
// No listed args, but a command line so send a user message
250+
// printf("text arg [%s]\n", lpCmdLine);
251+
strcpy_s(UserMessage, 512, (char *)lpCmdLine); // Message to be shown instead of sender list
252+
}
253+
else {
254+
// printf("No text arg\n");
255+
UserMessage[0] = 0; // make sure this is not an un-initialized string
256+
}
239257
}
240258
}
241259
EnableWindow(hWnd, TRUE);
242260
}
243261
else {
244-
// printf("Argc is zero\n");
262+
printf("Argc is zero\n");
245263
if(lpCmdLine && lpCmdLine[0]) {
246264
// No listed args, but a command line so send a user message
247265
// printf("text arg [%s]\n", lpCmdLine);

SPOUTPANEL/SpoutPanel/src/resource.rc

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ FONT 8, "Ms Shell Dlg"
2323
PUSHBUTTON "Cancel", IDCANCEL, 91, 105, 32, 14, 0, WS_EX_LEFT
2424
LISTBOX IDC_LIST1, 13, 18, 145, 72, WS_TABSTOP | WS_HSCROLL | WS_VSCROLL | LBS_NOINTEGRALHEIGHT | LBS_NOTIFY, WS_EX_LEFT
2525
PUSHBUTTON "", IDC_INFO, 13, 91, 145, 13, BS_FLAT, WS_EX_LEFT
26-
LTEXT "Vers 2.19", IDC_VERS, 13, 108, 30, 13, SS_LEFT, WS_EX_LEFT // change version here
26+
LTEXT "Vers 2.20", IDC_VERS, 13, 108, 30, 13, SS_LEFT, WS_EX_LEFT // change version here
2727

2828
}
2929

@@ -41,8 +41,8 @@ FONT 8, "MS Shell Dlg", 0, 0, 1
4141
}
4242

4343
VS_VERSION_INFO VERSIONINFO
44-
FILEVERSION 2,00,1,9 // change version here
45-
PRODUCTVERSION 2,00,1,9 // change version here
44+
FILEVERSION 2,00,2,0 // change version here
45+
PRODUCTVERSION 2,00,2,0 // change version here
4646
FILEFLAGSMASK 0x3fL
4747
FILEFLAGS 0x1l
4848
FILEOS 0x10004L
@@ -55,12 +55,12 @@ VS_VERSION_INFO VERSIONINFO
5555
BEGIN
5656
VALUE "CompanyName", "Leading Edge Pty Ltd\r\n\r\[email protected]\0"
5757
VALUE "FileDescription", "SpoutPanel\0"
58-
VALUE "FileVersion", "2.019\0" // change version here
58+
VALUE "FileVersion", "2.020\0" // change version here
5959
VALUE "InternalName", "SpoutPanel\0"
6060
VALUE "LegalCopyright", "Copyright \251 Leading Edge Pty Ltd 2015-2017\0"
6161
VALUE "OriginalFilename", "SpoutPanel.exe\0"
6262
VALUE "ProductName", "SpoutPanel\0"
63-
VALUE "ProductVersion", "2.019\0" // change version here
63+
VALUE "ProductVersion", "2.020\0" // change version here
6464
VALUE "Comments", ""
6565
END
6666
END

0 commit comments

Comments
 (0)