zoukankan      html  css  js  c++  java
  • vc 常用语句

    1)

    CMainFrame* pmainframe=(CMainFrame*)AfxGetMainWnd();
    CChildFrame *m_finderframe=(CChildFrame*)pmainframe->GetActiveFrame();

    CImageView *m_View=(CImageView*)pmainframe->GetActiveFrame()->GetActiveView();

     CXXXView* pV = (CXXXView*)m_wndSplitter.GetPane(i,j);

    2)

    menu

    1ON_COMMAND(ID_creat_template, Oncreattemplate)     ".cpp"   //BEGIN_MESSAGE_MAP

    2void CMainFrame::Oncreattemplate()    ".cpp"

    3afx_msg void Oncreattemplate();      ".H"    //DECLARE_MESSAGE_MAP()

    button

    1ON_BN_CLICKED(IDC_com_showsource, Oncomshowsource)  ".cpp"   //BEGIN_MESSAGE_MAP

    2void CControlDlg::Oncomshowsource()        ".cpp"              

     3afx_msg void Oncomshowsource();     ".h"   //DECLARE_MESSAGE_MAP()

    3)clw show

    1、BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) ".cpp"     
     //{{AFX_MSG_MAP(CMainFrame)
      //}}AFX_MSG_MAP
    END_MESSAGE_MAP()

    2、 //{{AFX_MSG(CMainFrame)     ".h" 
     //}}AFX_MSG
     DECLARE_MESSAGE_MAP()

     3、// Overrides               ".h" 
     // ClassWizard generated virtual function overrides
     //{{AFX_VIRTUAL(CMainFrame)
     //}}AFX_VIRTUAL

    3)

     CMainFrame* pmainframe=(CMainFrame*)AfxGetMainWnd();

    //CImageView *m_View=(CImageView*)pmainframe->GetActiveFrame()->GetActiveView();

    4)

      str2.Format ("%d",i);
          m_runtime_combo.InsertString(i,(str2));
       m_source_combo.InsertString(i,(str2));

    location: all
    CComboBox* pcom_run =(CComboBox*) GetDlgItem(IDC_COMBO_runtime);
         pcom_run->GetWindowText(str4);

    5)

    CString CBMP::GetExeAbsolutePath()
    {
        char buffer[ MAX_PATH ];
        CString ExePath = "";
        GetModuleFileName( NULL, buffer, MAX_PATH );
        ExePath=CString( buffer );
        ExePath=ExePath.Left(
                    ExePath.ReverseFind( '\' )>ExePath.ReverseFind( '/' )?
                    ExePath.ReverseFind( '\' )+ 1:
                    ExePath.ReverseFind( '/' )+1       
                    );
        return ExePath;
    }

    6) draw Rectangle

     CClientDC dc(pView);

           dc.SetROP2(R2_NOT); //创建一个矩形3
           dc.SelectStockObject(NULL_BRUSH);
           dc.Rectangle(CRect(px,pe));

      

     CClientDC dc(pView);

    CBrush brushBlue(RGB(0, 0, 255));  //set color
       CBrush* pOldBrush = dc.SelectObject(&brushBlue); //set color

          dc.Rectangle(CRect(px,pe));

          dc.SelectObject(pOldBrush);  //set color

  • 相关阅读:
    Windows系统下安装运行Kafka
    Git强制拉取覆盖本地
    Windows Server 2008/2012 计划任务配置执行bat
    Task.Run()任务执行
    Oracle数据重复,只取一条
    Oracle数据库查看表空间是否为自增的
    How to disable Microsoft Compatibility Telemetry
    最新版谷歌浏览器的Flash设置已经不能保存了?
    亲子之间,在于看懂,无关耐心zz
    读懂孩子有方法
  • 原文地址:https://www.cnblogs.com/gosteps/p/3331404.html
Copyright © 2011-2022 走看看