stdafx.cpp

来自「wince下交警执法程序源码,使用evc编写」· C++ 代码 · 共 36 行

CPP
36
字号
// stdafx.cpp : source file that includes just the standard includes
//	TrafficExecLaw.pch will be the pre-compiled header
//	stdafx.obj will contain the pre-compiled type information

#include "stdafx.h"
#include "TrafficExecLaw.h"

extern CTrafficExecLawApp theApp;

void WinExec(const TCHAR *lpFile,const TCHAR *lpParams)
{
   SHELLEXECUTEINFO exeInfo;
   memset(&exeInfo,0,sizeof(SHELLEXECUTEINFO));
   
    exeInfo.cbSize =sizeof(SHELLEXECUTEINFO);
    exeInfo.fMask=SEE_MASK_NOCLOSEPROCESS;
   //exeInfo.hwnd;
    exeInfo.lpVerb=L"open";
    exeInfo.lpFile=lpFile;
    exeInfo.lpParameters=lpParams;
    exeInfo.lpDirectory=theApp.tcModuleFilePath;
    exeInfo.nShow=SW_SHOWMAXIMIZED;
    exeInfo.hInstApp=theApp.m_hInstance;
   
    ShellExecuteEx(&exeInfo);
}

char * WcharsToChars(const WCHAR *pSr)
{
	static char cChars[128];
    if(::WideCharToMultiByte (CP_OEMCP,0,pSr,wcslen(pSr),cChars,128,0,0)>0)
		return cChars;

	return NULL;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?