ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
```c++ #include <Windows.h> #include "../DuiLib/UIlib.h" #include <iostream> using namespace DuiLib; using namespace std; class CDuiFrameWnd : public WindowImplBase { public: virtual LPCTSTR GetWindowClassName() const { return _T("DUIMainFrame"); } virtual CDuiString GetSkinFile() { return _T("../UISkin/UISkin1.xml"); } virtual CDuiString GetSkinFolder() { return _T(""); } virtual void Notify(TNotifyUI& msg) { if (msg.sType == _T("click")) { if (msg.pSender ->GetName() == _T("MainBtn")) { ::MessageBox(NULL,_T("我是主窗体"),_T("主窗体"),NULL); } if (msg.pSender ->GetName() == _T("SaoBtn")) { ::MessageBox(NULL,_T("我是主窗体"),_T("主窗体"),NULL); } if (msg.pSender ->GetName() == _T("UpBtn")) { ::MessageBox(NULL,_T("我是主窗体"),_T("主窗体"),NULL); } if (msg.pSender ->GetName() == _T("closebtn")) { //关闭按钮 PostQuitMessage(0); } } } /*virtual LRESULT HandleMessage(UINT uMsg,WPARAM wParam,LPARAM lPAram) { }*/ }; int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { CPaintManagerUI::SetInstance(hInstance); CDuiFrameWnd duiFrame; duiFrame.Create(NULL, _T("DUIWnd"), UI_WNDSTYLE_FRAME, WS_EX_WINDOWEDGE); duiFrame.CenterWindow(); duiFrame.ShowModal(); return 0; } ``` ```xml <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <Window size="593,382" caption="0,0,0,32" sizebox="4,4,4,4"> <Default name="Button" value=" height=&quot;25&quot; width=&quot;60&quot; normalimage=&quot;file=&apos;BtnStyle\XP\button_nor.png&apos;&quot; hotimage=&quot;file=&apos;BtnStyle\XP\button_over.png&apos;&quot; pushedimage=&quot;file=&apos;BtnStyle\XP\button_down.png&apos;&quot; focusedimage=&quot;file=&apos;BtnStyle\XP\button_focus.png&apos;&quot; " /> <VerticalLayout width="593" height="382" bkimage=" file='./SysBtn\background.bmp' "> <!--标题栏--> <HorizontalLayout width="593" height="30"> <VerticalLayout width="520" height="30" /> <VerticalLayout width="73" height="30"> <Button float="true" tooltip="主窗体" pos="5,3,0,0" name="MainBtn" width="23" height="23" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage=" file='./SysBtn\119.BMP' " hotimage=" file='./SysBtn\117.BMP' " pushedimage=" file='./SysBtn\117.BMP' " /> <Button float="true" tooltip="关闭" pos="35,3,0,0" name="closebtn" width="23" height="23" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage=" file='./SysBtn\115.BMP' " hotimage=" file='./SysBtn\114.BMP' " pushedimage=" file='./SysBtn\116.BMP' " /> </VerticalLayout> </HorizontalLayout> <!--客户区--> <HorizontalLayout width="593" height="352"> <Label float="true" pos="21,26,0,0" width="59" height="25" text="扫描路径:" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" /> <Edit float="true" pos="94,26,0,0" width="300" height="20" bkcolor="#FFFFFFFF" textpadding="4,3,4,3" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" /> <Button float="true" pos="405,24,0,0" tooltip="主窗体" name="SaoBtn" width="48" height="36" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage=" file='./SysBtn\129.BMP' " hotimage=" file='./SysBtn\128.BMP' " pushedimage=" file='./SysBtn\129.BMP' " /> <Button float="true" pos="466,9,0,0" tooltip="主窗体" name="UpBtn" width="110" height="94" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage=" file='./SysBtn\123.BMP' " hotimage=" file='./SysBtn\132.BMP' " pushedimage=" file='./SysBtn\132.BMP' " /> <Edit float="true" pos="101,68,0,0" width="354" height="20" bkcolor="#FFFFFFFF" textpadding="4,3,4,3" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" /> <Label float="true" pos="21,68,0,0" width="59" height="20" text="扫描状态:" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" /> <Label float="true" pos="21,103,0,0" width="59" height="25" text="文件总数:" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" /> <Label float="true" pos="151,103,0,0" width="59" height="25" text="病毒数:" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" /> <Label float="true" pos="288,103,0,0" width="59" height="25" text="清除数:" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" /> <Label float="true" pos="389,103,0,0" width="59" height="25" text="清除数:" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" /> <List name="ListDemo1" float="true" pos="21,143,0,0" width="454" height="100" bkcolor="#FFFFFFFF" itemtextcolor="#FF000000" itembkcolor="#FFE2DDDF" itemselectedtextcolor="#FF000000" itemselectedbkcolor="#FFC1E3FF" itemhottextcolor="#FF000000" itemhotbkcolor="#FFE9F5FF" itemdisabledtextcolor="#FFCCCCCC" itemdisabledbkcolor="#FFFFFFFF" > <ListHeader name="domain" bkimage="List/list_header_bg.png"> <ListHeaderItem text="文件路径" width="200" height="23" minwidth="16" sepwidth="1" align="center" hotimage="List/list_header_hot.png" pushedimage="List/list_header_pushed.png" sepimage="List/list_header_sep.png" /> <ListHeaderItem text="扫描结果" width="84" height="23" minwidth="16" sepwidth="1" align="center" hotimage="List/list_header_hot.png" pushedimage="List/list_header_pushed.png" sepimage="List/list_header_sep.png" /> <ListHeaderItem text="状态" width="84" height="23" minwidth="16" sepwidth="1" align="center" hotimage="List/list_header_hot.png" pushedimage="List/list_header_pushed.png" sepimage="List/list_header_sep.png" /> </ListHeader> <!--<ListLabelElement text="张三" selected="true" /> <ListLabelElement text="李四" />--> </List> <Label float="true" pos="23,280,0,0" text="金山毒霸对该病毒的解决方案" width="155" height="25" textcolor="#0039e6" disabledtextcolor="#FFA7A6AA" /> <Label float="true" pos="23,317,0,0" text="上卓越网:在线购买金山毒霸" width="159" height="25" textcolor="#0039e6" disabledtextcolor="#FFA7A6AA" /> <Label float="true" pos="463,323,0,0" text="网易病毒预警短信" width="125" height="25" textcolor="#0039e6" disabledtextcolor="#FFA7A6AA" /> <Combo float="true" pos="219,65,0,0" width="80" height="23" itemtextcolor="#FF000000" itemselectedtextcolor="#FF000000" itemselectedbkcolor="#FFC1E3FF" itemhottextcolor="#FF000000" itemhotbkcolor="#FFE9F5FF" itemdisabledtextcolor="#FFCCCCCC" itemdisabledbkcolor="#FFFFFFFF" dropboxsize="0,150" /> </HorizontalLayout> </VerticalLayout> </Window> ```