admin管理员组文章数量:1568732
2024年6月21日发(作者:)
流星雨C语言代码
#include
#define ID_TIMER 1
#define STRMAXLEN 25 //一个显示列的最大长度
#define STRMINLEN 8 //一个显示列的最小长度
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM,
LPARAM) ;
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
typedef struct tagCharChain //整个当作屏幕的一个显示列,这是
个双向列表
{
struct tagCharChain *prev; //链表的前个元素
TCHAR ch; //一个显示列中的一个字符
struct tagCharChain *next; //链表的后个元素
}CharChain, *pCharChain;
typedef struct tagCharColumn
{
CharChain *head, *current, *point;
int x, y, iStrLen; //显示列的开始显示的x,y坐标,iStrLen是这个列
的长度
int iStopTimes, iMustStopTimes; //已经停滞的次数和必须停滞
的次数,必须停滞的次数是随机的
}CharColumn, *pCharColumn;
int main(HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
static TCHAR szAppName[] = TEXT ("matrix") ;
HWND hwnd ;
MSG msg ;
WNDCLASS wndclass ;
= CS_HREDRAW | CS_VREDRAW ;
dProc = WndProc ;
xtra = 0 ;
xtra = 0 ;
nce = hInstance ;
= LoadIcon (NULL, IDI_APPLICATION) ;
r = LoadCursor (NULL, IDC_ARROW) ;
kground = (HBRUSH) GetStockObject
(BLACK_BRUSH) ;
nuName = NULL ;
assName = szAppName ;
if(!RegisterClass (&wndclass))
{
MessageBox (NULL, TEXT ("此程序必须运行在NT下!"),
szAppName, MB_ICONERROR) ;
return 0;
}
hwnd = CreateWindow (szAppName, NULL,
版权声明:本文标题:流星雨C语言代码 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1718906149a739659.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论