关于傲游的标签

发布时间:2024-05-12 18:38 发布:上海旅游网

问题描述:

在右击标签时经常不小心点到关闭其它标签,想问下有没有办法可以删除“关闭其它标签”项?
紫气东来,因为我经常手误点到关闭其它标签,所以我是想删除“关闭其它标签”项,不是想关闭标签,不过还是谢谢你。

问题解答:

#if !defined(AFX_TOOLMENU_H__E8777520_DE4C_11D3_84C7_0080450EA020__INCLUDED_)
#define AFX_TOOLMENU_H__E8777520_DE4C_11D3_84C7_0080450EA020__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
/*
This is our custom owner drawn menu that shows the hidden tool bar buttons
with optional text
*/
BOOL DestroyMenuData(HMENU hMenu=NULL);

class CToolMenu : public CMenu
{
public:
CToolMenu();

// The toolbar from which the bitmaps/icons have to be extracted
// CToolBar* m_pToolbar;
CImageList * m_pImg;

// Overridables
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);

public:
BOOL DestroyMenu();
virtual ~CToolMenu();

};

/////////////////////////////////////////////////////////////////////////////
把里面的DESTORY MENU一项删除就可以;了啊
////////////////////////////////////////////////////////////////
// Copyright 1998 Paul DiLascia
// If this code works, it was written by Paul DiLascia.
// If not, I don't know who wrote it.
//
#ifndef _SUBCLASSW_H
#define _SUBCLASSW_H

//////////////////
// Generic class to hook messages on behalf of a CWnd.
// Once hooked, all messages go to CSubclassWnd::WindowProc before going
// to the window. Specific subclasses can trap messages and do something.
//
// To use:
//
// * Derive a class from CSubclassWnd.
//
// * Override CSubclassWnd::WindowProc to handle messages. Make sure you call
// CSubclassWnd::WindowProc if you don't handle the message, or your
// window will never get messages. If you write seperate message handlers,
// you can call Default() to pass the message to the window.
//
// * Instantiate your derived class somewhere and call HookWindow(pWnd)
// to hook your window, AFTER it has been created.
// To unhook, call HookWindow(NULL).
//
// This is a very important class, crucial to many of the widgets Window
// widgets implemented in PixieLib. To see how it works, look at the HOOK
// sample program.
//
class CSubclassWnd : public CObject {
public:
DECLARE_DYNAMIC(CSubclassWnd);
CSubclassWnd();
~CSubclassWnd();

// Subclass a window. Hook(NULL) to unhook (automatic on WM_NCDESTROY)
BOOL HookWindow(HWND hwnd);
BOOL HookWindow(CWnd* pWnd) { return HookWindow(pWnd->GetSafeHwnd()); }
BOOL IsHooked() { return m_hWnd!=NULL; }

friend LRESULT CALLBACK HookWndProc(HWND, UINT, WPARAM, LPARAM);
friend class CSubclassWndMap;

#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif

protected:
HWND m_hWnd; // the window hooked
WNDPROC m_pOldWndProc; // ..and original window proc
CSubclassWnd* m_pNext; // next in chain of hooks for this window

// Override this to handle messages in specific handlers
virtual LRESULT WindowProc(UINT msg, WPARAM wp, LPARAM lp);
LRESULT Default(); // call this at the end of handler fns
};

#endif // _SUBCLASSW_H

#if !defined(AFX_TABDROPTARGET_H__93A5A961_EBE6_11D4_9BB1_E3251D198CBF__INCLUDED_)
#define AFX_TABDROPTARGET_H__93A5A961_EBE6_11D4_9BB1_E3251D198CBF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TabDropTarget.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CTabDropTarget document

#include <afxole.h>

class CTabDropTarget : public COleDropTarget
{
public:
CTabDropTarget()
{
ms_pCtl=NULL;
}
BOOL Register(CTabCtrl* pCtrl);
BOOL OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point);
DROPEFFECT OnDragEnter(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
void OnDragLeave(CWnd* pWnd);
DROPEFFECT OnDragOver(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
DROPEFFECT OnDragScroll(CWnd* pWnd, DWORD dwKeyState, CPoint point);

private:
CTabCtrl* ms_pCtl;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TABDROPTARGET_H__93A5A961_EBE6_11D4_9BB1_E3251D198CBF__INCLUDED_)
把DRAGLEAVE (CWnd* pWnd);改成(CWnd* CWnd)

左键直接双击标签,可以达到关闭当前标签的目的,不用按X关闭。

那可以这样,在工具栏,也就是关闭其他标签那个位置,点击鼠标右键,取消系统按钮栏前的勾,即可取消关闭标签的按钮。

热点新闻