MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / RunPaint

Function RunPaint

sourcecommon/utils.cpp:1722–1751  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1720}
1721//---------------------------------------------------------------------------
1722bool RunPaint(String file, String * error)
1723{
1724 char str[MAX_PATH * 2];
1725 char szPaint[] = "mspaint.exe";
1726 char szPath[MAX_PATH];
1727
1728 // ������ paint
1729 if( SHGetFolderPath(NULL, CSIDL_SYSTEM, NULL, 0, szPath) != S_OK )
1730 return false;
1731 if( file.Length() > 0 )
1732 wsprintf(str, "%s\\%s \"%s\"", szPath, szPaint, file.c_str());
1733 else
1734 wsprintf(str, "%s\\%s", szPath, szPaint);
1735 if( ! RunProg(str, SW_MAXIMIZE) )
1736 {
1737 if( SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, 0, szPath) != S_OK )
1738 return false;
1739 if( file.Length() > 0 )
1740 wsprintf(str, "%s\\Accessories\\%s \"%s\"", szPath, szPaint, file.c_str());
1741 else
1742 wsprintf(str, "%s\\Accessories\\%s", szPath, szPaint);
1743 if( ! RunProg(str, SW_MAXIMIZE) )
1744 {
1745 if( error )
1746 *error = AnsiString().sprintf("������ ������� ��������� %s !\n(%s)", szPaint, str);
1747 return false;
1748 }
1749 }
1750 return true;
1751}
1752//---------------------------------------------------------------------------
1753bool __fastcall MySameText(String s1, String s2)
1754{

Callers

nothing calls this directly

Calls 1

RunProgFunction · 0.85

Tested by

no test coverage detected