[ucgui] 对话框4——模式消息窗口

>_<" 这里实现点击灰色窗口的按钮出现一个模式消息窗口,点击OK之后才能再聚焦到灰窗口;点击灰窗口除了按钮的地方,弹出一个非模式窗口。

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzAAAAIJCAIAAAD1aE+dAAAgAElEQVR4nO3cS3BU56Hg8V7PikrK+0xlkqnKfqpmrw0Low0Km4jcHQYvTOoa+y4HnGBeDgb7lvN0ENipcjCJIRPLxsQ2YN4WiId4GIk3BoSdx51kM1MzxSxaap3uc/r06VZ3n0/6fl/9imqdPuc7L1D/6wiojP55DACAElX+bhiGYRiGYZQ6KsmxzDAMwzAMw+jLqKTHsmXLBgcHX92xc+z8tbsP/gYAQI9M3ry3/8CBwcHBuixbtmzZD3/4L6fPXv707CQAAH1wbfLOD3/4L3NNNjg4ePrs5U/PTQEA0DfXJu8MDg7OPB57+eWth89NAQDQZ++88+6yZcsqy5YtGzt/7cj4DQAA+mz663/MBNn01/84cv4mAAB9VhdkR8/fBACgz+qC7LMLtwAA6LO6IDt28TYAAH1WF2THL93J9J//y3enC4/3j55rNg8AsIh9dOLKv+96/8fb3+muf9/1/kcnriymXaQVCrLp6enDhceSJUtK/w0BAPTftjfeO3Ts4oXJL7vr0LGL2954bzHtIq0uyE5M3M1UDbKRkZH9s+P+/fvT0xM1teXHjx9fsmRJs3kAgEXsx9vfGf/i/sefX++u8S/u/3j7O4tpF2l1QXby8r1M1SDbv3//4cOH//nPf37ve5WnnqqzZMmSJUuW1IKs2Ty04+zmZ4b+dW+/dnd41w8Gn9t8uNPN924aeGbXH9vbavRfBze9Wf51BqBrfvLq7y5c//KTscnuunD9y5+8+rsSd/Hx2PWPx67Pvp78ZGzyk8/rjU1+Mnb9k89rv05+PDb31sdjkx/X7yKtLshOXbmfKRlkT55MPPVUpVJ5turTT//TxERlYqLy7LOVWpDVb35uyzNDz+9LT/vB84NDA1X/44PamgO1hYObftPkeGY2f2bXn67cP7Vv0w/eOJea87ktR7K2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w7U9PpneUWvPAloE1bx1MH9LJt1ZuODR+4/HbGxLz1K2c3mnjbG9vGFr5y0vZW7Wc6saln65JdeGGQ23souWBNa5Z+7Ld5ZlS7558a+XglrfnbtDQQO0eZd6FhoVzX1766ZrUzT351srB6kkld3ToheqL7LucPMLE62a/Jeq9vWFoYMOhJu9m/vZr9nsSgDa8vPPdy7cfH5+4l2n5ilVTzcfyFauabXjl9uOXd75b28WV249nO6lRy1002/ByYhfVIDt15cuTV748lXDyypenrtzfsnN3ci8Nr7e8tvtU/VY11SBrdunqguz8za8yfee7/3VkZOTMmTNPPfXsyMhI+n/n3594TvaHg8fqN5/YvmboxQN1E370y7UDg2u3n5pdcmDryl9ONK55YGvdOvWbv3jgq/M3D7245q2PMnd0YOtA3Vtfnb/51flTb62cm/DQi4PVlTO3ajVVvbc3DK385USbuyh0YAMbDiWu2Na3b3awPFPqppx6a+Xs+tXT+eiXa2cPtXZI1XerqyUXTmxfM5S4dKm7ljjrxIEdenEwPVVt/uQRJl9nrtx4ajO3I3l2yStTPZjMhQDMw8s737125+tmRbJ8xaqrzcfyFauabXjtztcv73y3z7s4fe3h6WsPTl99cObag9NXH56++vDMtYdnrj1M7mL5ilVbX9/dsOTM1Yenrz04c/XhmasPzlx9cPrqgzNXH5659jC5i7S6ILtw6+tMlUrl1q3p9eu/12yFXBPbkw+T1rx9qLr8wNa5hS/9OW/N4k69vXJm862/zVrh0K9+VJv/xQO5W7WaKum3Lw2t/NVE27tocWAT29cMvfhS7SrVNmxz+am3V2bstJo4DZdu629vff3bl2pXfmL7mtlbM3f8ia3m7uCPtv9qa2KrH20/1fT3wMqXts4ez59frDvIxvlnrsmatw/Vv84+mFvpo5o9tlMNV3juamQuBKBjm17bd+3O16euPMi05bXdOX+HbMtru5tteO3O15te29fnXXz+xaOEh59/8fDzLx6d+eLRttf31Cbc+vqez+uXbHt9z5nqJtce1c/wKLmLtLogu3j7L5n2799fqXx05Nz1b3zzvW9/952Lt//yjW++d/H2X7793XfeO/T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ZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZF+oZo8AAAJgSURBVABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiEQZABRE2QQAkEGEDVBBiHod5AtXfp9AIIiyKB0/Q4ywzAMI8RR9qcRRK6/QQYAQIogAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKJkgAwAomSADACiZIAMAKFnbQQYAQK8JMgCAkgkyAICSCTIAgJIJMgCAkgkyAICS1QUZAAClmAkywzAMwzAMo8RRWbZs2fTX//jswi0AFoHpr/+xbNmydw3DWFDj/wMk6OXBisnp/QAAAABJRU5ErkJggg==" alt="" width="430" height="274" />

 static const GUI_WIDGET_CREATE_INFO _aDialogOrder[] = {//大的一个窗口(刚开始显示的,有一个按钮)
{ FRAMEWIN_CreateIndirect, "Order vehicle", , , , , , },
{ BUTTON_CreateIndirect, "Select vehicle", GUI_ID_BUTTON0, , , , , },
}; static void _cbDialogOrder(WM_MESSAGE* pMsg) {//消息窗口回调函数
WM_HWIN hDlg, hWin = pMsg->hWin;
GUI_PID_STATE* State; switch (pMsg->MsgId) {
case WM_INIT_DIALOG:
break;
case WM_NOTIFY_PARENT:
if (pMsg->Data.v == WM_NOTIFICATION_RELEASED) {//此通知消息将在被点击的小工具已被释放时发送
int Id = WM_GetId(pMsg->hWinSrc);
switch (Id) {
case GUI_ID_BUTTON0:
//调用函数生成MessageBox,可以通过拖动标题栏或窗口框来移动消息框
hDlg = MESSAGEBOX_Create(" Computer Win!!! ", "Failed", GUI_MESSAGEBOX_CF_MOVEABLE);
//控制窗口聚焦直至窗口结束的相关设置[如果去掉就无法实现模式窗口的效果
WM_MakeModal(hDlg); /*此函数使窗口在“模态”模式下作业。这意味着指针设备输入将仅发送到“模态”窗口,
或者如果输入位置在模态窗口的矩形内则仅发送到其子窗口。*/
WM_SetFocus(hDlg); //将输入焦点设置到指定窗口
WM_InvalidateWindow(hDlg);//使窗口无效
break;
}
}
break;
case WM_TOUCH:
State = (GUI_PID_STATE*) pMsg->Data.p;
if(State && !State->Pressed)
{
{
hDlg = MESSAGEBOX_Create(" You Win!!! ", "Win", GUI_MESSAGEBOX_CF_MOVEABLE);
//这里把控制模式窗口的注释掉,点击其他区域建立一个非模式窗口
//WM_MakeModal(hDlg);
//WM_SetFocus(hDlg);
//WM_InvalidateWindow(hDlg);
break;
}
}
default:
WM_DefaultProc(pMsg);
}
} static void _cbBkWindow(WM_MESSAGE* pMsg) {//背景窗口回调函数
switch (pMsg->MsgId) {
case WM_PAINT:
GUI_SetBkColor(0x008000);
GUI_SetColor(GUI_WHITE);
GUI_SetFont(&GUI_Font24_ASCII);
GUI_Clear();
GUI_DispStringHCenterAt("DIALOG_NestedModal - Sample", , );
default:
WM_DefaultProc(pMsg);
}
} void Fun(void) {
WM_HWIN hWin; //句柄
GUI_Init(); //初始化
GUI_CURSOR_Show(); //鼠标指针显示
/*
窗口管理器的默认特性是向每个需要重绘的窗口发送一条WM_PAINT。这会导致闪变效应。为抑制这些
每个窗口的闪变效应,可为重绘操作自动使用存储设备。方法为,在创建窗口时设置标记WM_CF_MEMDEV、
使用函数WM_SetCreateFlags()设置默认创建标记,或使用函数WM_EnableMemdev()。WM然后
会将WM_PAINT消息输出重定向到存储设备中,再复制到显示器中。如果整个窗口的内存不够,会自动
使用分段。存储设备只是临时使用,在绘制操作完成后会移除。
*/
WM_SetCreateFlags(WM_CF_MEMDEV); //设置在创建新窗口时用作默认的标记
WM_EnableMemdev(WM_HBKWIN); //启用使用存储设备来重绘窗口
WM_SetCallback(WM_HBKWIN, &_cbBkWindow); //设置窗口的回调例程,然后调用WM_PAINT消息初始化背景
//创建非阻塞式对话框
hWin = GUI_CreateDialogBox(_aDialogOrder, GUI_COUNTOF(_aDialogOrder), &_cbDialogOrder, WM_HBKWIN, , );
while (){
if (!GUI_Exec()){
GUI_X_WAIT_EVENT(); /* Wait for event (keyboard, mouse or whatever) */
}
}
}
上一篇:php-ffmpeg 操作视频/音频文件


下一篇:mysqlslap 使用总结