絢麗的字元雨如下圖:
**如下:
#include
#include
#define strmaxlen 25
#define strminlen 8
lresult callback wndproc (hwnd, uint, wparam, lparam) ;
// //
typedef struct tagcharchain
charchain, *pcharchain;
typedef struct tagcharcolumn
charcolumn, *pcharcolumn;
int main(hinstance hinstance, hinstance hprevinstance,
pstr szcmdline, int icmdshow)
ws_dlgframe | ws_thickframe | ws_popup,
0, 0,
getsystemmetrics(sm_cxscreen), getsystemmetrics(sm_cyscreen),
null, null, hinstance,
null) ;
showwindow (hwnd, sw_showmaximized) ;
updatewindow (hwnd) ;
showcursor(false);
srand ((int) getcurrenttime ()) ;
while (getmessage (&msg, null, 0, 0))
showcursor(true);
return msg.wparam ;
} tchar randomchar()
int init(charcolumn *cc, int cyscreen, int x)
cc->current->prev = cc->point;
cc->current->ch = '\0';
cc->current->next = cc->head;
cc->head->prev = cc->current;
cc->current = cc->point = cc->head;
cc->head->ch = randomchar();
return 0;
} lresult callback wndproc (hwnd hwnd, uint message, wparam wparam, lparam lparam)
if(ctn)
(ccchain+i)->istoptimes = 0 ;
else continue;
(ccchain+i)->y += ifontheight;
if( (ccchain+i)->y-(ccchain+i)->istrlen*ifontheight > cyscreen)
(ccchain+i)->head = (ccchain+i)->head->prev;
(ccchain+i)->head->ch = randomchar();
} bitblt(hdc, 0, 0, cxscreen, cyscreen, hdcmem, 0, 0, srccopy);
releasedc(hwnd, hdc);
return 0;
case wm_rbuttondown:
killtimer (hwnd, id_timer) ;
return 0;
case wm_rbuttonup:
settimer (hwnd, id_timer, 10, null) ;
return 0;
case wm_keydown:
case wm_lbuttondown:
case wm_destroy:
killtimer (hwnd, id_timer) ;
deleteobject(hbitmap);
deletedc(hdcmem);
for(i=0; icurrent );
} free(ccchain);
postquitmessage (0) ;
return 0 ;
} return defwindowproc (hwnd, message, wparam, lparam) ;
打造絢麗的Swing slider
swing的千千靜聽 圖3,啟用了的聲音 然後就是運用graphics乙個重要的擷取的方法,吧啟用了聲音的部分擷取下來 清單如下 可以繼承乙個自己的jsolider,如下 然後將ui和控制項結合起來,如下 這個時候我們就得到了乙個絢麗的solider 從下圖4中我們可以清晰的看見啟用和未啟用部分的區...
C語言之數字雨
用個高階一點的編譯器,這樣出現的問題會少很多,結果很酷炫。include include define id timer 1 define strmaxlen 25 乙個顯示列的最大長度 define strminlen 8 乙個顯示列的最小長度 lresult callback wndproc h...
jQuery也能舞出絢麗的介面
最近在做乙個產品的功能,是關於專題地圖的,做了幾個介面,效果還不錯,與大家分享一下 第乙個 介紹一下 這是乙個dialog彈出框,用的是jquery easyui的dialog,內部巢狀的是jquery easy ui的layout控制項,嚮導控制項用的是smart wizard,樣式做了一些調整,...