\section{\class{wxIndividualLayoutConstraint}}\label{wxindividuallayoutconstraint}
-Objects of this class are stored in the wxIndividualLayoutConstraint class
+Objects of this class are stored in the wxLayoutConstraint class
as one of eight possible constraints that a window can be involved in.
Constraints are initially set to have the relationship wxUnconstrained,
\membersection{wxIndividualLayoutConstraint::PercentOf}
-\func{void}{PercentOf}{\param{wxWindow *}{otherWin}, \param{wxEdge}{ edge}, \param{int}{ margin = 0}}
+\func{void}{PercentOf}{\param{wxWindow *}{otherWin}, \param{wxEdge}{ edge}, \param{int}{ per}}
Constrains this edge or dimension to be to a percentage of the given window, with an
optional margin.
// id for a separator line in the menu (invalid for normal item)
#define wxID_SEPARATOR (-1)
-// this one is for compatibility only, don't use in new code
-#ifndef ID_SEPARATOR
- #define ID_SEPARATOR wxID_SEPARATOR
-#endif
-
// Standard menu IDs
#define wxID_LOWEST 4999
*
*/
+// Make settings compatible with MFC
+#define wxUSE_MFC 0
+
#define wxUSE_OLE 1
// drag-and-drop, clipboard, OLE Automation
#define wxUSE_DEBUG_NEW_ALWAYS 0
#endif
+// MFC duplicates these operators
+#if wxUSE_MFC
+#undef wxUSE_GLOBAL_MEMORY_OPERATORS
+#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
+
+#undef wxUSE_DEBUG_NEW_ALWAYS
+#define wxUSE_DEBUG_NEW_ALWAYS 0
+
+#ifndef _MBCS
+// #define _MBCS
+#endif
+#endif
+
#if (!defined(WIN32) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
// Can't use OLE drag and drop in Windows 3.1 because we don't know how
// to implement UUIDs
#ifdef WX_PRECOMP
// include standard Windows headers
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && !wxUSE_MFC
#include <windows.h>
#include "wx/msw/winundef.h"
#endif
// initially as the main frame, and allows wxWindows frames to be
// created subsequently:
//
-// (1) Make MyApp::OnInit return NULL, not create a window.
+// (1) Make MyApp::OnInit return FALSE, not creating a window.
// (2) Restore the MFC code to create a window in InitInstance, and remove
// creation of CDummyWindow.
//
-// IMPORTANT NOTE: to compile this sample, you must first edit
-// wx/src/msw/wx_main.cc, set NOWINMAIN to 1, and remake wxWindows
-// (it only needs to recompile wx_main.cc).
-// This eliminates the duplicate WinMain function which MFC implements.
+// IMPORTANT NOTES:
+//
+// (1) You need to set wxUSE_MFC to 1 in include/wx/msw/setup.h, which switches
+// 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).
+// Then recompile wxWindows and this sample.
+//
+// (2) 10/3/2000, wxWindows 2.1.14: unfortunately there is an assert when
+// the sample tries to create an MFC window. Any suggestions welcome. It may be
+// a problem with conflicting project settings. Ignoring the assert (several times)
+// allows the sample to continue. In release mode the asserts don't happen.
+//
+// (3) I can't get the sample to link 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.
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
{
wxClientDC dc(this);
dc.SetPen(* wxBLACK_PEN);
- long x, y;
- event.Position(&x, &y);
+ wxPoint pos = event.GetPosition();
if (xpos > -1 && ypos > -1 && event.Dragging())
{
- dc.DrawLine(xpos, ypos, x, y);
+ dc.DrawLine(xpos, ypos, pos.x, pos.y);
}
- xpos = x;
- ypos = y;
+ xpos = pos.x;
+ ypos = pos.y;
}
BEGIN_EVENT_TABLE(MyChild, wxFrame)
#include "wx/tokenzr.h"
+// Required for wxIs... functions
+#include <ctype.h>
+
// ============================================================================
// implementation
// ============================================================================
#include "wx/grid.h"
#include "wx/generic/gridsel.h"
+// Required for wxIs... functions
+#include <ctype.h>
+
// ----------------------------------------------------------------------------
// array classes
// ----------------------------------------------------------------------------
wxLogError(_("Fatal error: exiting"));
wxApp::CleanUp();
+ exit(0);
}
// Yield to incoming messages
}
// If they are pending events, we must process them.
- wxTheApp->ProcessPendingEvents();
+ if (wxTheApp)
+ wxTheApp->ProcessPendingEvents();
// let the logs be flashed again
wxLog::Resume();
GenerateSample("ListctrlVC", "listtest", dir + wxString("/samples/listctrl"), wxStringList("listtest.cpp", "listtest.h", 0));
GenerateSample("MdiVC", "mdi", dir + wxString("/samples/mdi"), wxStringList("mdi.cpp", "mdi.h", 0));
GenerateSample("MemcheckVC", "memcheck", dir + wxString("/samples/memcheck"), wxStringList("memcheck.cpp", 0));
- // Note: MFC sample will be different.
- GenerateSample("MfcVC", "mfc", dir + wxString("/samples/mfc"), wxStringList("mfctest.cpp", "mfctest.h", 0));
+ // Don't always generate this project since it has to be tweaked by hand.
+ // GenerateSample("MfcVC", "mfctest", dir + wxString("/samples/mfc"), wxStringList("mfctest.cpp", "mfctest.h", 0));
GenerateSample("MiniframVC", "test", dir + wxString("/samples/minifram"), wxStringList("test.cpp", "test.h", 0));
GenerateSample("MinimalVC", "minimal", dir + wxString("/samples/minimal"), wxStringList("minimal.cpp", 0));
GenerateSample("NativdlgVC", "nativdlg", dir + wxString("/samples/nativdlg"), wxStringList("nativdlg.cpp", "nativdlg.h", "resource.h", 0));
else
{
OnError("Incorrect argument for -charset");
+ return FALSE;
}
}
}
ShowOptions();
exit(1);
#endif
+ return FALSE;
}
}
cerr << "Error: " << msg << "\n";
cerr.flush();
#else
- if (isInteractive)
+ if (isInteractive && frame)
(*frame->textWindow) << "Error: " << msg << "\n";
else
#ifdef __UNIX__
cout << msg << "\n";
cout.flush();
#else
- if (isInteractive)
+ if (isInteractive && frame)
(*frame->textWindow) << msg << "\n";
else
#ifdef __WXMSW__
+; Tex2RTF initialisation file
runTwice = yes
titleFontSize = 12
authorFontSize = 10
chapterFontSize = 12
sectionFontSize = 12
subsectionFontSize = 12
-; RTF only
headerRule = yes
footerRule = yes
useHeadingStyles = yes
+contentsDepth = 2
listItemIndent=40
-truncateFilenames = FALSE
winHelpContents = yes
-winHelpVersion = 4 ; 3 for Windows 3.x, 4 for Windows 95
-generateHPJ = true
-\overview [2] { \image{}{books.bmp}\helpref{#1}{#2}}
-; Some stuff
\ No newline at end of file
+winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95
+generateHPJ = no
+htmlBrowseButtons = bitmap
+winHelpTitle = "Help Demo Document"
+truncateFilenames = yes
+combineSubSections = yes
+htmlIndex = yes
+htmlFrameContents = no
+htmlWorkshopFiles = yes
yieldCount = 0;
if (yieldCount == 0)
{
- wxYield();
+ if (wxTheApp)
+ wxYield();
yieldCount = 10;
}
yieldCount --;