Browse Source

repair screenshot tool

main
Hendrik Langer 6 years ago
parent
commit
e35ae9d5a1
  1. BIN
      windows-snapshot-tool/bin/freeze.exe
  2. 27
      windows-snapshot-tool/src/main.cpp

BIN
windows-snapshot-tool/bin/freeze.exe

Binary file not shown.

27
windows-snapshot-tool/src/main.cpp

@ -30,19 +30,6 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
LPSTR lpszArgument,
int nCmdShow)
{
// Do screenshot from cmdline
LPWSTR *szArgList;
int argCount;
szArgList = CommandLineToArgvW(GetCommandLine(), &argCount);
if (szArgList != NULL && argCount >= 1) {
if (wcscmp(L"single", szArgList[1])==0) {
doScreenshot();
LocalFree(szArgList);
return 0;
}
}
LocalFree(szArgList);
// kill other already running instances
HWND existingApp = FindWindow(0, szClassName);
if (existingApp)
@ -89,6 +76,20 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
hThisInstance, /* Program Instance handler */
NULL /* No Window Creation data */
);
// Do screenshot from cmdline
LPWSTR *szArgList;
int argCount;
szArgList = CommandLineToArgvW(GetCommandLine(), &argCount);
if (szArgList != NULL && argCount >= 2) {
if (wcscmp(L"single", szArgList[1])==0) {
doScreenshot();
LocalFree(szArgList);
return 0;
}
}
LocalFree(szArgList);
/*Initialize the NOTIFYICONDATA structure only once*/
InitNotifyIconData();

Loading…
Cancel
Save