vbs怎样禁掉关闭键

/
// ToolBarEx.h : header file
#ifndef __TOOLBAREX_H__
#define __TOOLBAREX_H__
#if _MSC_VER = 1000
#pragma once
#endif // _MSC_VER = 1000
class CToolBarEx : public CToolBar
{
 DECLARE_DYNAMIC(CToolBarEx)
 // Construction
 public:
  CToolBarEx();
  // Attributes
 protected:
  BOOL m_bMenuRemoved;
  // Operations
 public:
  // Overrides
  // ClassWizard generated virtual function overrides
  //{{AFX_VIRTUAL(CToolBarEx)
  //}}AFX_VIRTUAL
  // Implementation
 public:
  virtual ~CToolBarEx();
  // Generated message map functions
 protected:
  //{{AFX_MSG(CToolBarEx)
   afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
  //}}AFX_MSG
  DECLARE_MESSAGE_MAP()
};
#endif // __TOOLBAREX_H__
ToolBarEx.cpp : implementation file
#include StdAfx.h
#include ToolBarEx.h
#include afxpriv.h
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CToolBarEx::CToolBarEx()
{
 // TODO: add construction code here.
 m_bMenuRemoved = FALSE;
}
CToolBarEx::~CToolBarEx()
{
 // TODO: add destruction code here.
}
IMPLEMENT_DYNAMIC(CToolBarEx, CToolBar)
BEGIN_MESSAGE_MAP(CToolBarEx, CToolBar)
//{{AFX_MSG_MAP(CToolBarEx)
ON_WM_WINDOWPOSCHANGED()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
// CToolBarEx message handlers
void CToolBarEx::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos)
{
 CToolBar::OnWindowPosChanged(lpwndpos);
 // should only be called once, when floated.
 if( IsFloating() )
 {
  if( m_pDockBar GetParent();
   if( pParent-IsKindOf(RUNTIME_CLASS(CMiniFrameWnd)))
   {
    pParent-ModifyStyle( WS_SYSMENU, 0, 0 );
    m_bMenuRemoved = TRUE;
   }
  }
 }
 else if( m_bMenuRemoved ) {
  m_bMenuRemoved = FALSE;
 }
}

继续阅读
  • 本文由 发表于 2021年8月25日18:40:57
  • 转载请务必保留本文链接:https://www.secode.org.cn/hyzx/316073/

发表评论