|
I have a progressbar in a statusbar. When a database is being generated in the app, it takes a long time. I see that to make it step along, we do something like:
for (int i = 0; i < 5000; i++) {
bar.StepIt();
}
But I need to figure out how to make the progress bar reflect the database creation progress. What indicates that the database is finished being created? How to convert that info into the counter variable that makes it step along?
ANother question:
In the following
bSuccess = CProgressCtrl::Create(dwStyle, PaneRect, pStatusBar, 1); the nID is set to 1. Is this okay? Or should I put a made up ID like "ID_PROGRESS" in the string table? I dont know if its safe to set the nID = 1.
Thanks for the help,
ns
Thanks,
ns
|
|
|
|
|
How you are creating the database?
Running a script, or running any application that you developed that crete the tables, indexes, etc?
Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
I used ADOX in visual basic in a COM Dll, then I just call this dll in my MFC app (#import). So the dll does all the work.
Thanks,
ns
|
|
|
|
|
Okey, the problem is that you build the database in a only step, from the main application that is calling to the dll....
You don't know the status of the build, or if the dll crashed, etc, etc. Is a Black Box, that only say Ready...
You need to get information from the dll, or make the build in different steps. For example:
First Step: make that the dll build the tables. (30%)
Second Step: Build the Querys, or Stored procedures, etc. (other 30%)
....
Or rebuild the dll, and make that in vc++, or modify the dll for it displays a dialog with a progress bar....
Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Hmmm...definitely food for thought. So somehow my dll has to send back info to the VC as each step gets done. Cant write the dll in VC unfortunately, too much other stuff in it thats prexisting like the populating process. The other idea that the VB display the progressbar. I guess I can try that one - at least think along those lines . I was really wanting to use Chris Maunders statusbar progress control class in the VC side....
Thanks for the suggestions,
ns
Thanks,
ns
|
|
|
|
|
I have modal dialog that gets displayed in my MDI application. I would like the dialog to handle an ID_FILE_PRINT message that is generated by the Mainframe menu. I have a message handler in the dialog to handle this message. The only problem is that while the dialog is being displayed the mainframe File-Print menu item is disabled. It appears that when the file menu is clicked the dialog looses focus, which is causing the menu item not to be enabled. I don't want to put a separate menu in the dialog.
Can anyone help me with this problem?
Gary Kirkham
A working Program is one that has only unobserved bugs
|
|
|
|
|
Send a message to the mainframe
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
I want the mainframe to send the message to the dialog
Gary Kirkham
A working Program is one that has only unobserved bugs
|
|
|
|
|
Okey, you need to use the InitModalIndirect Function
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
All this mainframe talk is bringing back bad memories from my operator days
Could we just say "Main Frame" instead :P
|
|
|
|
|
You could send the message to the mainframe. That should do it for you.
Regards,
Brian Dela
|
|
|
|
|
I want the mainframe to send the message to the dialog
Gary Kirkham
A working Program is one that has only unobserved bugs
|
|
|
|
|
My brain is fried...I meant to write MODELESS dialog
Gary Kirkham
A working Program is one that has only unobserved bugs
|
|
|
|
|
Hi
I need to resize MSChart programatically (when a user double clicks on the chart). I donot find the SetWidth(), SetHeight() functions. Any ideas how to do it?
Thanks
|
|
|
|
|
Use the MoveWindow function....
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Hi there,
I've got a program where I read the registry to get the path of an application - on XP.
Once I get that path as it is a dos formatted path I called the GetLongPathName(A) function to convert it to its long name value and I got the following error from GetLastError function:
"prescribed file doesn't exist"
In fact the folder exist but apparently XP doesn't recognize it's DOS name as a valid Windows name (?).
I scanned the "App Paths" registry and noticed that most recent application did have their path with long name form instead of the old fashioned DOS one.
So I am really confused my code is working fine on W98 but not on XP. How could I bypass the GetLongPathName function is there any substitute to convert a valid DOS name to its long name counterpart ?
Thanks,
Yarp
http://www.senosoft.com/
|
|
|
|
|
I use GetFullPathName() for this. Give it a try. From memory it doesn't check the disk and therefore doesn't complain if the file doesn't exist.
You might also want to look at AfxFullPath(). If you still have a problem let me know.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
Thank you for your reply.
I Couldn't get GetFullPathName work properly too.
In fact I have a dual boot PC (a W2K boot and a XP one) and the application path I'm looking for was installed under XP on c:\program files (c: is the W2K drive). XP itself is located on d:.
So I get the following DOS name from the registry c:\progr~2\Poser\ and I would like the function to return c:\program files\Poser\.
I tried to type c:\progr~2 under DOS and Windows failed to go to the proper folder, but if I type d:\progr~1 it works fine. So I think this is a Windows bug. XP is unable to translate the DOS name from the other drive - because it is the W2K one ? The mistery remains.
Well, few people have dual boots like mine. If it works on another machine I'll just give up.
btw Your website is awsome
Yarp
http://www.senosoft.com/
|
|
|
|
|
I want to use ConvertSidToStringSid function in my MFC application.It is part of default libraries in MFC.VC editor show it to me but when I compile the program it tells me that it is not member of operator or global namespace!!!
Any Idea?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
You've got to include <sddl.h> and link with Advapi32.lib .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I did that but does not help.I used other functions of this library without any problem,there is error only for this one.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
This is probably a stupid question but is there any way to refresh a dialog so that all of the data and stuff that is in the dialog is destroyed and then recreated? Any help appreciated.
Brad Jennings
|
|
|
|
|
You can with DDX/DDV. Take a look in your docs at UpdateData and related stuff.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi all,
When I use IDiskQuotaUser->SetQuotaLimit() and ->SetQuotaThreadshold()there are always pop up an error dialog: like this:
//////////////////////////
Dubug Error
Program:**
Modlue:
File:i386\chkesp.c
Line 42
The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
Why?????????????????????????????????????
And How to resove this problem?
I tried to use static dll to build the project but failed for LNK2005 error.
also can not resolve the problem.
Thanks for help.
|
|
|
|
|
chkesp errors usually have their origins in passing around malicious pointers and/or wrong parameter sizes and counts. In this case it could be the LONGLONG value that's used in those calls. Happened to me once.
|
|
|
|