原创 win32 sdk 顯示位圖簡單示例

 HDC hdc,memdc; hdc=GetDC(hwnd); memdc=::CreateCompatibleDC(hdc); HBITMAP bmp; //IDB_BLACK爲已導入位圖資源ID bmp=::LoadBitmapA(

原创 vc 讀取 XML文件的一個簡單實例,以備查用

//函數體 代碼 //參數說明: //file:XML文件名指針 //root:XML文檔根結點 //child_name:XML文檔子結點long GetXmlContent(const char* file,CString root,

原创 std::string的find返回值爲string::size_type

std::string str 要想判斷 find() 的結果是否爲npos,最好的辦法是直接比較:if (str.find("abc") == string::npos) { ... }