Time of Update: 2018-12-07
由於標準的按鈕控制項在樣式上比較單調,因此,在很多時候,我們都需要對標準按鈕控制項實行自畫,以滿足特定的需求。為了能讓按鈕控制項支援自畫,需要設定按鈕的BS_OWNERDRAW風格,一般情況下,我們可以在PreSubclassWindow中進行設定: class CxxxButton : public CButton { ... }; void CxxxButton::PreSubclassWindow() { ModifyStyle( 0, BS_OWNERDRAW);
Time of Update: 2018-12-07
文章目錄 什麼是許可協議?GNU GPLBSDMITApacheCreative Commons 什麼是許可協議?什麼是許可,當你為你的產品簽發許可,你是在出讓自己的權利,不過,你仍然擁有著作權和專利(如果申請了的話),許可的目的是,向使用你產品的人提供 一定的許可權。不管產品是免費向公眾分發,還是出售,制定一份許可協議非常有用,否則,對於前者,你相當於放棄了自己所有的權利,任何人都沒有義務表明你的原始作
Time of Update: 2018-12-07
include <iostream>#include <map>using namespace std;int main(){ map<string,map<string,string> > mapmaps; map<string,string> mapmap; mapmap.insert(pair<string,string>("ysl","ysh"));
Time of Update: 2018-12-07
1). 設定著色模式: SetRenderState(D3DRS_SHADEMODE, D3DSHADE_FLAT) //設定平面著色模式SetRenderState(D3DRS_SHADEMODE, D3DSHADE_GOURAUD) //設定格勞德著色模式2). 設定多邊形填充模式:SetRenderState(D3DRS_FILLMODE, D3DFILL_POINT)
Time of Update: 2018-12-07
#include "CInitSocket.h"#include <iostream>using namespace std;CInitSock initsocket;int main(){//時間控制代碼和通訊端控制代碼數組WSAEVENT eventArrary[WSA_MAXIMUM_WAIT_EVENTS];SOCKET sockArray[WSA_MAXIMUM_WAIT_EVENTS];int nEventTotal=0;
Time of Update: 2018-12-07
template\default\forum\post_editor_option.htm<p class="mbn"><input type="checkbox" name="htmlon" id="htmlon" class="pc" value="1" $htmloncheck /><label for="htmlon">{lang post_html}</label></p>改成<p class="mbn"><
Time of Update: 2018-12-07
#include <iostream>#include <cstdarg>using namespace std;typedef int (*PCALLBACK)(int nCount,va_list vlist);int addInt(int nCount,va_list vlist){ int sum = 0; for (int i=0;i<nCount;i++) { sum+=va_arg(vlist,int); }
Time of Update: 2018-12-07
The analysis of China's holding the Olympic GamesThe 29th Olympic Games will be held in Beijing on August 8 this year. This is China's first host of the Olympic Games.Holding the Olympic Games has lots of advantages. First of all, it needs the new
Time of Update: 2018-12-07
#include <stdexcept>template <typename T,int MAXSIZE>class Stack{private: T elems[MAXSIZE];int numElems;public: Stack();void push(T const&);void pop(); T top() const;bool empty() const{return numElems==0;}bool full() const
Time of Update: 2018-12-07
由於使用了DBank的論壇附件程式,所以想去掉系統內建的附件上傳程式,後台不能設定,研究了下,找到一下方法:1. template\default\forum\editor_menu_forum.htm刪除以下代碼switchAttachbutton('<!--{if $_G['setting']['swfupload'] !=
Time of Update: 2018-12-07
#include <WINSOCK2.H>#include <iostream>#pragma comment(lib,"ws2_32")int main(){using namespace std;WSADATA wsaData;WORD sockVersion=MAKEWORD(2,2);if (WSAStartup(sockVersion,&wsaData)!=0){ cout<<"通訊端庫載入失敗!"; exit(0);}if (
Time of Update: 2018-12-07
主要原理:將電子書分為3個內容層,疊放順序.第一層為當前頁面層,是現在正在顯示的頁面;第二層是隨滑鼠拖拽時捲起的頁角,第三層是當頁角捲起時,露出下一頁的層。設定遮罩:當頁邊捲起時,層1僅顯示四邊形FBDE內部分,層2僅顯示ABCD部分,層3僅顯示BGHD部分.旋轉:層2內的內容要隨著滑鼠運動而不停變換傾斜角度,其角度始終與AC邊斜度一致.翻頁:當頁面完全翻過時,層1的當前頁數=當前頁數+1程式的核心在於如何獲得四個點ABCD的座標:我使用的是求垂直平分線的方法,既:點C是滑鼠位置,點H是頁角位置
Time of Update: 2018-12-07
#include <iostream>using namespace std;//求兩個int值的最大值inline int const& max(int const& a,int const& b){return a<b ? b:a;}//求兩個任意類型值中的最大者template <typename T>inline T const& max(T const& a,T const& b){return
Time of Update: 2018-12-07
Ubuntu預設狀態下案頭是不顯示資源回收筒的,這對於剛剛從Windows轉移過來的使用者來說可能會不習慣,但是你同樣可以通過簡單的設定把它放到案頭.方法:使用快速鍵Alt+F2開啟運行視窗.鍵入gconf-editor,開啟Gnome配置編輯器.定位到apps \ nautilus \ desktop.在右側找到名為trash_icon_visible的選項,打上勾.這樣,你的案頭上就會出現久違的資源回收筒表徵圖了
Time of Update: 2018-12-07
UDP 是USER DATAGRAM PROTOCAL 的簡稱,是一種在網路上提供的不需連線的傳輸協議。用UDP通訊有以 下特點:1、 資料轉送不用建立串連,所以不可靠;2、 資料的發送是面向整個網路的,任何一台在區域網路內的電腦都可以接收到相同的資料;參考其他地方,弄一個簡單的例子,希望起到拋磚引玉的作用,同時希望能給初次接觸UDP之BROADCAST編程的童鞋一些參考。//recv端struct SendData{ ULONG DataSize;char DataData[1024];
Time of Update: 2018-12-07
(178, 2, 'views', '2856'),(180, 128, 'views', '586'),(182, 136, 'views', '542'),(184, 139, 'views', '521'),(186, 146, 'views', '973'),(188, 158, 'views', '932'),(189, 162, 'views', '447'),(190, 198, 'views', '1512'),(192, 206, 'views', '733'),(193, 2
Time of Update: 2018-12-07
由於給類加了些東西結果,出現了大問題: 解構函式調用完後出錯, 百思不得其解, 最後想到這個問題, 搜尋了一下:以下文字引用自 http://hi.baidu.com/huhe/blog/item/0b422edd1f1563d98c1029a3.html很感謝作者的分析一個模組一個堆,一個線程一個棧。dll裡malloc的記憶體,在exe裡free會出錯。CRT(C運行時期庫)不是使用進程預設的堆來實現malloc(new中調用malloc)的,而是使用一個全域控制代碼HANDLE
Time of Update: 2018-12-07
#include <WINSOCK2.H>#pragma comment(lib,"ws2_32")class CInitSock{public: CInitSock(BYTE minorVer=2,BYTE majorVer=2) { WSADATA wsaData; WORD sockVersion=MAKEWORD(minorVer,majorVer);if (WSAStartup(sockVersion,&wsaData)!=0
Time of Update: 2018-12-07
這個星期開始學習Python了,因為看的書都是基於Python2.x,而且我安裝的是Python3.1,所以書上寫的地方好多都不適用於Python3.1,特意在Google上search了一下3.x和2.x的區別。特此在自己的空間中記錄一下,以備以後尋找方便,也可以分享給想學習Python的friends. 1.效能 Py3.0運行 pystone benchmark的速度比Py2.5慢30%。Guido認為Py3.0有極大的最佳化空間,在字串和整形操作上可 以取得很好的最佳化結果。 Py3.1
Time of Update: 2018-12-07
#if !defined(AFX_SEARCHBOX_H__4AAEB096_F117_4139_8F63_94C9E64041E5__INCLUDED_)#define AFX_SEARCHBOX_H__4AAEB096_F117_4139_8F63_94C9E64041E5__INCLUDED_#if _MSC_VER > 1000#pragma once#endif // _MSC_VER > 1000// MySearchBox.h : header file////////