?? wprints.c
字號:
/* CXL - Copyright (c) 1987-1989 by Mike Smedley - All Rights Reserved */
/* WPRINTS.C - displays a string inside active window */
#include <conio.h>
#include <dos.h>
#include <string.h>
#include "cxldef.h"
#include "cxlvid.h"
#include "cxlwin.h"
int wprints(int wrow,int wcol,int attr,char *str)
{
register int col,max;
int row,border;
/* check for active window */
if(!_winfo.total) return(_winfo.errno=W_NOACTIVE);
/* check for valid coordinates */
if(wchkcoord(wrow,wcol)) return(_winfo.errno=W_INVCOORD);
/* see if window has border */
border=_winfo.active->border;
/* calculate effective coordinates */
row=_winfo.active->srow+wrow+border;
col=_winfo.active->scol+wcol+border;
max=((_winfo.active->ecol-border)-col+1);
/* see if wraparound is needed - if not, use faster prints() function */
if(strlen(str)<=max) {
prints(row,col,attr,str);
return(_winfo.errno=W_NOERROR);
}
/* display as much of string as possible */
while(*str&&max--) printc(row,col++,attr,*str++);
return(_winfo.errno=W_STRLONG);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -