- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello to all.
Reading some stuff form the net, ive foud some very good tips on how to implement the progress bars.
But it still doesn't work:
I have some problems with my Dev. Studio in compiling the Progress bar code.
I have included the sentences:
USE DFLOGM
INCLUDE 'resource.fd'
and the declarations of the DIALOG variables...
but when i compile it, i always have the error:
"Error: This name does not have a type, and must have an explicit type. [DLG_RANGEMIN]"
and the same for DLG_RANGEMAX
Can anybody help me?
Thank you.
Reading some stuff form the net, ive foud some very good tips on how to implement the progress bars.
But it still doesn't work:
I have some problems with my Dev. Studio in compiling the Progress bar code.
I have included the sentences:
USE DFLOGM
INCLUDE 'resource.fd'
and the declarations of the DIALOG variables...
but when i compile it, i always have the error:
"Error: This name does not have a type, and must have an explicit type. [DLG_RANGEMIN]"
and the same for DLG_RANGEMAX
Can anybody help me?
Thank you.
Link Copied
12 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello again.
Thanks for your help Dukic.
My VF verison is 5.0A.... lot of years ago!
I've downloaded your xflogm.f90 and included in my project: it throws a lot of compiling errors... starting with:
"C:Program FilesDevStudioMyProjectsDeathStarXFLOGM.F90(112) : Error: Conflicting attributes or multiple declaration of name. [T_SCROLLINFO]
type (T_SCROLLINFO) si"
Bye!
Thanks for your help Dukic.
My VF verison is 5.0A.... lot of years ago!
I've downloaded your xflogm.f90 and included in my project: it throws a lot of compiling errors... starting with:
"C:Program FilesDevStudioMyProjectsDeathStarXFLOGM.F90(112) : Error: Conflicting attributes or multiple declaration of name. [T_SCROLLINFO]
type (T_SCROLLINFO) si"
Bye!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It compiles fine with my 5.0D, but it's quite possible 5.0A won't swallow it. 5.0D upgrade is available here. You will have to link with DFLOGM.lib v6.0 (just add it to the project as any other source file). It used to be included in the .zip file... let me check... but it isn't anymore. OK, I'll upload it (I guess I'm violating some copyright laws here but I hope I'd be forgiven :-)).
Jugoslav
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's gettin' better.....
Well, first of all, thanks a lot for your help!
I've upgraded my DVF version to 5.0D, and now, when i try to compile your threatdlg workspace, i get ONLY 4 errors..... guess what:
"C:...ThreadDlg.f90(48) : Error: This name does not have a type, and must have an explicit type. [DLG_RANGEMIN]
iDummy=DlgSet(Dlg,IDC_PROGRESS,0,DLG_RANGEMIN)..."
By other side, well, i think the upgrading process may not be finished: i run the upgrade program(DVF-X86-50D.exe) and i got the "successfully upgraded" message, fine. And install the Documentation upgrade kit (DVF-50-DOC-U1.exe).
One of the new files from the upgrading process is a workspace: with the XFLOGM.f90 file prepared to compile....
When i tried to compile this file, a new error message appears: "Cannot find the USER32.mod file"
Can i download this .mod file anywhere?
By the way, this files downloaded from hp.com are full of additions made by you. Are you working for hp or something?. Just curiosity.
Thanks again.
Well, first of all, thanks a lot for your help!
I've upgraded my DVF version to 5.0D, and now, when i try to compile your threatdlg workspace, i get ONLY 4 errors..... guess what:
"C:...ThreadDlg.f90(48) : Error: This name does not have a type, and must have an explicit type. [DLG_RANGEMIN]
iDummy=DlgSet(Dlg,IDC_PROGRESS,0,DLG_RANGEMIN)..."
By other side, well, i think the upgrading process may not be finished: i run the upgrade program(DVF-X86-50D.exe) and i got the "successfully upgraded" message, fine. And install the Documentation upgrade kit (DVF-50-DOC-U1.exe).
One of the new files from the upgrading process is a workspace: with the XFLOGM.f90 file prepared to compile....
When i tried to compile this file, a new error message appears: "Cannot find the USER32.mod file"
Can i download this .mod file anywhere?
By the way, this files downloaded from hp.com are full of additions made by you. Are you working for hp or something?. Just curiosity.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Replace USER32 with DFWIN in the source. 5.0 doesn't have a USER32.
I think you are mistaken about Jugoslav's additions being in HP files.
Steve
I think you are mistaken about Jugoslav's additions being in HP files.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It all seems fairly normal... let me explain:
1) ThreadDlg uses DFLOGM, not XFLOGM. If you want to build it, you have to replace use DFLOGM with XFLOGM, and add the dflogm.lib and xflogm.f90 to your project.
2) Upgrading process looks OK -- but it did not change the DFLOGM (or changes are irellevant, at best). I suggested upgrading for other reasons (updates in DFWINTY module)
3) "Cannot find USER32.mod" messages are benign and you should ignore them, provided that compilation of XFLOGM.f90 gives "0 errors, 0 warnings". XFLOGM contains a bunch of !DEC$IF(_DF_VERSION_) statements which regulate which segments of it are compiled depending on CVF version. DVF dependency analyser is a bit stupid -- it sees line USE USER32 and kind of complains, but the line in question is never actually compiled (it will be compiled only under 6.5 or newer).
The files you downloaded from HP are not my additions in any way, and I don't work for HP -- how did you conclude that? XFLOGM.f90 is my only contribution, but it's not part of 5.0D upgrade, but a separate download.
Jugoslav
1) ThreadDlg uses DFLOGM, not XFLOGM. If you want to build it, you have to replace use DFLOGM with XFLOGM, and add the dflogm.lib and xflogm.f90 to your project.
2) Upgrading process looks OK -- but it did not change the DFLOGM (or changes are irellevant, at best). I suggested upgrading for other reasons (updates in DFWINTY module)
3) "Cannot find USER32.mod" messages are benign and you should ignore them, provided that compilation of XFLOGM.f90 gives "0 errors, 0 warnings". XFLOGM contains a bunch of !DEC$IF(_DF_VERSION_) statements which regulate which segments of it are compiled depending on CVF version. DVF dependency analyser is a bit stupid -- it sees line USE USER32 and kind of complains, but the line in question is never actually compiled (it will be compiled only under 6.5 or newer).
The files you downloaded from HP are not my additions in any way, and I don't work for HP -- how did you conclude that? XFLOGM.f90 is my only contribution, but it's not part of 5.0D upgrade, but a separate download.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello again.
I'm back to my war against the progress bars....
I've changed the USE user32 for the use DFWIN... that's working: THank you steve.
By the othe way, i've included the XFLOGM module, the XFMOD.f90, and everythign, and now...COMPILE!!!
and that's not everything: now i can SET the initial position of my bar.
The problem now is how to make the actualizations of the position...
First, i've wake my progress bar up with the DLGMODAL procedure..but it gets hanged in this window since i remove the "acept" and "cancel" buttons...so the aplication stops there and doesn't go on the following orders....
thereby, the aplication never arrives to the DO loop, where the DlgSet(...,percent) sentence is included.
By the way.. to refresh the progress bar: Is this the sentence to use(DlgSet(...,...,percent)?
Jugoslav: about your addings to the HP files... i think i've confounded the files downloaded from www.hp.com, with your files, i mean, the files downloaded from your personal site.
Again.... thank you.
I'm back to my war against the progress bars....
I've changed the USE user32 for the use DFWIN... that's working: THank you steve.
By the othe way, i've included the XFLOGM module, the XFMOD.f90, and everythign, and now...COMPILE!!!
and that's not everything: now i can SET the initial position of my bar.
The problem now is how to make the actualizations of the position...
First, i've wake my progress bar up with the DLGMODAL procedure..but it gets hanged in this window since i remove the "acept" and "cancel" buttons...so the aplication stops there and doesn't go on the following orders....
thereby, the aplication never arrives to the DO loop, where the DlgSet(...,percent) sentence is included.
By the way.. to refresh the progress bar: Is this the sentence to use(DlgSet(...,...,percent)?
Jugoslav: about your addings to the HP files... i think i've confounded the files downloaded from www.hp.com, with your files, i mean, the files downloaded from your personal site.
Again.... thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I may read between lines...
Do you want to:
- start a longish calculation
- on its start, create a dialog containing only a progress bar
- update the progress bar as calculation runs
- close the dialog when the calculation is done?
If the answer is yes, you can adapt ThreadDlg sample as follows:
- remove Start & Stop buttons, and the code that handles them.
- Associate OnRun subroutine to the event of dialog initialization, i.e.
- In OnThreadEnd, call DlgExit(Dlg)
Note that CreateThread call is the key -- if you run the DlgModal and calculation in the same thread (i.e. use plain CALL instead), no progress bar updating will take place.
Jugoslav
Do you want to:
- start a longish calculation
- on its start, create a dialog containing only a progress bar
- update the progress bar as calculation runs
- close the dialog when the calculation is done?
If the answer is yes, you can adapt ThreadDlg sample as follows:
- remove Start & Stop buttons, and the code that handles them.
- Associate OnRun subroutine to the event of dialog initialization, i.e.
iret = DlgSetSub(Dlg, IDD_DIALOG1, OnRun). In this way, OnRun will be invoked immediately after DlgModal.
- In OnThreadEnd, call DlgExit(Dlg)
Note that CreateThread call is the key -- if you run the DlgModal and calculation in the same thread (i.e. use plain CALL instead), no progress bar updating will take place.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
IT'S ALMOST ACHIEVED!!!
Now everything compiles and your threaddlg runs perfectly.
I'm trying to adecuate your code to my application and then another problem appears...
When the calculations finishes, how can i shut down the progress DLG and going on with my "main" program?
I try to shut it down with the calling:
CALL DlgUninit(Dlg)
but it always gives me an error, wherever it may be placed...
"fortran error 152" and others...depending on the block that contains the CALL Dlgunint(dlg) sentence...
I've tried to understand the flux of your application, but it's seen that's too big for me yet.
Man, i think i owe you a gift...Do you want the Pink Floyd's complete discography?
see you.
Now everything compiles and your threaddlg runs perfectly.
I'm trying to adecuate your code to my application and then another problem appears...
When the calculations finishes, how can i shut down the progress DLG and going on with my "main" program?
I try to shut it down with the calling:
CALL DlgUninit(Dlg)
but it always gives me an error, wherever it may be placed...
"fortran error 152" and others...depending on the block that contains the CALL Dlgunint(dlg) sentence...
I've tried to understand the flux of your application, but it's seen that's too big for me yet.
Man, i think i owe you a gift...Do you want the Pink Floyd's complete discography?
see you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DlgExit closes (hides) the dialog (normally, it is called from a callback). That should be followed by a DlgUnInit, which destroys any memory that was allocated in DlgInit. As a rule of thumb, call DlgUnInit from the same routine where DlgInit is called.
If DlgUnInit crashes, a common cause is that Dlg variable is screwed. A common error is to reuse the same Dlg for a child dialog:
Jugoslav
If DlgUnInit crashes, a common cause is that Dlg variable is screwed. A common error is to reuse the same Dlg for a child dialog:
subroutine OnButtonClickInABiggerDialog(Dlg, ID, iEvent) type(Dialog) Dlg ... !Don't do this for a child dialog -- declare another ! variable of type DIALOG iret = DlgInit(Dlg, IDD_A_CHILD_DIALOG) iret = DlgModal(Dlg) call DlgUnInit(Dlg) end subroutineThis is probably not your case (it will crash on second DlgUnInit), but just as a sanity check...
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for all.
Everything's working perfectly.. i've read not well your previous post. You told me explictily to use the "CALL DlgExit(Dlg)" sentence on the OnThreadEnd(Dlg). And now it seems to be everything under control....
Best Regards, from Andalusia.
Adios
PS: i was trying to attach a couple of pictures from Cadiz, but, they weren't allowed.
So, next time.
Everything's working perfectly.. i've read not well your previous post. You told me explictily to use the "CALL DlgExit(Dlg)" sentence on the OnThreadEnd(Dlg). And now it seems to be everything under control....
Best Regards, from Andalusia.
Adios
PS: i was trying to attach a couple of pictures from Cadiz, but, they weren't allowed.
So, next time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cadiz? That's pretty close to Sevilla, and a company from there are our closest business partners. Haven't been there yet, but I probably will sooner or later. Who knows...
Jugoslav
Jugoslav

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