trackpopupmenu

本文详细介绍了 TrackPopupMenu 函数的功能及使用方法。该函数能在指定位置显示并跟踪快捷菜单的选择,适用于屏幕任意位置。文中解释了函数参数的意义,如快捷菜单的句柄、位置标志等,并说明了不同版本的操作系统的支持情况。
  name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-5572165936844014&dt=1193665761703&lmt=1193665780&format=336x280_as&output=html&correlator=1193665761687&url=http%3A%2F%2Fwww.codeguru.cn%2Fpublic%2Fiframe%2Fwinapiiframe.htm&color_bg=FFFFFF&color_text=000000&color_link=000000&color_url=FFFFFF&color_border=FFFFFF&ad_type=text&ga_vid=1285758818.1193665762&ga_sid=1193665762&ga_hid=111695597&flash=9&u_h=768&u_w=1024&u_ah=740&u_aw=1024&u_cd=32&u_tz=480&u_his=8&u_java=true" frameborder="0" width="336" scrolling="no" height="280" allowtransparency="allowtransparency">     函数功能:该函数在指定位置显示快捷菜单,并跟踪菜单项的选择。快捷菜单可出现在屏幕上的任何位置。

    函数原型:BOOL TrackPopupMenu(HMENU hMenu,UINT uFlags,int x,int y,int nReserved,HWND hWnd,CONST RECT”prcRect);

    参数

    hMenu:被显示的快捷菜单的句柄。此句柄可为调用CreatePopupMenu创建的新快捷菜单的句柄,也可以为调用GetSubMenu取得的与一个已存在菜单项相联系的子菜单的句柄。

    uFlags:一种指定功能选项的位标志。用下列标志位之一来确定函数如何水平放置快捷菜单:

    TPM_CENTERALLGN:若设置此标志,函数将按参数x指定的坐标水平居中放置快捷菜单。

    TPM_LEFTALLGN:若设置此标志,函数使快捷菜单的左边界与由参数X指定的坐标对齐。

    TPM_RIGHTALLGN:若设置此标志,函数使快捷菜单的右边界与由参数X指定的坐标对齐。

    用下列标志位之一来确定函数如何垂直放置快捷菜单:

    TPM_BOTTOMALLGN:若设置此标志,函数使快捷菜单的下边界与由参数y指定的坐标对齐。

    TPM_TOPALLGN:若设置此标志,函数使快捷菜单的上边界与由参数y指定的坐标对齐。

    TPM_VCENTERALLGN;若设置此标志,函数将按参数y指定的坐标垂直居中放置快捷菜单

    用下列标志位之一来确定在菜单没有父窗口的情况下用户的选择:

    TPM_NONOTIFY:若设置此标志,当用户单击菜单项时函数不发送通知消息。

    TPM_RETURNCMD;若设置此标志;函数将用户所选菜单项的标识符返回到返回值里。

    用下列标志位之一来确定在快捷菜单跟踪哪一个鼠标键:

    TPM_LEFTBUTTON:若设置此标志,用户只能用鼠标左键选择菜单项。

    TPM_RIGHTBUTTON:若设置此标志,用户能用鼠标左、右键选择菜单项。

    X:在屏幕坐标下,快捷菜单的水平位置。

    Y:在屏幕坐标下,快捷菜单的垂直位置。

    NReserved:保留值,必须为零。

    HWnd:拥有快捷菜单的窗口的句柄。此窗口接收来自菜单的所有消息。函数返回前,此窗口不接受来自菜单的WM_COMMAND消息。

    如果在参数uFlags里指定了TPM_NONOTIFY值,此函数不向hWnd标识的窗口发消息。 但必须给hWnd里传一个窗口句柄,可以是应用程序里的任一个窗口句柄。

    PrcRect:未用。

    返回值:如果在参数uFlags里指定了TPM_RETURNCMD值,则返回值是用户选择的菜单项的标识符。如果用户未作选择就取消了菜单或发生了错误,则退回值是零。如果没在参数uFlags里指定TPM_RETURNCMD值,若函数调用成功,返回非零值,若函数调用失败,返回零。若想获得更多的错误信息,清调用GetLastError

    函数:

    备注:Windows CE不支持参数uFlags取下列值:TPM_NONOTIFY;TPM_LEFTBUTTON;TPM_RIGHTBUTTON。

    速查:Windows NT:3.1及以上版本;Windows:95及以上版本;Windows CE:1.0及以上版本;头文件:winuser.h;输入库:user32.lib。

// ToolBoxBar.cpp: implementation of the CToolBoxBar class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "ToolBoxBar.h" #include "resource.h" #include "grouptybase.h" #include "Sp_drawView.h" #include "sp_draw.h" #include "group_doc.h" #include "MainFrm.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif const COLORREF clrList = RGB (0, 204, 153); ///////////////////////////////////////////////////////////////////////////// // CToolBoxBar BEGIN_MESSAGE_MAP(CToolBoxBar, CBCGPDockingControlBar) //{{AFX_MSG_MAP(CToolBoxBar) ON_WM_CREATE() ON_WM_SIZE() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CToolBoxBar construction/destruction CToolBoxBar::CToolBoxBar() { // TODO: add one-time construction code here m_grouptype.Empty(); } CToolBoxBar::~CToolBoxBar() { } ///////////////////////////////////////////////////////////////////////////// // CWorkspaceBar message handlers int CToolBoxBar::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CBCGPDockingControlBar::OnCreate(lpCreateStruct) == -1) return -1; CRect rectDummy; rectDummy.SetRectEmpty (); // m_images.Create (IDB_SHORTCUTS, 32, 0, RGB (255, 0, 255)); // CBitmap bmpIcons; // bmpIcons.LoadBitmap (IDB_SHORTCUTS); m_images.Create (48, 64, ILC_COLOR32 | ILC_MASK, 0, 10); m_images.SetImageCount(10); // m_images.Add (&bmpIcons, RGB (255, 0, 255)); // Create CListCtrl windows. // TODO: create your own tab windows here: const DWORD dwStyle = LVS_ICON | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL; m_wndList.Create (dwStyle, CRect (0, 0, 0, 0), this, (UINT)-1); m_wndList.SetBkColor (clrList); m_wndList.SetTextBkColor (clrList); m_wndList.m_pBar=this; // Setup list content: m_wndList.SetImageList (&m_images, LVSIL_NORMAL); //m_wndList.InsertItem (0,_T("One"),0); //m_wndList.InsertItem (1,_T("Two"),1); //m_wndList.InsertItem (2,_T("Three"),2); //m_wndList.InsertItem (3,_T("Four"),3); return 0; } void CToolBoxBar::OnSize(UINT nType, int cx, int cy) { CBCGPDockingControlBar::OnSize(nType, cx, cy); // List control should cover a whole client area: m_wndList.SetWindowPos (NULL, 0, 0, cx, cy, SWP_NOACTIVATE | SWP_NOZORDER); } bool SaveBitmapToFile(HBITMAP hBitmap , CString lpFileName) { HDC hDC; //设备描述表 int iBits; //当前显示分辨率下每个像素所占字节数 WORD wBitCount=16; //位图中每个像素所占字节数 DWORD dwPaletteSize=0, //定义调色板大小, 位图中像素字节大小 ,位图文件大小 , 写入文件字节数 dwBmBitsSize, dwDIBSize, dwWritten; BITMAP Bitmap; BITMAPFILEHEADER bmfHdr; //位图属性结构 BITMAPINFOHEADER bi; //位图文件头结构 LPBITMAPINFOHEADER lpbi; //位图信息头结构 HANDLE fh, hDib, hPal,hOldPal=NULL; //指向位图信息头结构,定义文件,分配内存句柄,调色板句柄 //计算位图文件每个像素所占字节数 hDC = CreateDC("DISPLAY",NULL,NULL,NULL); iBits = GetDeviceCaps(hDC, BITSPIXEL) * GetDeviceCaps(hDC, PLANES); DeleteDC(hDC); if (iBits <= 1) wBitCount = 1; else if (iBits <= 4) wBitCount = 4; else if (iBits <= 8) wBitCount = 8; else if (iBits <= 24) wBitCount = 24; //计算调色板大小 if (wBitCount <= 8) dwPaletteSize = (1 << wBitCount) *sizeof(RGBQUAD); //设置位图信息头结构 GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&Bitmap); bi.biSize = sizeof(BITMAPINFOHEADER); bi.biWidth = Bitmap.bmWidth; bi.biHeight = Bitmap.bmHeight; bi.biPlanes = 1; bi.biBitCount = wBitCount; bi.biCompression = BI_RGB; bi.biSizeImage = 0; bi.biXPelsPerMeter = 0; bi.biYPelsPerMeter = 0; bi.biClrUsed = 0; bi.biClrImportant = 0; dwBmBitsSize = ((Bitmap.bmWidth * wBitCount+31)/32)* 4 *Bitmap.bmHeight ; //为位图内容分配内存 hDib = GlobalAlloc(GHND,dwBmBitsSize+ dwPaletteSize+sizeof(BITMAPINFOHEADER)); lpbi = (LPBITMAPINFOHEADER)GlobalLock(hDib); *lpbi = bi; // 处理调色板 hPal = GetStockObject(DEFAULT_PALETTE); if (hPal) { hDC = ::GetDC(NULL); hOldPal = SelectPalette(hDC, (HPALETTE)hPal, FALSE); RealizePalette(hDC); } // 获取该调色板下新的像素值 GetDIBits(hDC, hBitmap, 0, (UINT) Bitmap.bmHeight, (LPSTR)lpbi + sizeof(BITMAPINFOHEADER)+dwPaletteSize, (LPBITMAPINFO)lpbi, DIB_RGB_COLORS); //恢复调色板 if (hOldPal) { SelectPalette(hDC, (HPALETTE)hOldPal, TRUE); RealizePalette(hDC); DeleteDC(hDC); } //创建位图文件 fh = CreateFile(lpFileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL); if (fh == INVALID_HANDLE_VALUE) return FALSE; // 设置位图文件头 bmfHdr.bfType = 0x4D42; // "BM" dwDIBSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + dwPaletteSize + dwBmBitsSize; bmfHdr.bfSize = dwDIBSize; bmfHdr.bfReserved1 = 0; bmfHdr.bfReserved2 = 0; bmfHdr.bfOffBits = (DWORD)sizeof(BITMAPFILEHEADER) + (DWORD)sizeof(BITMAPINFOHEADER) + dwPaletteSize; // 写入位图文件头 WriteFile(fh, (LPSTR)&bmfHdr, sizeof(BITMAPFILEHEADER), &dwWritten, NULL); // 写入位图文件其余内容 WriteFile(fh, (LPSTR)lpbi, dwDIBSize, &dwWritten, NULL); //消除内存分配 GlobalUnlock(hDib); GlobalFree(hDib); CloseHandle(fh); return TRUE; } void CToolBoxBar::UpdateData() { m_images.SetImageCount(0); m_wndList.DeleteAllItems();//清空 CString filepath; filepath=m_dir+"*.grp"; CFileFind ff; BOOL res = ff.FindFile(filepath); float vX0,vX1,vY0,vY1; int w=48,h=64; int num=0; while(res) { res = ff.FindNextFile(); if((!ff.IsDirectory()) && (!ff.IsDots())) { CString strFile = ff.GetFilePath(); CString strTitle=ff.GetFileTitle(); CGroupTyBase grp(strFile); CDC dc; HDC hdc = ::GetWindowDC(this->GetSafeHwnd()); dc.Attach(hdc); CDC memDC;//创建内存DC memDC.CreateCompatibleDC(&dc); CBitmap bm;//位图 CSize sz(w, h); bm.CreateCompatibleBitmap(&dc, sz.cx, sz.cy); CBitmap * oldbm = memDC.SelectObject(&bm); CBrush brush;//绘制背景 brush.CreateSolidBrush(clrList); CRect rt; rt.SetRect(0,0,sz.cx,sz.cy); memDC.FillRect(&rt,&brush); grp.GetGroupRect(&vX0,&vY0,&vX1,&vY1); CDrawInfoData drawinfo(vX0,vY0,vX1,vY1,h,w); grp.DrawGroup(&memDC,&drawinfo);//文件内容绘制到缩略图。 //SaveBitmapToFile((HBITMAP)(bm->m_hObject),m_dir+strTitle+".bmp"); //m_images.Add(bm,RGB (255, 0, 255)); //m_images.Replace(num,bm,NULL); memDC.SelectObject(oldbm); //bm->DeleteObject(); memDC.DeleteDC(); dc.DeleteDC(); //m_images.Replace(num,bm,NULL); m_images.Add(&bm,RGB (255, 0, 255)); //SaveBitmapToFile((HBITMAP)(bm->m_hObject),m_dir+strTitle+".bmp"); //m_wndList.InsertItem (num,strTitle,num); num++; } } //m_wndList.SetImageList (&m_images, LVSIL_NORMAL); //CString outstr; //outstr.Format("count=%d",m_images.GetImageCount()); //TRACE(outstr); res = ff.FindFile(filepath); num=0; while(res) { res = ff.FindNextFile(); if((!ff.IsDirectory()) && (!ff.IsDots())) { CString strTitle=ff.GetFileTitle(); m_wndList.InsertItem (num,strTitle,num); num++; } } } ///////////////////////////////////////////////////////////////////////////// // CToolBoxList CToolBoxList::CToolBoxList() { m_nDragIndex=-1; m_bDragging=false; m_pBar=NULL; } CToolBoxList::~CToolBoxList() { } BEGIN_MESSAGE_MAP(CToolBoxList, CListCtrl) //{{AFX_MSG_MAP(CToolBoxList) ON_WM_ERASEBKGND() //}}AFX_MSG_MAP ON_NOTIFY_REFLECT(LVN_BEGINDRAG, OnLvnBegindrag) ON_WM_MOUSEMOVE() ON_WM_LBUTTONUP() ON_NOTIFY_REFLECT(NM_DBLCLK, OnNMDblclk) ON_COMMAND(ID_GROUP_NEW, OnGroupNew) ON_UPDATE_COMMAND_UI(ID_GROUP_NEW, OnUpdateGroupNew) ON_COMMAND(ID_GROUP_DEL, OnGroupDel) ON_UPDATE_COMMAND_UI(ID_GROUP_DEL, OnUpdateGroupDel) ON_WM_CONTEXTMENU() ON_COMMAND(ID_GROUP_MODIFY, OnGroupModify) ON_UPDATE_COMMAND_UI(ID_GROUP_MODIFY, OnUpdateGroupModify) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CToolBoxList message handlers BOOL CToolBoxList::OnEraseBkgnd(CDC* pDC) { CRect rectClient; GetClientRect (rectClient); pDC->FillSolidRect (rectClient, clrList); return TRUE; } void CToolBoxList::OnLvnBegindrag(NMHDR *pNMHDR, LRESULT *pResult) { LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR); // TODO: 在此添加控件通知处理程序代码 if(GetSelectedCount() > 1) return; m_nDragIndex = pNMLV->iItem; CImageList* pImageList=GetImageList(LVSIL_NORMAL); POINT pt; GetItemPosition(m_nDragIndex, &pt); pImageList->BeginDrag(m_nDragIndex,CPoint(-8,-10)); pImageList->DragEnter(GetDesktopWindow(),pNMLV->ptAction); m_bDragging=true; SetCapture (); *pResult = 0; } void CToolBoxList::OnMouseMove(UINT nFlags, CPoint point) { // TODO: 在此添加消息处理程序代码和/或调用默认值 if (m_bDragging) { //// Move the drag image CPoint pt(point); //get our current mouse coordinates ClientToScreen(&pt); //convert to screen coordinates CImageList* pImageList=GetImageList(LVSIL_NORMAL); pImageList->DragMove(pt); //move the drag image to those coordinates } CListCtrl::OnMouseMove(nFlags, point); } void CToolBoxList::OnLButtonUp(UINT nFlags, CPoint point) { // TODO: 在此添加消息处理程序代码和/或调用默认值 if (m_bDragging) { // Release mouse capture, so that other controls can get control/messages ReleaseCapture (); // Note that we are NOT in a drag operation m_bDragging = FALSE; CImageList* pImageList=GetImageList(LVSIL_NORMAL); // End dragging image pImageList->DragLeave (GetDesktopWindow ()); pImageList->EndDrag (); CPoint pt (point); //Get current mouse coordinates ClientToScreen (&pt); //Convert to screen coordinates // Get the CWnd pointer of the window that is under the mouse cursor CWnd* pDropWnd = WindowFromPoint (pt); ASSERT (pDropWnd); //make sure we have a window pointer // If window is CListCtrl, we perform the drop if (pDropWnd->IsKindOf (RUNTIME_CLASS (CTysView))) { tagDragDropInfo* pRec= new tagDragDropInfo; memset(pRec,0,sizeof(tagDragDropInfo)); CString filepath; filepath.Format("%s%s.grp",m_pBar->m_dir,GetItemText(m_nDragIndex,0)); strcpy(pRec->filepath,filepath); pRec->posX=pt.x; pRec->posY=pt.y; pDropWnd->SendMessage(CM_DRAGDROP,0,(LPARAM)pRec); } } CListCtrl::OnLButtonUp(nFlags, point); } void CToolBoxList::OnNMDblclk(NMHDR *pNMHDR, LRESULT *pResult) { // TODO: 在此添加控件通知处理程序代码 LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR); int index = pNMLV->iItem; if(GetItemText(index,0) == "") return; CString filepath; filepath.Format("%s%s.grp",m_pBar->m_dir,GetItemText(index,0)); CGroup_Doc* pDoc=NULL; POSITION pos=theApp.m_GroupTempDoc->GetFirstDocPosition(); while (pos!=NULL) { pDoc=(CGroup_Doc*)theApp.m_GroupTempDoc->GetNextDoc(pos); if (pDoc==NULL) continue; CString str=pDoc->GetPathName(); if (stricmp(str,filepath)==0) { POSITION pos2=pDoc->GetFirstViewPosition( ); if (pos2!=NULL) { CView* pView =pDoc->GetNextView(pos2); if (pView!=NULL) pView->GetParentFrame()->ActivateFrame(); return; } } } CSp_drawApp* pApp=(CSp_drawApp*)AfxGetApp(); if (!pApp->GetPermit()) { return; } pDoc=(CGroup_Doc* )theApp.m_GroupTempDoc->OpenDocumentFile(NULL); if (pDoc==NULL) { assert(false); AfxMessageBox("组合图元无法打开!"); return; } pDoc->OpenGrpFile(filepath); *pResult = 0; } void CToolBoxBar::PostNcDestroy() { // TODO: 在此添加专用代码和/或调用基类 //if (m_pBarList!=NULL) //{ // POSITION pos=m_pBarList->Find(this); // if (pos!=NULL) // m_pBarList->RemoveAt(pos); //} CBCGPDockingControlBar::PostNcDestroy(); } BOOL CToolBoxBar::DestroyWindow() { // TODO: 在此添加专用代码和/或调用基类 CMainFrame* pFrame=(CMainFrame*)AfxGetMainWnd(); if (pFrame!=NULL) { POSITION pos=pFrame->m_BarList.Find(this); if (pos!=NULL) return false; else return true; } return CBCGPDockingControlBar::DestroyWindow(); } void CToolBoxList::OnGroupNew() { // TODO: 在此添加命令处理程序代码 CSp_drawApp* pApp=(CSp_drawApp*)AfxGetApp(); //if (!pApp->GetPermit()) //{ // return; //} CGroup_Doc* pDoc=NULL; pDoc=(CGroup_Doc* )theApp.m_GroupTempDoc->OpenDocumentFile(NULL); if (pDoc==NULL) { assert(false); AfxMessageBox("组合图元无法打开!"); return; } if (pDoc->NewGrpFile(m_pBar->m_grouptype)==false) { POSITION pos=pDoc->GetFirstViewPosition(); while (pos!=NULL) { CView * pView= pDoc->GetNextView(pos); CFrameWnd* pWnd=pView->GetParentFrame(); //pWnd->CloseWindow(); pWnd->DestroyWindow(); //pView->DestroyWindow(); //pView->CloseWindow(); } //pDoc->DeleteContents(); } } void CToolBoxList::OnUpdateGroupNew(CCmdUI *pCmdUI) { // TODO: 在此添加命令更新用户界面处理程序代码 pCmdUI->Enable(); } void CToolBoxList::OnGroupDel() { // TODO: 在此添加命令处理程序代码 CString filepath; // filepath.Format("%s%s.grp",m_pBar->m_dir,GetItemText(index,0)); POSITION pos =GetFirstSelectedItemPosition(); int hItem; if (pos!=NULL) hItem=GetNextSelectedItem(pos); else return; CSp_drawApp* pApp=(CSp_drawApp*)AfxGetApp(); if (!pApp->GetPermit()) { return; } CString str; str.Format("确定要删除类型[%s] 中的组合模版:%s",m_pBar->m_grouptype,GetItemText(hItem,0)); if (AfxMessageBox(str,MB_OKCANCEL)==IDOK) { filepath.Format("%s%s.grp",m_pBar->m_dir,GetItemText(hItem,0)); DeleteFile(filepath); } CMainFrame* pFrame=(CMainFrame*)AfxGetMainWnd(); if (pFrame!=NULL) pFrame->UpdateBarList(); } void CToolBoxList::OnUpdateGroupDel(CCmdUI *pCmdUI) { // TODO: 在此添加命令更新用户界面处理程序代码 POSITION pos =GetFirstSelectedItemPosition(); if (pos!=NULL) { pCmdUI->Enable(true); } else pCmdUI->Enable(false); } void CToolBoxList::OnContextMenu(CWnd* pWnd, CPoint point) { // TODO: 在此添加消息处理程序代码 if ((point.x<0)||(point.y<0)) return; CMenu menu; BOOL bSucc=menu.CreatePopupMenu(); if (!bSucc) return; OnUpdataPopMenu(&menu); menu.TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON,point.x,point.y,this); menu.DestroyMenu(); } void CToolBoxList::OnUpdataPopMenu(CMenu *pMenu) { pMenu->AppendMenu(MF_ENABLED|MF_STRING,ID_GROUP_NEW,"新增"); POSITION pos =GetFirstSelectedItemPosition(); if (pos!=NULL) { pMenu->AppendMenu(MF_ENABLED|MF_STRING,ID_GROUP_DEL,"删除"); pMenu->AppendMenu(MF_ENABLED|MF_STRING,ID_GROUP_MODIFY,"修改"); } } void CToolBoxList::OnGroupModify() { // TODO: 在此添加命令处理程序代码 CSp_drawApp* pApp=(CSp_drawApp*)AfxGetApp(); if (!pApp->GetPermit()) { return; } POSITION pos =GetFirstSelectedItemPosition(); int index; if (pos!=NULL) index=GetNextSelectedItem(pos); else return; CString filepath; filepath.Format("%s%s.grp",m_pBar->m_dir,GetItemText(index,0)); CGroup_Doc* pDoc=NULL; pos=theApp.m_GroupTempDoc->GetFirstDocPosition(); while (pos!=NULL) { pDoc=(CGroup_Doc*)theApp.m_GroupTempDoc->GetNextDoc(pos); if (pDoc==NULL) continue; CString str=pDoc->GetPathName(); if (stricmp(str,filepath)==0) { POSITION pos2=pDoc->GetFirstViewPosition( ); if (pos2!=NULL) { CView* pView =pDoc->GetNextView(pos2); if (pView!=NULL) pView->GetParentFrame()->ActivateFrame(); return; } } } pDoc=(CGroup_Doc* )theApp.m_GroupTempDoc->OpenDocumentFile(NULL); if (pDoc==NULL) { assert(false); AfxMessageBox("组合图元无法打开!"); return; } pDoc->OpenGrpFile(filepath); } void CToolBoxList::OnUpdateGroupModify(CCmdUI *pCmdUI) { // TODO: 在此添加命令更新用户界面处理程序代码 POSITION pos =GetFirstSelectedItemPosition(); if (pos!=NULL) { pCmdUI->Enable(true); } else pCmdUI->Enable(false); }
最新发布
07-17
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值