关于Xtreme ToolkitPro 使用的一些问题

aCracker 2014-09-20 10:28:17
1、使用Xtreme ToolkitPro向导建立的MFC有什么不一样吗?我看编译出来的界面都一样的呀。
2、我看Xtreme ToolkitPro的示例工程,不知道这个示例是不是MFC,反正MFC的单文档,多文档,对话框,都不对。我把代码贴出来,大家看看是什么类型的。应该怎么建立这种工程。
头文件
// Controls.h : main header file for the CONTROLS application
//

#if !defined(AFX_CONTROLS_H__D49F90D2_7DED_447E_941B_B556B714C9D2__INCLUDED_)
#define AFX_CONTROLS_H__D49F90D2_7DED_447E_941B_B556B714C9D2__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h" // main symbols

/////////////////////////////////////////////////////////////////////////////
// CControlsApp:
// See Controls.cpp for the implementation of this class
//

class CControlsApp : public CWinApp
{
public:
CControlsApp();

// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CControlsApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL

// Implementation

//{{AFX_MSG(CControlsApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CONTROLS_H__D49F90D2_7DED_447E_941B_B556B714C9D2__INCLUDED_)


CPP
// Controls.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "Controls.h"
#include "PageButton.h"
#include "PageEdit.h"
#include "PageComboBox.h"
#include "PageScrollBar.h"
#include "PageProgressBar.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CControlsApp

BEGIN_MESSAGE_MAP(CControlsApp, CWinApp)
//{{AFX_MSG_MAP(CControlsApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CControlsApp construction

CControlsApp::CControlsApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
XTPPaintManager()->SetTheme(xtpThemeOffice2003);
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CControlsApp object

CControlsApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CControlsApp initialization

BOOL CControlsApp::InitInstance()
{
AfxEnableControlContainer();
CXTPWinDwmWrapper().SetProcessDPIAware();

AfxOleInit();

// 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.

#if _MSC_VER <= 1200 // MFC 6.0 or earlier
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
#endif // MFC 6.0 or earlier

CXTPResizePropertySheet dlg(AFX_IDS_APP_TITLE, 0, 0, xtpResizeNoVertical);
dlg.m_psh.dwFlags |= PSH_NOAPPLYNOW;


CPageButton pageButtons;
dlg.AddPage(&pageButtons);

CPageEdit pageEdit;
dlg.AddPage(&pageEdit);

CPageComboBox pageComboBox;
dlg.AddPage(&pageComboBox);

CPageProgressBar pageProgressBar;
dlg.AddPage(&pageProgressBar);

CPageScrollBar pageScrollBar;
dlg.AddPage(&pageScrollBar);



m_pMainWnd = &dlg;
int nResponse = (int)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;
}
...全文
200 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
aCracker 2014-09-28
  • 打赏
  • 举报
回复
引用 4 楼 schlafenhamster 的回复:
vc6 有(classwizard), vs 反倒没有了?
我的意思是创建 我给出的那样的代码 有没有这样的wizard
schlafenhamster 2014-09-22
  • 打赏
  • 举报
回复
vc6 有(classwizard), vs 反倒没有了?
aCracker 2014-09-22
  • 打赏
  • 举报
回复
引用 1 楼 schlafenhamster 的回复:
"应该怎么建立这种工程" 创建工程是向导的事, 你可以 做一个 创建这种工程的向导.
VS 没有提供创建这样子代码的 向导?
schlafenhamster 2014-09-21
  • 打赏
  • 举报
回复
"应该怎么建立这种工程" 创建工程是向导的事, 你可以 做一个 创建这种工程的向导.

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧