![]() WaitForSingleObject( processInformation.hProcess, INFINITE ) ĬloseHandle( processInformation.hProcess ) ĬloseHandle( processInformation.hThread ) StartupInfo.wShowWindow = SW_SHOWMAXIMIZED īOOL result= CreateProcess(chromePath, targetURL, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &startupInfo, &processInformation) Memset(&startupInfo, 0, sizeof(startupInfo)) ![]() Memset(&processInformation, 0, sizeof(processInformation)) (otherwise the application may crash on Unicode builds) Important: targetURL *must be* a writable buffer, not a string literal Assuming that the path to chrome is inside the chromePath variable If(ShellExecute(NULL, "open", "", NULL, NULL, SW_SHOWMAXIMIZED) ![]() If you don't mind using the default browser (which, in my opinion, is the best option) instead of forcing the use of Chrome, you can simply open your URL with ShellExecute specifying that you want the window to be maximized: #include
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |