乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 23|回复: 1

如何在图形属性扩展对话框上增加自己的表头?

[复制链接]

7

主题

20

帖子

1

银币

初来乍到

Rank: 1

铜币
48
发表于 2003-10-4 15:19:00 | 显示全部楼层 |阅读模式
在ObjectArxSDK示例中,有一个在选项扩展对话框上增加自己对话框的例子,哪位高手知道如何在图形属性扩展对话框上增加自己的表头?
关键就是如何获得图形属性扩展对话框的名称。例选项扩展对话框的名称是"OptionsDialog"。
For example:
extern "C" AcRx::AppRetCode acrxEntryPoint(
    AcRx::AppMsgCode msg, void* appId)
{
    switch (msg) {
    case AcRx::kInitAppMsg:
        acrxDynamicLinker->unlockApplication(appId);
        acrxDynamicLinker->registerAppMDIAware(appId);
        initApp();
        break;
    case AcRx::kUnloadAppMsg:
        unloadApp();
        break;
    case AcRx::kInitDialogMsg:
    // A dialog is initializing that we are interested in adding
    // tabs to.
        addMyTabs((CAdUiTabExtensionManager*)pkt);
        break;
    default:
        break;
    }
    return AcRx::kRetOK;
}
void initApp()
{
    InitMFC();
    // Do other initialization tasks here.
    acedRegCmds->addCommand(
        "MYARXAPP",
        "MYARXAPP",
        "MYARXAPP",
        ACRX_CMD_MODAL,
        &MyArxAppCreate);
    // Here is where we register the fact that we want to add
    // a tab to the Options dialog.
    acedRegisterExtendedTab("MYARXAPP.ARX", "OptionsDialog");
}
// CMyTab1 is subclassed from CAcUiTabExtension.
static CMyTab1* pTab1;
void addMyTabs(CAdUiTabExtensionManager* pXtabManager)
{
    // Allocate an extended tab if it has not been done already
    // and add it through the CAdUiTabExtensionManager.
    pTab1 = new CMyTab1;
    pXtabManager->AddTab(_hdllInstance, IDD_TAB1,
        "My Tab1", pTab1);
    // If the main dialog is resizable, add your control
    // resizing directives here.
    pTab1->StretchControlXY(IDC_EDIT1, 100, 100);
}
Then for the CMyTab1 class implementation:
void CMyTab1:ostNcDestroy()
// Override to delete added tab.
{
    delete pTab1;
    pTab1 = NULL;
    CAcUiTabExtension:ostNcDestroy();
}
回复

使用道具 举报

2

主题

33

帖子

1

银币

初来乍到

Rank: 1

铜币
41
发表于 2003-11-4 21:21:00 | 显示全部楼层
不错
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-2-4 14:55 , Processed in 0.230873 second(s), 56 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表