- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I have two doubts:
1-Depending on the value of a variable I want to change the caption of a QWIN dialog ( before calling DLGMODAL for sure).
DLGSET(DLG,IDD_DIALOGX,DLG_TITLE,..) did not work.
How to do it?
2- In an old console program I created a progress bar (thanks to Jugoslav's ThreadDlg ), and some messagebox (instead of using write(6,*)).
I want to minimize the black console window. How to do it?
Rebuilding as a qwin project, the framewindow could be miinimized, but I would like to know if and how it can be done in a console app.
I know in a pure windows project the same could be done, but not by me,at least in near future.
Thanks
Geraldo
I have two doubts:
1-Depending on the value of a variable I want to change the caption of a QWIN dialog ( before calling DLGMODAL for sure).
DLGSET(DLG,IDD_DIALOGX,DLG_TITLE,..) did not work.
How to do it?
2- In an old console program I created a progress bar (thanks to Jugoslav's ThreadDlg ), and some messagebox (instead of using write(6,*)).
I want to minimize the black console window. How to do it?
Rebuilding as a qwin project, the framewindow could be miinimized, but I would like to know if and how it can be done in a console app.
I know in a pure windows project the same could be done, but not by me,at least in near future.
Thanks
Geraldo
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1) There's separate DlgSetTitle routine. I think the way you wrote it is actually far more consistent with other DFLOGM interfaces, but it doesn't work :-(.
2) Don't be so affraid of Windows applications. If you replace PROGRAM...END PROGRAM statements with INTEGER FUNCTION WinMain(blah, blah... END FUNCTION and recompile as Fortran Windows Application, any existing dialog-based or console application will work (but won't produce console window or output to it). You just have to be careful not to perform a WRITE(*, -- it will cause a crash; you have to either comment it out or redirect to a file. It doesn't have to have any RegisterClass, CreateWindow or GetMessage thingo -- plain number crunching or DlgModal works (just don't fall into trap of letting AppWizard generate the code for you).
Minimizing/hiding console window is a bigger pain than replacing PROGRAM with WinMain. You'd have to find the console window by its title using FindWindow API, then ShowWindow(SW_MINIMIZE or SW_HIDE) on it.
Jugoslav
2) Don't be so affraid of Windows applications. If you replace PROGRAM...END PROGRAM statements with INTEGER FUNCTION WinMain(blah, blah... END FUNCTION and recompile as Fortran Windows Application, any existing dialog-based or console application will work (but won't produce console window or output to it). You just have to be careful not to perform a WRITE(*, -- it will cause a crash; you have to either comment it out or redirect to a file. It doesn't have to have any RegisterClass, CreateWindow or GetMessage thingo -- plain number crunching or DlgModal works (just don't fall into trap of letting AppWizard generate the code for you).
Minimizing/hiding console window is a bigger pain than replacing PROGRAM with WinMain. You'd have to find the console window by its title using FindWindow API, then ShowWindow(SW_MINIMIZE or SW_HIDE) on it.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jugoslav
Norman Lawrence's Guide to Win App helped me a lot in Qwin app, but full Win App seemed toooo complicated. Will try the bare win project you suggested.
Thanks for the tips.
Norman Lawrence's Guide to Win App helped me a lot in Qwin app, but full Win App seemed toooo complicated. Will try the bare win project you suggested.
Thanks for the tips.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Everything worked ok.
The blah.. blah I toke from a Steve Lionel reply.
As I could not find how to change the project type from Console to Windows Application I had to create a new project with another name. Is it possible to change the project type so the .exe keeps the same name?
Thanks
Geraldo
The blah.. blah I toke from a Steve Lionel reply.
As I could not find how to change the project type from Console to Windows Application I had to create a new project with another name. Is it possible to change the project type so the .exe keeps the same name?
Thanks
Geraldo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think it's enough to change /subsystem:console to /subsystem:windows on Project/Settings/Link tab (you have to retype it, there's no dialog control for it).
Jugoslav
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The change you suggested worked ok.
Thanks. You are the real on line help for CVF.
Geraldo
Thanks. You are the real on line help for CVF.
Geraldo

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page