Board logo

标题: 请教:怎样在ucsdk for c 的图形界面中关闭ucdos提示条 [打印本页]

作者: yhb123456     时间: 2004-10-23 00:00    标题: 请教:怎样在ucsdk for c 的图形界面中关闭ucdos提示条

我用ucdos sdk for c 做了一个win窗口图形界面,可是下面总是有一条ucdos的提示条占在那里,请教各位有什么函数可以关掉它。让图形拉满屏。
作者: TurboY     时间: 2004-11-11 00:00
这是从UCDOS中找到的,中间的ClearPromptLine(int Color)应该可以做到,把Color设置为你的背景色吧。
#include <stdio.h>
#include <dos.h>

int IsUcdosResident(void)
{
   union REGS regs;   regs.x.ax = 0xdb00;
   int86(0x2f,&amp;regs,&amp;regs);
   return regs.x.bx == 0x5450;
}void SetPromptLineColor(int Color1,int Color2,int Color3,int Color4)
{
   union REGS regs;   regs.x.ax = 0xff0f;
   regs.h.bl = 0x8b;
   regs.h.cl = Color1;
   regs.h.ch = Color2;
   regs.h.dl = Color3;
   regs.h.dh = Color4;
   int86(0x10,&amp;regs,&amp;regs);
}void InitPromptLine(void)
{
   union REGS regs;   regs.x.ax = 0xff07;
   int86(0x16,&amp;regs,&amp;regs);
}void ClearPromptLine(int Color)
{
   union REGS regs;   regs.x.ax = 0xff10;
   regs.h.bl = 0;
   regs.h.bh = Color;
   int86(0x10,&amp;regs,&amp;regs);
}void WritePromptMoreChar(char ch,int Color,int Count)
{
   union REGS regs;   regs.x.ax = 0xff10;
   regs.h.bl = 1;
   regs.h.bh = Color;
   regs.x.cx = Count;
   regs.h.dl = ch;
   int86(0x10,&amp;regs,&amp;regs);
}void WriteUcdosPromptLine(const char *msg)
{
// char msg[81]="一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五";
if (IsUcdosResident()) {
  char *p;
  SetPromptLineColor(0x17,0x11,0x1c,0xb1);
  InitPromptLine();
  ClearPromptLine(0x7);
  for (p=msg;*p;p++)
   WritePromptMoreChar(*p,0xb4,1);
}
else {
  printf("The UCDOS is not residented.\n");
}
}

作者: yhb123456     时间: 2004-11-11 00:00
非常感谢,终于碰到高手了。为了这个问题我脑袋都快抓破了,得到大虾指点真是如沐春风,一个字“爽”。请问大虾上面的这段代码在那里才能找得到,还是用什么工具反编译的呢?小弟才学疏浅还望多多提点,再次表示感谢。
作者: printemps     时间: 2005-12-30 14:05
非常感谢,最近我刚好用到
作者: john5911     时间: 2010-12-16 15:59
非常感谢,最近我刚好用到