//
//Author			: walk.djg
//Time			: 2010-02-09
//Version		: 1.0.0
//Description	: 多级无模态对话框 	
//


#ifdef _VS_WALK
#include "wkClassDefine.h"
#endif

#include "wcDialogConstant.h"
/*	加法测试器 */

#define _Digit1 100
#define _Digit2 101
#define _Answer 102
#define _Tip 103


//创建对话框
void CreateDlg(wkDialog &dlg, string cap)
{
	int x=20, y=10, w=40, h=14;
	dlg.create(cap);

	dlg.setAction(wdIdOk, wdMsgBnClicked);
	dlg.show();
}

void main()
{

	wkDialog dlg1;
	int ctrlId1;
	CreateDlg(dlg1, "Dialog1");
	while(1)
	{
		int act1=dlg1.peekAction(ctrlId1);
		if (act1 == -1)
			break;
		if (act1 && ctrlId1==wdIdOk)//响应"确认"消息
		{
			wkDialog dlg2;
			int ctrlId2;
			CreateDlg(dlg2, "Dialog2");
			while(1)
			{
				int act2 = dlg2.peekAction(ctrlId2);
				if (act2 == -1)
					break;
				if (act2 && ctrlId2 == wdIdOk)
				{
					wkDialog dlg3;
					int ctrlId3;
					CreateDlg(dlg3, "Dialog3");
					while(1)
					{
						int act3 = dlg3.peekAction(ctrlId3);
						if (act3 == -1)
							break;
					}
				}
			}
		}
	}

}
