diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-02-16 22:00:04 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-02-16 22:00:04 +0000 |
| commit | ca41e69c27af0dee60b8186d06f5be0713d1a051 (patch) | |
| tree | 85fd248b68d4d00414fef6488016da975f739bd2 /src/Fl_win32.cxx | |
| parent | 18312d3c1fb325c0d9ac92e98137cebbcadb563c (diff) | |
Updated headers to support WIN32 and OS/2 DLLs.
Updated VC++ project files.
Removed dummymain.c (no longer needed).
git-svn-id: file:///fltk/svn/fltk/trunk@278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_win32.cxx')
| -rw-r--r-- | src/Fl_win32.cxx | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index aa1dee28f..f79112a4a 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_win32.cxx,v 1.27 1999/02/03 08:43:33 bill Exp $" +// "$Id: Fl_win32.cxx,v 1.28 1999/02/16 21:59:51 mike Exp $" // // WIN32-specific code for the Fast Light Tool Kit (FLTK). // @@ -106,7 +106,6 @@ double fl_wait(int timeout_flag, double time) { int have_message; timeval t; fd_set fdt[3]; - int n; // For WIN32 we need to poll for socket input FIRST, since @@ -700,14 +699,6 @@ Fl_X* Fl_X::make(Fl_Window* w) { HINSTANCE fl_display = 0; -extern "C" { -extern int __argc; -extern char **__argv; -extern int main(int argc, char *argv[]); -extern int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, - LPSTR lpCmdLine, int nCmdShow); -} - // // This WinMain() function can be overridden by an application and // is provided for compatibility with programs written for other @@ -715,6 +706,11 @@ extern int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, // "main()". This will allow you to build a WIN32 Application // without any special settings. // +// Because of problems with the Microsoft Visual C++ header files +// and/or compiler, you cannot have a WinMain function in a DLL. +// I don't know why. Thus, this nifty feature is only available +// if you link to the static library. +// // Currently the debug version of this library will create a // console window for your application so you can put printf() // statements for debugging or informational purposes. Ultimately @@ -723,8 +719,15 @@ extern int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, // Microsoft(r) Windows(r) that allows for it. // +#ifndef FL_DLL +extern "C" { +extern int __argc; +extern char **__argv; +extern FL_EXPORT int main(int argc, char *argv[]); +}; + int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, - LPSTR lpCmdLine, int nCmdShow) { + LPSTR lpCmdLine, int nCmdShow) { // Save the current instance in the fl_display variable... fl_display = hInstance; @@ -747,6 +750,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, return main(__argc, __argv); } +#endif /* !FL_DLL */ + //////////////////////////////////////////////////////////////// @@ -862,5 +867,5 @@ void Fl_Window::make_current() { } // -// End of "$Id: Fl_win32.cxx,v 1.27 1999/02/03 08:43:33 bill Exp $". +// End of "$Id: Fl_win32.cxx,v 1.28 1999/02/16 21:59:51 mike Exp $". // |
