炫彩界面库论坛

 找回密码
 加入我们

QQ登录

只需一步,快速开始

查看: 2943|回复: 2

XMessageBox

[复制链接]

该用户从未签到

发表于 2013-1-9 22:56:58 | 显示全部楼层 |阅读模式

BOOL CMaindlg::Create(void){        HXMLRES hRes =  XXmlRes_Load(_T("res\\resource.res"));        if (NULL != hRes)        {                m_hWindow = XC_LoadXML_Window(_T("res\\layout.xml"),hRes);                XC_LoadXML_Style(m_hWindow,_T("res\\style.css"),hRes);        }        GethWnd(hRes);        SetEvent();
        XWnd_ShowWindow(m_hWindow,SW_SHOW);        XXmlRes_Destroy(hRes);
        return TRUE;}

void CMaindlg::GethWnd(HXMLRES hRes){        m_btnok = XWnd_GetEle(m_hWindow,XXmlRes_FindId(hRes,_T("ID_BTN_OK")));        m_edtinput = XWnd_GetEle(m_hWindow,XXmlRes_FindId(hRes,_T("ID_EDT_INPUT")));
}

void CMaindlg::SetEvent(void){        XCGUI_RegEleEvent(m_btnok,XE_BNCLICK,&CMaindlg::EventBtnClick);}

BOOL CMaindlg::EventBtnClick(HELE hEle,HELE hEventEle){        XMessageBox(hEle,L"你点击了按钮",L"提示",XMB_OK | XMB_CANCEL);        return TRUE;}


main 函数:
        XInitXCGUI();
        CMaindlg  MyWnd;        if(MyWnd.Create())        {                XRunXCGUI();        }
点击按钮触发XE_BNCLICK 事件之后 会出现以下错误....

Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.  This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.


该用户从未签到

 楼主| 发表于 2013-1-9 22:58:42 | 显示全部楼层
环境 VS2010 + win7x64
  • TA的每日心情
    开心
    2022-1-9 18:18
  • 发表于 2013-1-10 11:12:07 | 显示全部楼层
    自己调试下源码看看!你这问题在别人机器上不好测试!
    您需要登录后才可以回帖 登录 | 加入我们

    本版积分规则

    QQ|Archiver|手机版|小黑屋|炫彩界面库 ( 鄂ICP备2023014763号-1 )

    GMT+8, 2024-4-25 17:46 , Processed in 0.066258 second(s), 18 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表