vc菜譜詳解 查詢硬體資訊篇

2021-03-31 08:56:58 字數 775 閱讀 1468

begin_message_map( theclass, baseclass )巨集用於定義自己的訊息map,其中theclass用於指定map哪乙個類,bashclass指定基類

該巨集一般在(cpp)檔案裡使用並且應當放置在成員函式的定義之前,巨集的使用以begin_message_map為開頭,並在其後為每乙個訊息處理函式增加巨集定義,最後還必須end_message_map 為結尾。例如:

enalbe3dcontrols()     當連線到mfc動態鏈結庫的時候呼叫

enalbe3dcontrolsstatic()    當靜態的連線到mfc庫的時候呼叫

以上兩個函式是用於支援視窗和控制有3維的感覺(並且都在initinstance裡面呼叫)

cwnd::sendmessage(uint message, wparam wparam=0,lparam lparam=0)

lresult sendmessage(hwnd hwnd, uint msg, wparam wparam, lparam lpara)

以兩個函式都是用於傳送訊息。wm_iconerasebkgnd訊息被傳送至最小化了的視窗,只有為視窗定義了icon的時候,視窗才回接受該訊息。cdc::getsafehdc()得到裝置上下問的handle.

getsystemmetrics函式得到各種系統的指標和系統設定

結構包括了當前計算機系統的資訊,包括體系結構,處理器的型別,處理器的類別,頁的大小

void getsysteminfo(lpsystem_info lpsysteminfo);返回當前系統的資訊

linux查詢硬體所有資訊

1.檢視cpu資訊 檢視cpu詳情資訊 lscpu lscpu grep model name awk dmidecode grep a16 memory device 1.檢視磁碟型號 以檔案形式檢視磁碟資訊 cat sys block nvme0n1 device model intel ssd...

Linux查詢系統硬體資訊命令

1.檢視伺服器型號 序列號 dmidecode grep system information a9 egrep manufacturer product serial manufacturer huawei product name rh2288 v3 serial number 2102310y...

Linux查詢硬體資訊命令整理

之前整理的不知道哪去了,在這裡再整理一次。記憶體 free m cat proc meminfo dmidecode t memory cpu lscpu cat proc cpuinfo dmidecode t processor dmidecode grep cpu 獲取cpu資訊 硬碟 df ...