Has somebody worked with gpc on MinGW passing both -mwindows and -mconsole to create both a console box and GUI stuff ? Is a different thread needed for the GUI ?
Regards,
Adriaan van Os
Adriaan van Os a écrit:
Has somebody worked with gpc on MinGW passing both -mwindows and -mconsole to create both a console box and GUI stuff ? Is a different thread needed for the GUI ?
There are some examples in grx: look to the makefile.w32 in the pascal and pascal/bgi directories and also test and test/bgi for C examples. They work
Maurice
On 25 Jan 2006 at 15:45, Adriaan van Os wrote:
Has somebody worked with gpc on MinGW passing both -mwindows and -mconsole to create both a console box and GUI stuff ?
It is superfluous to pass both, since if you don't pass '-mwindows', then it defaults to '-mconsole'. If you pass both, you still end up with '-mconsole'. In either case, you can still have a GUI; '-mconsole' doesn't stop you from having a GUI.
Is a different thread needed for the GUI ?
I am not sure what you mean by this question.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/
Prof A Olowofoyeku (The African Chief) wrote:
On 25 Jan 2006 at 15:45, Adriaan van Os wrote:
Has somebody worked with gpc on MinGW passing both -mwindows and -mconsole to create both a console box and GUI stuff ?
It is superfluous to pass both, since if you don't pass '-mwindows', then it defaults to '-mconsole'. If you pass both, you still end up with '-mconsole'. In either case, you can still have a GUI; '-mconsole' doesn't stop you from having a GUI.
Well, at http://www.mingw.org/docs.shtml it reads:
"The -mwindows switch is needed to create Windows executables instead of console applications. It assures the appropriate Windows libraries are linked in for you. To get a console screen along with a standard windows application, add the -mconsole flag as well as -mwindows."
The GUI libraries can be linked in manually of course. So, there is no difference between passing nothing and passing both -mwindows and -mconsole, apart from those standard GUI DLLs ?
Regards,
Adriaan van Os
On 25 Jan 2006 at 21:02, Adriaan van Os wrote:
Prof A Olowofoyeku (The African Chief) wrote:
On 25 Jan 2006 at 15:45, Adriaan van Os wrote:
Has somebody worked with gpc on MinGW passing both -mwindows and -mconsole to create both a console box and GUI stuff ?
It is superfluous to pass both, since if you don't pass '-mwindows', then it defaults to '-mconsole'. If you pass both, you still end up with '-mconsole'. In either case, you can still have a GUI; '-mconsole' doesn't stop you from having a GUI.
Well, at http://www.mingw.org/docs.shtml it reads:
"The -mwindows switch is needed to create Windows executables instead of console applications. It assures the appropriate Windows libraries are linked in for you. To get a console screen along with a standard windows application, add the -mconsole flag as well as -mwindows."
The GUI libraries can be linked in manually of course. So, there is no difference between passing nothing and passing both -mwindows and -mconsole, apart from those standard GUI DLLs ?
Seems so to me. Perhaps '-mwindows' causes certain libraries to be linked automatically. However, in my windows.pas, I have a number of {$l ...} directives for the main GUI libraries. Perhaps that is why passing both switches makes no difference to passing neither.
PS: if you pass only '-mwindows', then you don't get a console at all.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/
Adriaan van Os a écrit:
Has somebody worked with gpc on MinGW passing both -mwindows and -mconsole to create both a console box and GUI stuff ? Is a different thread needed for the GUI ?
To be precise, the grx demo I mentioned opens two windows. When you click on demo.exe, it opens first a text DOS box (console) which asks for a mode number. Then it opens a graphics window in this mode, leaving the text window open. From that point the keys from keyboard are caught only by the graphics window when it has the focus: the text window no more respond to them if it has the focus. When the program terminates both windows are closed at once.
Maurice