|
I have a managed C# application which calls functions in an unmanaged C++ dll. On the unmanaged side, I am trying to put up a dialog that contains a text label, a progress bar, and a cancel button. I use CreateDialog and ShowWindow to display the form. The form displays, but for a few seconds has nothing on it. Eventually, the progress bar appears and does show increasing numbers of blue blocks. The form closes as it should, but without ever having displayed the text or the cancel button. The form is displayed for about 10 seconds. Is there a command similar to DoEvents on the managed side that will force all portions of the dialog to display? I saw a reference in one of the articles to a Peek loop, but did not see any code and am not familiar enough with that to implement without more information.
Any help appreciated ...
|
|
|
|
|
theFrenchHornet wrote: I saw a reference in one of the articles to a Peek loop, but did not see any code
Does the article not have the code available for download? Most do I think.
led mike
|
|
|
|
|
No - like I said, it was just a reference. The article was not about it. Thus, no code.
|
|
|
|
|
Not sure what you want but maybe [^]this will help
led mike
|
|
|
|
|
Thanks - I'll see if I can incorporate it.
|
|
|
|
|
Try to use a function like Form->Refresh() Form->Update() Form->Repaint() or something similar.
|
|
|
|
|
Thanks, but doesn't change the behavior.
|
|
|
|
|
Hi ,
I was wondering if there was a way to embedd a package / binary inside a VC++ static library .
Engineering is the effort !
|
|
|
|
|
|
Thanks for ur response , however is this possible within a static library project using VC 6
In other words when linked with the application , the static library does not depend on the resource of the application but can inherently load the resource .
Thanks
Engineering is the effort !
|
|
|
|
|
Do you mean something like this?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi.
In my application, I am calling
COleTemplateServer'sObj. UpdateRegistry(OAT_DISPATCH_OBJECT); function inside InitInstance() to load file-type information from the document-template string and places that information in the OLE system registry.
It works fine for Windows98, XP,2000, etc. but on Vista OS, it fails.
What could be the reason?
Is there any solution for this?
Sameer Thakur
|
|
|
|
|
|
If you go to administrative tools, Local Security Policy, Local Policies, Security Options, and scroll to the "User Account Control:" settings and disable them (Just for testing) and try what you are trying and it works, then you found the culprit(s). You may need to logoff/logon or restart to get the new settings to apply.
However, how to get around it in the general sense without end users needing to change security settings is proving to be very difficult.
Hope that helps to at least narrow your problem context a bit.
-- modified at 15:06 Thursday 29th March, 2007
|
|
|
|
|
It is because UpdateRegistry resets some registry entries in HKEY_CLASSES_ROOT and as Vista wont allow you to do this you will get an error (on my product I just get an empty message box!).
The best way is to test if you have write access to the registry before calling the UpdateRegistry method as per this KB article:
http://support.microsoft.com/kb/254957[^]
|
|
|
|
|
I need to diable COLLAPSE option in my GUI - how to do it ?
I try to do it in the events ( onclick ) but its not working.
thanks.
|
|
|
|
|
|
Fairly experienced programmer .... but with no windows GUI experience.
So I am looking for a nice easy way to create a new GUI for a program that will be redistributed.
It's easy enough to stick with the stuff provided with VC++ and .NET 2.0, but fairly limited that way (instead of sliders, I want knobs for example ... and I need to add little "volume indicators" like you see on a stereo system .... I don't think this is easily accomplished with VC++).
I hear that .NET 3.0 changes GUI design drastically by incorporating XML usage ... does anyone have good experience with this?
Or does anyone know of some other program out there that can be used to easily create a professional windows GUI ??
Aaron Leese
|
|
|
|
|
|
Hi
can we use auto_ptr in MFC
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
vibindia wrote: can we use auto_ptr in MFC
why not ?
|
|
|
|
|
then whats the problem in following code
#include<memory.h>
class Car
{
public:
void StartEngine();
};
typedef auto_ptr<Car> CarPtr;
//D:\FAQC++\FAQ207\AutoPtr.cpp(10) : error C2143: syntax error : missing ';' before '<'
//D:\FAQC++\FAQ207\AutoPtr.cpp(10) : error C2143: syntax error : missing ';' before '<'
void f()
{
//CarPtr p(new Car());
//p->StartEngine();
}
int main()
{
f();
return 0;
};
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
Instead of
#include<memory.h>
put:
#include<memory>
and then prepend auto_ptr with std::
Programming Blog
utf8-cpp
|
|
|
|
|
Thanks the problem is over...
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
In your initial post, you had questioned whether auto_ptr would work with MFC. Fair enough, but where's your MFC code?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|