?? allfunction.cpp
字號:
// AllFunction.cpp : 實現(xiàn)文件
//
#include "stdafx.h"
#include "MyInterface.h"
#include "AllFunction.h"
#include ".\allfunction.h"
// CAllFunction 對話框
IMPLEMENT_DYNAMIC(CAllFunction, CDialog)
CAllFunction::CAllFunction(CWnd* pParent /*=NULL*/)
: CDialog(CAllFunction::IDD, pParent)
{
}
CAllFunction::~CAllFunction()
{
}
void CAllFunction::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_TAB, m_Tab);
}
BEGIN_MESSAGE_MAP(CAllFunction, CDialog)
ON_WM_SHOWWINDOW()
ON_NOTIFY(TCN_SELCHANGE, IDC_TAB, OnTcnSelchangeTab)
ON_NOTIFY(TCN_SELCHANGING, IDC_TAB, OnTcnSelchangingTab)
ON_WM_MOVE()
END_MESSAGE_MAP()
// CAllFunction 消息處理程序
void CAllFunction::OnShowWindow(BOOL bShow, UINT nStatus)
{
CDialog::OnShowWindow(bShow, nStatus);
// TODO: 在此處添加消息處理程序代碼
if(bShow)
{
tabSearch.Create(IDD_TABSEARCH,CWnd::FromHandle(::GetDlgItem(this->m_hWnd,IDC_TAB)));
tabSearch.ShowWindow(SW_SHOW);
tabNothing.Create(IDD_DIALOG1,CWnd::FromHandle(::GetDlgItem(this->m_hWnd,IDC_TAB)));
tabNothing.ShowWindow(SW_HIDE);
//CRect rect;
//::GetClientRect(::GetDlgItem(this->m_hWnd,IDC_TAB),&rect);
////ClientToScreen(rect);
//rect.top=rect.top+4;
//rect.left=rect.left+4;
//rect.right=rect.right-4;
//rect.bottom=rect.bottom-4;
//tabNothing.MoveWindow(rect.left,rect.top,rect.Width(),rect.Height());
//tabSearch.MoveWindow(rect.left,rect.top,rect.Width(),rect.Height());
}
}
void CAllFunction::OnTcnSelchangeTab(NMHDR *pNMHDR, LRESULT *pResult)
{
// TODO: 在此添加控件通知處理程序代碼
switch(m_Tab.GetCurSel())
{
case 0: tabSearch.ShowWindow(SW_SHOW);
break;
case 1: tabNothing.ShowWindow(SW_SHOW);
break;
}
*pResult = 0;
}
void CAllFunction::OnTcnSelchangingTab(NMHDR *pNMHDR, LRESULT *pResult)
{
// TODO: 在此添加控件通知處理程序代碼
switch(m_Tab.GetCurSel())
{
case 0: tabSearch.ShowWindow(SW_HIDE);
break;
case 1: tabNothing.ShowWindow(SW_HIDE);
break;
}
*pResult = 0;
}
BOOL CAllFunction::OnInitDialog()
{
CDialog::OnInitDialog();
TC_ITEM theTC_ITEM;
theTC_ITEM.mask=TCIF_TEXT;
theTC_ITEM.pszText="圖像搜索";
m_Tab.InsertItem(0,&theTC_ITEM);
theTC_ITEM.pszText="無操作";
m_Tab.InsertItem(1,&theTC_ITEM);
// TODO: 在此添加額外的初始化
return TRUE; // return TRUE unless you set the focus to a control
// 異常: OCX 屬性頁應(yīng)返回 FALSE
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -