关于ActiveSkin 的有关问题
发布时间:2011-06-29 20:33:29 文章来源:www.iduyao.cn 采编人员:星星草
关于ActiveSkin 的问题
学习使用activeskin 遇到问题
第一步:在msdn下载的破解版跟vc安装在同一个文件夹后
随便建了个MFC对话框
按照百度的教程说的 先在在stdafx.h 添加#include <atlbase.h>
#import "actskn43.ocx" no_implementation raw_interfaces_only raw_native_types
using namespace ACTIVESKINLib;
这三行代码,完事后代码如下~(其他的都没修改)~~~
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__A489C230_38C8_477A_9329_46AF22FC4655__INCLUDED_)
#define AFX_STDAFX_H__A489C230_38C8_477A_9329_46AF22FC4655__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include <atlbase.h>
#import "actskn43.ocx" no_implementation raw_interfaces_only raw_native_types
using namespace ACTIVESKINLib;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__A489C230_38C8_477A_9329_46AF22FC4655__INCLUDED_)
第二部:在对话框的.cpp文件中以下加代码
CComQIPtr<ISkin> m_pSkin=GetDlgItem(IDC_SKIN)->GetControlUnknown();//m_pSkin是应用程序全局量。
m_pSkin->LoadSkin(L"BlackSea");//如果ActiveSkin控件中已有皮肤,此句可省略。
m_pSkin->ApplySkin((int)m_hWnd);
完事代码如下(其他的都没修改)
// skin2Dlg.cpp : implementation file
//
#include "stdafx.h"
#include "skin2.h"
#include "skin2Dlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
CComQIPtr<ISkin> m_pSkin=GetDlgItem(IDC_SKIN)->GetControlUnknown();//m_pSkin是应用程序全局量。
m_pSkin->LoadSkin(L"BlackSea");//如果ActiveSkin控件中已有皮肤,此句可省略。
m_pSkin->ApplySkin((int)m_hWnd);
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSkin2Dlg dialog
CSkin2Dlg::CSkin2Dlg(CWnd* pParent /*=NULL*/)
: CDialog(CSkin2Dlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CSkin2Dlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。
其他相似内容:
-
pb里关于数据窗口继承的问题
我的pb里设了一个母数据窗口,规定了样式,颜色,怎么让其他数据窗口都继承这个母dw,不用重复设颜色,样式呢
...
-
如何制作PB中查找的窗口,可以变透明的,而且还始终在最上面的窗口?
如何制作PB中查找的窗口,可以变透明的,而且还始终在最上面的窗口?
-...
-
powerbuilder 控件句柄转换,求教!!
问题:
比如我通过handle取得了一个button的句柄。
那么我能否根据这个句柄的值,又反操作还原这...
-
TAB控件能不能设置成不是3D的?
就类似于多行编辑控件的Border设置为false,变成平面的效果。找不到在哪里设置
------解决方案-----...
-
???新增按钮的问题
设置一个window窗口有个“新增”按钮,如何做出点击新增按钮,编号(varchar2类型)自动+1,点一下变成2,然后录完信息,再打开...
-
如何用回车键enter获得焦点
一个数据录入窗口,如何输完一个数据,按回车键跳到下一个要输入数据的地方 就和tab一样
------解决方案...
-
ole控件 Microsoft Web Browser
我用Microsoft Web Browser这个控件写了一个浏览器 但是不能运行脚本 对于那些需要在本地运行...
-
PB如何做透明的文本
我现在工作空间,应用程序,窗口都创建好了。也加了文本“用户名”,从网上看了要创建可视用户对象,粘贴了代码。但...
-
mdi窗口的sheet从normal变为max时闪烁
我的mdi的sheet默认打开后最大化,在sheet的resize事件中构造着把所有控件按比例伸缩,但每次...
-
如何使getfileopenname函数打开的窗口居中?
如何使getfileopenname函数打开的窗口居中?谢谢
------解决方案--------------------
...