目錄
handle loadimage(
hinstance hinst, // 若引導程式外部資源傳null,否則一般傳afxgetinstancehandle()
lpctstr lpszname, // 名稱或全路徑
uint utype, // 型別:image_bitmap或image_icon或image_cursor
int cxdesired,
int cydesired,
uint fuload // 一般為lr_defaultcolor | lr_createdibsection
);按image的實際尺寸載入:cxdesired程式設計客棧=0,cydesired=0並且fuload不指定lr_defaultsize。
按指定大小載入: cxdesired,cydesired不為0並且fuload不指定lr_defaultsize,image會根據實際大小縮放。
按windows系統預設的icon或cursor大小(一般為32x32)載入icon或cursor:cxdesired=0,cydesired=0, fuload指定lr_defaultsize,image會根據實際大小縮放。
注意: lr_defaultsize只對icon和cursor起作用,對bitmap不起作用。
若從獨立於程式的image檔案(.bmp,.ico)載入,請指定標誌lr_loadfromfile。
按windows系統預設的icon大小載入
hicon hicon = (hicon)::loadimage(
程式設計客棧afxgetinstancehandle(),
makeintresource(idi_icon1),
image_icon,
0, 0,
lr_defaultcolor | lr_createdibsection | lr_defaultsize);
按實際大小載入
hicon hicon = (hicon)::loadimage(
afxgetinstancehandle(),
text("d:\\butterfly.ico"),
image_icon,
0, 0,
lr_defaultcolor | lr_createdibsection | lr_loadfromfile);
按指定大小載入
hbitmap hbitmap = (hbitmap)::loadimage(
null,
text("d:\\001.bmp"),
image_bitmap,
50, 50,
lr_defaultcolor | lr_createdibsection | lr_loadfromfile);
metasploit用法案例
metasploit是一款非常好用的滲透測試工具。其中包含了九百多個exploit 攻擊模組 兩百多個payload 攻擊成功之後要執行的一串 通常用來做遠端控制 是做安全工作必不可少的一款軟體。下面展示乙個利用該工具滲透microsoft xp sp2的乙個過程。1.進入介面 msfconsole...
linux tcpdump 用法案例
下面的例子以抓取網口eth0為例 如果不加 i eth0 是表示抓取所有的介面包括lo 1 抓取包含10.10.10.122的資料報 tcpdump i eth0 vnn host 10.10.10.122 2 抓取包含10.10.10.0 24網段的資料報 tcpdump i eth0 vnn n...
C odr用法案例詳解
the main module.file odr test1.cpp include void module1 print declaration of an exeternal function inline int f1 class a const double c 4.2 constexpr ...