Esempio n. 1
0
LRESULT MainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
   SetupCmdBar();
   SetupRibbonBar();
   SetupToolbar();
   SetupMRUList();
   SetupStatusBar();
   SetupView();

   // register object for message filtering and idle updates
   CMessageLoop* pLoop = _Module.GetMessageLoop();
   ATLASSERT(pLoop != NULL);
   pLoop->AddMessageFilter(this);
   pLoop->AddIdleHandler(this);

   {
      bool bRibbonUI = RunTimeHelper::IsRibbonUIAvailable();
      ShowRibbonUI(bRibbonUI);
      UISetCheck(ID_VIEW_RIBBON, bRibbonUI);
   }

   if (m_cszFilenameOpenAtStart.IsEmpty())
      DoFileNew();
   else
   {
      CString cszTitle = Path(m_cszFilenameOpenAtStart).FilenameAndExt();
      if (DoFileOpen(m_cszFilenameOpenAtStart, cszTitle))
      {
         m_mru.AddToList(m_cszFilenameOpenAtStart);
         m_mru.WriteToRegistry(c_pszSettingsRegkey);
      }
   }

   UIEnable(ID_SCRIPT_RUN, true);
   UIEnable(ID_SCRIPT_STOP, false);

   return 0;
}
Esempio n. 2
0
LRESULT MainFrame::OnFileNew(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
   DoFileNew();

   return 0;
}
Esempio n. 3
0
void wxExFile::FileNew(const wxExFileName& filename)
{
  Assign(filename);
  DoFileNew();
}