• 2024-08-20启动按ctrl键 屏蔽自动隐藏功能
      [DllImport("User32.dll",EntryPoint="ShowWindow")]privatestaticexternboolShowWindow(IntPtrhWnd,inttype);   #region启动按ctrl键屏蔽自动隐藏功能    boolforceUpdate=(Control.ModifierKeys&Keys.Control)==Keys.Cont
  • 2024-01-24MFC 简单的界面切换测试主窗体类似控件的方式嵌入其他窗体
    ▲类向导->MFC类创建两个子窗体。1。创建两个子窗体。2。属性设置:1)、“Style”选择“Child”;中文版“样式”选择“下层”。2)、“Border”为“None”;中文版“边框”选择“无”。3。主窗体中实例子窗体对象:声明:private:CSubForm1*m_CSubForm1;CSubForm2*m_CSu
  • 2023-08-02隐藏进程
    importctypes#定义WindowsAPI函数importtimeuser32=ctypes.WinDLL("user32")user32.ShowWindow.argtypes=[ctypes.c_void_p,ctypes.c_int]user32.ShowWindow.restype=ctypes.c_int#隐藏进程函数defhide_process():#获取当前进程的窗口句柄hwnd
  • 2023-06-18CWnd* pBtn5->ShowWindow(0);
    voidCChangeSizeView::OnButton4(){ //TODO:Addyourcontrolnotificationhandlercodehere CWnd*pBtn5=this->GetDlgItem(IDC_BUTTON5); pBtn5->ShowWindow(0);}voidCChangeSizeView::OnButton6(){ //TODO:Addyourcontrolnotificationhandl
  • 2023-01-17win32 ShowWindow
    ///这个函数调用之后就会给系统置于maximize状态,如果我们没有调用其他的方法回复状态,我们就先对窗口的大小进行设置后,随后不能进行再次进行最大化,调用下面的ShowWindow(hW
  • 2022-12-22ShowWindow不起作用
    今天发现隐藏控件的ShowWindow不起作用,找了半天才发现是重写了OnEraseBkgnd,没有重绘背景。去掉returntrue;即可。BOOLCIndexDlg::OnEraseBkgnd(CDC*pDC){//returntru
  • 2022-12-22子Tab中按钮进入其他子tab页面
    #include"MyTabDlg.h"voidCPara1::OnBnClickedButton1(){ShowWindow(false);((CMyTabDlg*)(GetParent()->GetParent()))->m_page2.ShowWindow(true);((CTabCtrl*)
  • 2022-11-25MFC-ShowWindow控件的显示与隐藏
     CWnd*pWnd=GetDlgItem(IDC_BUTTON2);pWnd->ShowWindow(SW_HIDE);//隐藏控件pWnd->ShowWindow(SW_SHOW);//显示控件