Time of Update: 2018-12-05
文章目錄 1.絕對裝入方式(Absolute Loading Mode) 3.動態地址重地位(動態運行時裝入方式 Dynamic Run-time Loading) 2.裝入時動態連結(Load-time Dynamic Linking) 3.運行時動態連結(Run-time Dynamic Linking) 4.1. 構造動態連結程式庫 4.2. DLL的裝入方法 1. 地址相關概念1. 物理地址(physical
Time of Update: 2018-12-05
Time of Update: 2018-12-05
Alright, I found the reason. QWidget::create() clears the Qt::WA_QuitOnClose attribute for anything but Qt::Window, Qt::Widget or Qt::Dialog. The workaround is to call for example QWidget::show() first, and set the attribute by hand afterwards:Qt Cod
Time of Update: 2018-12-05
void test2::InitListWideget(){ m_pList = new rootDataList(this); m_pList->setGeometry(LIST_X, LIST_Y, LIST_W, LIST_H);QString str; for(int i = 0; i<10; i++) { str.setNum(i); QListWidgetItem * pItem = new QListWidgetItem; pItem-&
Time of Update: 2018-12-05
void xxxClass::xxxFun(){ m_StartMenu->addAction(act); m_StartMenu->addSeparator(); //如果沒有這句,得到的sumHeight是功能表項目的值;有了這句得到就是菜單總的高度 //,很奇怪 int sigleHeight = m_StartMenu->actionGeometry(act ).height();
Time of Update: 2018-12-05
BYTE Vals[256];HKEY hKEY;//開啟註冊表,判斷登錄機碼是否存在if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\WeldTech\\AirCondition\\"), 0, KEY_READ|KEY_WRITE, &hKEY) != ERROR_SUCCESS){ //不存在,建立登錄機碼
Time of Update: 2018-12-05
void NodeConfigDlg::initNodeTable(){ m_pNodeTable = new QTableWidget(this); QStringList headerString; m_pNodeTable->setColumnCount(6); m_pNodeTable->setRowCount(2); QGridLayout *pGridLayOut = new QGridLayout(this);
Time of Update: 2018-12-05
void CXXXButton::OnPaint(){ CPaintDC dc(this); CRect rect; this->GetClientRect(&rect); int imageW = m_pImage->GetWidth(); //m_pImage你自己的成員變數,自己去定義吧。 int imageH = m_pImage->GetHeight(); CImage memImg;
Time of Update: 2018-12-05
//xxx.h#ifdef CFG_API_BEING_COMPILED#ifdef WIN32#define CFG_API_EXPORT __declspec(dllexport)#else#define CFG_API_EXPORT#endif#else#if defined(WIN32) #define CFG_API_EXPORT __declspec(dllimport)#else#define CFG_API_EXPORT extern#endif#endif
Time of Update: 2018-12-05
QAction ( const QString & text, QObject * parent )QAction ( const QIcon & icon, const QString & text, QObject * parent )QAction的兩個建構函式中的text參數,文檔的描述是:The action uses a stripped version of text (e.g. "&Menu Option..." becomes "Menu
Time of Update: 2018-12-05
托盤上的菜單右鍵彈出後,然後再別的地方,比如案頭,菜單無法隱藏掉,一直在托盤上,除非操作下菜單才能隱藏掉,只需要加上一句話::SetForegroundWindow(m_nid.hWnd); 就可以解決這個問題。void CXXXDlg::CreateTray() { m_nid.cbSize=(DWORD)sizeof(NOTIFYICONDATA); //NOTIFYICONDATA m_nid 托盤成員變數 m_nid.hWnd=
Time of Update: 2018-12-05
我在一個CPlusTestSuite.h檔案中定義了一個全域函數namespace PlusTest{ std::string plusSuiteName() { return "PlusTest"; }}然後工程中有兩個檔案分別包含了(直接或間接)這個標頭檔。就會出現重定義的錯誤:1>Linking...1>BB.obj : error LNK2005: "void __cdecl ArraySet(double *,int,double)"
Time of Update: 2018-12-05
抱怨無益,憤恨無功,好高騖遠眼高手低就是自尋死路。看清現實很難,看清現實之後不抱怨地努力更難。找個時間,認真的想一想,自己想要的到底是什麼,然後就義無反顧的去努力。不上不下,是一種尷尬的狀態,但卻是很多人的狀態。世界上所有的人分布成了一個橄欖型,大多數的人都被卡在橄欖大大的肚子裡,過著平淡的生活,羨慕著一端,同情著另一端。對於很多大學生畢業生,他們的生活正被卡得不上不下。幾年的大學生活沒有留給他們各種認證,各種offer,簡曆上長長的實習經曆,或者是國外名校的研究生錄取通知書,四年之後,除了一本
Time of Update: 2018-12-05
BOOL CXXXDlg::OnEraseBkgnd(CDC *pDC){ CRect rect; this->GetClientRect(rect); if(!m_pBkImage) //定義的一個成員變數 { m_pBkImage = new Image(_T("main_frame.png")); } Bitmap
Time of Update: 2018-12-05
在組態管理中增加新平台 1.1 建立新平台 程式最初是基於Pocket PC 2003(ARMV4)平台建立的,我在此平台的配置基礎上,建立新的Win32平台。開啟菜單Build->Configuration Manager,在Active Solution Platform下拉選擇框中選擇New,選擇new platform為Win32,Copy settings from選擇原有配置Pocket PC 2003(ARMV4),按OK為應用程式建立新的Win32運行平台。 1.2
Time of Update: 2018-12-05
添加菜單方法1 m_pMenuBar= new QMenuBar(this); QMenu*pFileMenu = new QMenu("&檔案",m_pMenuBar); QMenu*pOpenMenu = new QMenu("開啟", pFileMenu); QMenu*pCreateMenu = new QMenu("建立", pFileMenu); QAction*pOpenAction =
Time of Update: 2018-12-05
VC++訊息映射的思考作者:郝慶欣在學習VC++的時候,大家都不可避免的用到訊息映射。我們都知道C++是一種物件導向的程式設計語言,VC++中為什麼這樣來實現訊息映射呢? 首先要明白一個包含了訊息處理的Windows程式是如何工作的。 一般來說一個包含了訊息處理的Windows程式至少要包含兩個函數 第一個: int WINAPI WinMain( HINSTANCE hInstance, // handle to current instance
Time of Update: 2018-12-05
在解析讀取tinyxml時候,發現讀取漢字都是亂碼,所以需要轉成GBK static wstring ConvertUTF8toGBK(const char * strUTF8) { int len = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)strUTF8, -1, NULL,0); TCHAR * wszUtf8 = new TCHAR[len+1]; wcscpy(wszUtf8,
Time of Update: 2018-12-05
作者:huangguisu 使用TCP/IP協議進行網路應用開發的朋友首先要面對的就是對IP地址資訊的處理。IP地址其實有三種不同的表示格式: 1)Ascii(網路點分字串)- 2) 網路地址(32位無符號整形,網路位元組序,大頭) 3)主機地址 (主機位元組序)
Time of Update: 2018-12-05
文章目錄 1. URL長度限制2. Post資料的長度限制3. Cookie的長度限制4. Html5 LocalStorage HTTP1.0的格式request(HTTP請求訊息)結構:一個請求行.部分訊息頭,以及實體內容,其中的一些訊息內容都是可選擇的.訊息頭和實體內容之間要用空行分開.GET /index.html HTTP/1.1 //要求標頭,下面都是訊息頭.Accept: