How do I create a modeless dialog to show a progress bar

D

Diver@home

How do I create a modeless dialog to show a progress bar while I drop
shapes on the visio page? The dialog create requires a cwin* to the
visio application window but I can't seem to get the pointer with any
of the calls.

Any assistance would be appreciated.

Thanks
 
D

Diver@home

what platform are you developing on (vba, vb, .net, c, etc).
al
VS 6.0 C++; by 5:00am I got the following to work,
ProgressDialog Dprogress;
CRect rect;
Dprogress.Create((LPCTSTR)"ProgressDialog",(LPCTSTR)"progress",WS_VISIBLE
| WS_CHILD,rect,pWindow,IDD_DIALOG1);
Dprogress.ShowWindow(SW_SHOW);

It appeared after I did the ShowWindow. It put it in the upper left
hand corner of Visio's window instead of in the center. I still have
to center it and get a progress control to work contained in the
dialog.
 
D

Diver@home

VS 6.0 C++; by 5:00am I got the following to work,
ProgressDialog Dprogress;
CRect rect;
Dprogress.Create((LPCTSTR)"ProgressDialog",(LPCTSTR)"progress",WS_VISIBLE
| WS_CHILD,rect,pWindow,IDD_DIALOG1);
Dprogress.ShowWindow(SW_SHOW);

It appeared after I did the ShowWindow. It put it in the upper left
hand corner of Visio's window instead of in the center. I still have
to center it and get a progress control to work contained in the
dialog.
CenterWindow() worked to get it in the center but
the Dialog is empty, no buttons, no controls.
 
D

Diver@home

According to microsoft's web site;

"It's also easier to add solution-defined windows as child windows of
Visio windows using the Add method
of a Windows collection. To do this, create an HWND and use the
WindowHandle32 from the window added with
Windows.Add as the parent HWND. Using HWNDs from different processes
as parent windows doesn't work
well, except in in-place containment scenarios."

If microsoft should happen to read this I would say that If you want
developers using C++ to indirectly add to your revenue and status I
suggest you improve you documentation effort in regards to C++. VBA
doc and samples is of little use.
 
B

bnk

Hello.

It seems that you are trying to make your dialog a child window, and
this causes all that nasty troubles ;)
Usually dialogs are popup windows. Especially progress dialogs.

Regards, Nikolay.
 
D

Diver@home

Hello.

It seems that you are trying to make your dialog a child window, and
this causes all that nasty troubles ;)
Usually dialogs are popup windows. Especially progress dialogs.

Regards, Nikolay.

Thanks for the respone. I've seemed to have exhausted most of my
other options, I'll look into the popup.
 
D

Diver@home

Answering my own post,
Modeless Multi-Threaded Progress Dialog
by Robert E. Burke is absolutely brilliant. Very robust, works out of
the box. Can be found at code guru.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top