OLD | NEW |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include <Windows.h> | 8 #include <Windows.h> |
9 #include <tchar.h> | 9 #include <tchar.h> |
10 | 10 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hIns tance, NULL); | 131 CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hIns tance, NULL); |
132 | 132 |
133 if (!hWnd) | 133 if (!hWnd) |
134 { | 134 { |
135 return FALSE; | 135 return FALSE; |
136 } | 136 } |
137 | 137 |
138 char* argv[4096]; | 138 char* argv[4096]; |
139 int argc = 0; | 139 int argc = 0; |
140 TCHAR exename[1024], *next; | 140 TCHAR exename[1024], *next; |
141 int exenameLen = GetModuleFileName(NULL, exename, 1024); | 141 GetModuleFileName(NULL, exename, 1024); |
reed1
2013/03/21 13:14:24
same comment about (void)GetModuleFileName
bsalomon
2013/03/21 13:45:29
Done.
| |
142 argv[argc++] = tchar_to_utf8(exename); | 142 argv[argc++] = tchar_to_utf8(exename); |
143 TCHAR* arg = _tcstok_s(lpCmdLine, _T(" "), &next); | 143 TCHAR* arg = _tcstok_s(lpCmdLine, _T(" "), &next); |
144 while (arg != NULL) { | 144 while (arg != NULL) { |
145 argv[argc++] = tchar_to_utf8(arg); | 145 argv[argc++] = tchar_to_utf8(arg); |
146 arg = _tcstok_s(NULL, _T(" "), &next); | 146 arg = _tcstok_s(NULL, _T(" "), &next); |
147 } | 147 } |
148 | 148 |
149 gSkWind = create_sk_window(hWnd, argc, argv); | 149 gSkWind = create_sk_window(hWnd, argc, argv); |
150 for (int i = 0; i < argc; ++i) { | 150 for (int i = 0; i < argc; ++i) { |
151 free(argv[i]); | 151 free(argv[i]); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
196 case WM_COMMAND: | 196 case WM_COMMAND: |
197 if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) | 197 if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) |
198 { | 198 { |
199 EndDialog(hDlg, LOWORD(wParam)); | 199 EndDialog(hDlg, LOWORD(wParam)); |
200 return (INT_PTR)TRUE; | 200 return (INT_PTR)TRUE; |
201 } | 201 } |
202 break; | 202 break; |
203 } | 203 } |
204 return (INT_PTR)FALSE; | 204 return (INT_PTR)FALSE; |
205 } | 205 } |
OLD | NEW |