cmenu menu;
menu.loadmenu(idr_mnu_tray); // 2
cmenu* pmenu=menu.getsubmenu(0);
cpoint point;
getcursorpos(&point);
setforegroundwindow(); //解決托盤選單不消失
pmenu->trackpopupmenu(tpm_leftalign,point.x,point.y,this);
postmessage(wm_null,0,0); //解決托盤選單不消失
sdk裡寫得很清楚地
hide example
setforegroundwindow(hdlg);
// display the menu
trackpopupmenu( hsubmenu,
tpm_rightbutton,
pt.x,
pt.y,
0, hdlg,
null);
postmessage(hdlg, wm_null, 0, 0);
解決MSDN與VC6關聯
1.將下面內容儲存reg檔案匯入登錄檔,我的vc6安裝路徑為d program files microsoft visual studio 如果不同,你可自行修改,相信你有這個能力!windows registry editor version 5.00 hkey current user soft...
VC6中選單的響應訊息
關鍵技術 級聯選單的建立主要是如何設定選單項的屬性,如果將選單項的屬性設定為poimip則選單項的右側就會出 現三角號。選單屬性設定如圖 a b 所示。圖 a 級聯選單 圖 b 勾選 pop up 屬性 設計過程 1 在工作區視窗中選擇資源檢視 resourceview 用滑鼠右鍵單擊乙個節點,在彈...
VC6無法開啟檔案問題解決
裝了vc6,又裝了visio 2007,結果vc就不能開啟檔案,或者新增檔案了,會彈出錯誤。一直都認為是vc與visio衝突的原因,都是解除安裝了visio,要畫圖的時候再裝上,相當麻煩。找了辦法,解決此問題。x program files microsoft visual studio commo...