回复 2楼 hahayezhe
额,对哦==
我把出现这个警告的过程说下:
在路径为d:/example1/SignalStrengthTest,如图所示:
图片附件: 游客没有浏览图片的权限,请
登录 或
注册
然后在cmd下出现了:
图片附件: 游客没有浏览图片的权限,请
登录 或
注册
点击忽略后:
图片附件: 游客没有浏览图片的权限,请
登录 或
注册
(正常的)
点击确定后:
图片附件: 游客没有浏览图片的权限,请
登录 或
注册
但是在上面对话框中所说的signalstrengthtest.cpp中,完全找不到60行和93行啊……
signalstrengthtest.cpp的代码如下:
#include "stdafx.h"
#include "SignalStrengthTest.h"
#include "SignalStrengthTestDlg.h"
#include "SkinMagicLib.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSignalStrengthTestApp
BEGIN_MESSAGE_MAP(CSignalStrengthTestApp, CWinApp)
//{{AFX_MSG_MAP(CSignalStrengthTestApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
//
DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSignalStrengthTestApp construction
CSignalStrengthTestApp::CSignalStrengthTestApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
// The one and only CSignalStrengthTestApp object
CSignalStrengthTestApp theApp;
// CSignalStrengthTestApp initialization
//进行程序的初始化以及对话框界面的显示工作
BOOL CSignalStrengthTestApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
//
of your final executable, you should remove from the following
//
the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls();
// Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic();
// Call this when linking to MFC statically
#endif
VERIFY(1 == InitSkinMagicLib(AfxGetInstanceHandle(), NULL, NULL, NULL));
VERIFY(1 == LoadSkinFile(".\\res\\corona.smf"));
////////////////////////////////////////////////////////////////////////////////
//for the command line;
double a_max,a_min;
LPWSTR *lpszArgv=NULL;
int nArgs=0;
lpszArgv = CommandLineToArgvW(GetCommandLineW(), &nArgs);//获取命令行参数并拆分命令行参数字符串
CString str;
a_max=atof(CString(lpszArgv[1]));
str.Format("%f",a_max); //将变量组装到字符串中
MessageBox(NULL,str,"消息框标题",MB_OK);
//"d:/example1/SignalStrengthTest.exe" "-help"
//LPWSTR *lpszArgv,则 lpszArgv[0] 就是 "E:/SoftWare/ProjCleaner.exe",lpszArgv[1] 就是 "-help"
////////////////////////////////////////////////////////////////////////////////
CSignalStrengthTestDlg dlg;//新建主对话框类型对象;
m_pMainWnd = &dlg;
VERIFY(1 == SetWindowSkin(m_pMainWnd->m_hWnd, "MainFrame"));
VERIFY(1 == SetDialogSkin("Dialog"));
int nResponse = dlg.DoModal();//进行模态对话框的显示
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
//
dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
//
dismissed with Cancel
}
// Since the dialog has been closed, return FALSE so that we exit the
//
application, rather than start the application's message pump.
return FALSE;
}