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

  • 相关阅读:
    SQL Server(00):分析函数
    SQL Server(00):序列SEQUENCE
    .NET Standard 、.NET Core、 .NET Framework的区别
    电脑音频播放器 foobar2000
    JavaScript:highcharts图表
    SQL Server(00):带有OUTPUT的INSERT,DELETE,UPDATE
    [开发笔记]-js判断用户的浏览设备是移动设备还是PC
    [开发笔记]-获取天气数据接口
    [开发笔记]-控制Windows Service服务运行
    C#程序调用cmd执行命令
  • 原文地址:https://www.cnblogs.com/gosteps/p/3331404.html
Copyright © 2011-2022 走看看