mirror of
https://github.com/duilib/duilib.git
synced 2026-10-17 06:01:08 +08:00
467cab8148
Duilib暂不会有新特性增加,但已经准备一段时间修改代码目录管理结构,重构Demo 闲置半年多未更新一方面忙于生计,也源于提高内功 感谢Duilib原作者同意迁移SVN官方地址,便于社区维护 最后特别感谢【Duilib官方交流群3】活跃开发者们的帮助指导,为Duilib的重构提供了很多帮助,也为我个人成长提供指导
46 lines
896 B
C++
46 lines
896 B
C++
#include "StdAfx.h"
|
|
#include "MenuNotify.h"
|
|
#include "UIMenu.h"
|
|
#include "main_frame.hpp"
|
|
|
|
CMenuNotify::CMenuNotify(void)
|
|
{
|
|
}
|
|
|
|
|
|
CMenuNotify::~CMenuNotify(void)
|
|
{
|
|
}
|
|
|
|
void CMenuNotify::Notify(TNotifyUI& msg)
|
|
{
|
|
if( msg.sType == DUI_MSGTYPE_ITEMCLICK)
|
|
{
|
|
CMenuElementUI *pMenuElement = (CMenuElementUI*)msg.pSender;
|
|
CPaintManagerUI *m_pm = pMenuElement->GetManager();
|
|
if (m_pm != NULL)
|
|
{
|
|
|
|
CControlUI *pRootControl = m_pm->GetRoot();
|
|
if (pRootControl != NULL)
|
|
{
|
|
|
|
CDuiString szMenuName = pRootControl->GetName();
|
|
|
|
//if (szMenuName == _T("workstation_menu"))
|
|
//{
|
|
CDuiString szText = pMenuElement->GetText();
|
|
int index = pMenuElement->GetIndex();
|
|
bool bTickStatus = false;
|
|
switch (index)
|
|
{
|
|
case 0:
|
|
PostMessage(pMainFrame->m_hWnd,WM_CLICKABOUT,0,0);
|
|
break;
|
|
}
|
|
|
|
//}
|
|
}
|
|
}
|
|
}
|
|
} |