/////////////////////////////////////////////////////////////////////////////
// Name: mfctest.cpp
-// Purpose: Sample to demonstrate mixing MFC and wxWindows code
+// Purpose: Sample to demonstrate mixing MFC and wxWidgets code
// Author: Julian Smart
// Id: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-// This sample pops up an initial wxWindows frame, with a menu item
+// This sample pops up an initial wxWidgets frame, with a menu item
// that allows a new MFC window to be created. Note that CDummyWindow
-// is a class that allows a wxWindows window to be seen as a CWnd
+// is a class that allows a wxWidgets window to be seen as a CWnd
// for the purposes of specifying a valid main window to the
// MFC initialisation.
//
// You can easily modify this code so that an MFC window pops up
-// initially as the main frame, and allows wxWindows frames to be
+// initially as the main frame, and allows wxWidgets frames to be
// created subsequently.
//
// (1) Make MyApp::OnInit not create a main window.
// off some debugging features and also removes the windows.h inclusion
// in wxprec.h (MFC headers don't like this to have been included previously).
// Set to 'Use MFC in a shared DLL' or add _AFXDLL to preprocessor settings.
-// Then recompile wxWindows and this sample.
+// Then recompile wxWidgets and this sample.
//
// (2) I can't get the sample to link and run using a static MFC library, only the DLL
// version. Perhaps someone else is a wizard at working out the required settings
// in the wxWin library and the sample; then debugging the assert problem may be
// easier.
//
-// (3) Compiling wxWindows in DLL mode currently includes windows.h, so you must only
-// try linking wxWindows statically.
+// (3) Compiling wxWidgets in DLL mode currently includes windows.h, so you must only
+// try linking wxWidgets statically.
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#include "wx/wx.h"
-#if defined(_WINDOWS_) || !wxUSE_MFC
-#error Sorry, you need to edit include/wx/msw/setup.h, set wxUSE_MFC to 1, and recompile.
+#if !wxUSE_MFC
+#error "Sorry, you need to edit include/wx/msw/setup.h, set wxUSE_MFC to 1, and recompile the library."
#endif
#ifdef new
//
CTheApp theApp;
-// wxWindows elements
+// wxWidgets elements
// Define a new application type
class MyApp: public wxApp
void CMainWindow::OnTest()
{
- wxMessageBox("This is a wxWindows message box.\nWe're about to create a new wxWindows frame.", "wxWindows", wxOK);
+ wxMessageBox("This is a wxWidgets message box.\nWe're about to create a new wxWidgets frame.", "wxWidgets", wxOK);
wxGetApp().CreateFrame();
}
m_pMainWnd->ShowWindow( m_nCmdShow );
m_pMainWnd->UpdateWindow();
#else
- // Demonstrate creation of an initial wxWindows main window.
- // Wrap wxWindows window in a dummy MFC window and
+ // Demonstrate creation of an initial wxWidgets main window.
+ // Wrap wxWidgets window in a dummy MFC window and
// make the main window.
if (wxTheApp && wxTheApp->GetTopWindow())
{
return CWinApp::ExitInstance();
}
-// Override this to provide wxWindows message loop
+// Override this to provide wxWidgets message loop
// compatibility
BOOL CTheApp::PreTranslateMessage(MSG *msg)
}
/*********************************************************************
-* wxWindows elements
+* wxWidgets elements
********************************************************************/
bool MyApp::OnInit(void)
MyChild *subframe = new MyChild(NULL, "Canvas Frame", wxPoint(10, 10), wxSize(300, 300),
wxDEFAULT_FRAME_STYLE);
- subframe->SetTitle("wxWindows canvas frame");
+ subframe->SetTitle("wxWidgets canvas frame");
// Give it a status line
subframe->CreateStatusBar();
}
// Dummy MFC window for specifying a valid main window to MFC, using
-// a wxWindows HWND.
+// a wxWidgets HWND.
CDummyWindow::CDummyWindow(HWND hWnd):CWnd()
{
Attach(hWnd);