void CFilePosterDlg::OnButton1() { char pzBuf[512]; GetTempPath(512,pzBuf); GString strTempFile ( pzBuf ); if ( strTempFile.GetAt(strTempFile.GetLength() - 1) != '\\') strTempFile << "\\"; strTempFile << "FilePoster.Notes.txt"; UnpackNotes(strTempFile); GString strCommand("notepad.exe "); strCommand << strTempFile; PROCESS_INFORMATION pInfo; STARTUPINFO sInfo; sInfo.cb = sizeof(STARTUPINFO); sInfo.lpReserved = NULL; sInfo.lpReserved2 = NULL; sInfo.cbReserved2 = 0; sInfo.lpDesktop = NULL; sInfo.lpTitle = NULL; sInfo.dwFlags = 0; sInfo.dwX = 0; sInfo.dwY = 0; sInfo.dwFillAttribute = 0; sInfo.wShowWindow = SW_SHOW; CreateProcess(NULL, (char *)(const char *)strCommand, NULL, NULL, FALSE, 0,NULL, NULL, &sInfo, &pInfo); }