⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 debug.sys

📁 winsail v2.0是用于DOS下的图形界面空间系统
💻 SYS
字号:
#include <Symbol.h>
#include <MyFrame.h>


//Stack's Size
unsigned int _stklen = 50u * 1024u;//堆栈的尺寸

//Keyboard's Callback Function For All Default Window 
int TransrateKey(CObject* pCurObj)//所有窗口默认虚拟键盘回调函数
{
	return(0);
}

void far VccFunction(CObject* pCurObj)
{
	//Create a Dialog On the Center of Desktop
	CDialog* pDialog = new CDialog;//分配实例
	pDialog->CreateWindow(0, 0, 532, 219, "冲击电压发生器参数选择");//建立窗口
	pDialog->Center();//窗口对中

	//Register Callback Function for Window
	pDialog->SetTimeFc(NULL);//注册定时器回调函数
	pDialog->SetDrawFc(NULL);//注册画图回调函数
	pDialog->SetHelpFc(NULL);//注册帮助回调函数
	pDialog->SetKeyboardFc(NULL);//注册虚拟键盘回调函数

	//Create Close's Button Control
	CCloseButton* pCloseButton = new CCloseButton(pDialog);//分配和建立关闭按钮

	//Create a Button Control
	CButton* pButton1 = new CButton(pDialog);
	pButton1->CreateObject(283, 139, 216, 24, "计算(\x3\E\x3)");
	pButton1->SetShortcutKey(VK_ALT_E);
	pButton1->SetFc(ClickEnterButton);
	pButton1->SetID(BUTTONBASE + 1 - 1);

	//Create a Button Control
	CButton* pButton2 = new CButton(pDialog);
	pButton2->CreateObject(283, 172, 216, 24, "退出(\x3\C\x3)");
	pButton2->SetShortcutKey(VK_ALT_C);
	pButton2->SetFc(ClickCancelButton);
	pButton2->SetID(BUTTONBASE + 2 - 1);

	//Create Group Control
	CStatic* pGroup1 = new CStatic(pDialog);
	pGroup1->CreateObject(10, 34, 249, 173, "固定参数");
	pGroup1->SetID(GROUPBASE + 1 - 1);

	//Create Group Control
	CStatic* pGroup2 = new CStatic(pDialog);
	pGroup2->CreateObject(267, 34, 252, 79, "计算结果");
	pGroup2->SetID(GROUPBASE + 2 - 1);

	//Create Edit Control
	CEdit* pEdit1 = new CEdit(pDialog);
	pEdit1->CreateObject(22, 74, 111, 21, NULL);
	pEdit1->SetID(EDITBASE + 1 - 1);

	//Create Combo Control
	CComboBox* pComboBox1 = new CComboBox(pDialog);
	pComboBox1->CreateCombo(141, 74, 111, 24, NULL);
	pComboBox1->SetID(COMBOBASE + 1 - 1);

	//Create a Label Control
	CLabel* pLabel1 = new CLabel(pDialog);
	pLabel1->CreateObject(22, 50, 79, 12, "发生器电容:Cg");
	pLabel1->SetID(LABELBASE + 1 - 1);

	//Create Edit Control
	CEdit* pEdit2 = new CEdit(pDialog);
	pEdit2->CreateObject(22, 125, 111, 21, NULL);
	pEdit2->SetID(EDITBASE + 2 - 1);

	//Create Combo Control
	CComboBox* pComboBox2 = new CComboBox(pDialog);
	pComboBox2->CreateCombo(141, 125, 111, 24, NULL);
	pComboBox2->SetID(COMBOBASE + 2 - 1);

	//Create a Label Control
	CLabel* pLabel2 = new CLabel(pDialog);
	pLabel2->CreateObject(22, 101, 67, 12, "负载电容:C2");
	pLabel2->SetID(LABELBASE + 2 - 1);

	//Create Edit Control
	CEdit* pEdit3 = new CEdit(pDialog);
	pEdit3->CreateObject(22, 177, 111, 21, NULL);
	pEdit3->SetID(EDITBASE + 3 - 1);

	//Create a Label Control
	CLabel* pLabel3 = new CLabel(pDialog);
	pLabel3->CreateObject(22, 153, 67, 12, "波前时间:T1");
	pLabel3->SetID(LABELBASE + 3 - 1);

	//Create Edit Control
	CEdit* pEdit4 = new CEdit(pDialog);
	pEdit4->CreateObject(141, 177, 111, 21, NULL);
	pEdit4->SetID(EDITBASE + 4 - 1);

	//Create a Label Control
	CLabel* pLabel4 = new CLabel(pDialog);
	pLabel4->CreateObject(141, 153, 67, 12, "波尾时间:T2");
	pLabel4->SetID(LABELBASE + 4 - 1);

	//Create Edit Control
	CEdit* pEdit5 = new CEdit(pDialog);
	pEdit5->CreateObject(277, 80, 111, 21, NULL);
	pEdit5->SetID(EDITBASE + 5 - 1);

	//Create a Label Control
	CLabel* pLabel5 = new CLabel(pDialog);
	pLabel5->CreateObject(277, 56, 67, 12, "波前电阻:Rs");
	pLabel5->SetID(LABELBASE + 5 - 1);

	//Create Edit Control
	CEdit* pEdit6 = new CEdit(pDialog);
	pEdit6->CreateObject(397, 80, 111, 21, NULL);
	pEdit6->SetID(EDITBASE + 6 - 1);

	//Create a Label Control
	CLabel* pLabel6 = new CLabel(pDialog);
	pLabel6->CreateObject(397, 56, 67, 12, "波尾电阻:Rp");
	pLabel6->SetID(LABELBASE + 6 - 1);

	//Create Group Control
	CStatic* pGroup3 = new CStatic(pDialog);
	pGroup3->CreateObject(267, 118, 252, 88, "");
	pGroup3->SetID(GROUPBASE + 3 - 1);


	//Show Window
	pDialog->ShowWindow();//显示窗口

	//go into Message Loop
	pDialog->DoModal();//进入窗口消息循环

	//Destroy Window 
	delete pDialog;//删除对话框


	return;

}

int main(int argc, char** argv)
{

	//Initlize Sysem Kernel 
	if (!::InitSystem(argc, argv))//初始化系统内核
	{
		::CloseSystem();//关闭系统内核
		printf("\nInit System Error!");
		return(0);
	}


	//Callback Function
	::VccFunction(NULL);


	//Close Sysem Kernel 
	::CloseSystem();//关闭系统内核

	return(1);

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -