|
Thanks for the reply, I use SetTimer function you said but now my main problem is just how to comunicate with the pregress??
It's a global variable of my app, but can I access and use it from the thread?
It's seems NO because nothing is performed by code that must increment it!!
SO HOW DO THIS?
|
|
|
|
|
I suggest to you to post a message to the Application Window Thread (you can pass the application window HANDLE to your secondary thread whenever you create it) and let it (the Application Window Thread) do the updating job for you.
P.S. Maybe the overall design is wrong: probably would be better to create a window in the secondary thread and build the progress bar in that context.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Or you could use a simple Object Oriented solution like this[^]
led mike
|
|
|
|
|
Oh, I see..., he is going round and around forums to remain stick in his original design...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I try to explain well my problem.. In my MainWnd I use an ActiveX control (a REprot Viewer) that need time to compute his job (load report) and I need the increment the progress bar while it's computing.
I can't set a timer to update the progress bar in the MainWnd (as said here) because while the activeX is working the Timer event is not processed.
If the solution you suggest work, I don't need the MyThread but I can manage directly the progress in the MainWnd, but it's wrong.
I hope to explain well my problem, and because I use this solution.
Thanks
|
|
|
|
|
I'm totally lost (or you are ) (I've been following all the threads on this topic).
If your ActiveX control is busy processing stuff on the app's main thread, and your progress
dialog/control was created on that same thread, then the progress dlg/control cannot process
any window messages because your activex control has control of the thread so the thread's
message loop isn't being processed.
So, it seems to me you have two options -
1) Put the activeX control on another thread so the main thread can process window messages as
usual (it can also process your timer messages)
2) Put the progress dialog on a separate thread and process all it's messages, including timer
messages, on that thread. That way the ActiveX control can go about its business.
Both these have been recommended to you several times. Try one!
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
It all started here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thanks a lot for the reply, I just see your past reply but I will see if somebody can give me a solution for don't use another dialog (with progressbar).
|
|
|
|
|
Hello,
I am trying to resize a GetOpenFilename dialog box, so that it appears larger than standard, so you can see more files in the dialog.
I have succesfully hooked for notifications with OFN_HookProc.
I can execute code on WM_InitDialog.
I have tried using the SetWindowPos function, but specifying a new size for the dialog box leaves all the controls in the same place and makes the window bigger, in order to add more controls to the form.
But what I want to do is stretch the dialog, just as the user would do by grabbing the corner of the windows. I don't want to add more controls, I want to make the control on the existing forms resize too.
Any idea how I do this ?
Thanks for any help.
Steve
|
|
|
|
|
IMHO you have to reposition the controls by code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hi ,
i tried one sample program from Code Projet , I resized the CFileDialog size in File Save dilog , the same size will appear for remaing dialog ,
i want the default size back ..
plz help
hh
|
|
|
|
|
Sorry, I lost my magic stick. So, today will you point out the article with a link?
|
|
|
|
|
look at the bottom of the article you're refering. see that forum ? look good no ? yeah, it's the place to ask questions related to the article
|
|
|
|
|
fioskarthi wrote: ...the same size will appear for remaing dialog ,
In just that application, or for all of Windows?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi,
Pls go thru the following idea.
I have a jpeg image, and I have the details of my machine as text(Machine config, softwares installed etc.). I want to merge these two into a single jpeg file that contains the text written over the picture.
Then I want to set this image as the desktop background.
Pls give ur suggestions to implement the same in Win32 coding.
All inputs are appreciated.
Thanks in advance.
SYAMLAL
|
|
|
|
|
To set the desktop background from your code you can use IActiveDesktop::SetWallpaper().
As far as writing text over JPEG is considered you will have to wait for someone here to respond.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanks a lot for this info
SYAMLAL
|
|
|
|
|
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi,
I just tried to compile the demo projest in my machine, But it says:
"'SPI_GETDESKWALLPAPER' : undeclared identifier"
What could be the error?
Pls tell me the equivalent numeric value if u knows it.
SYAMLAL
|
|
|
|
|
SyamlalS wrote: I just tried to compile the demo projest in my machine, But it says:
"'SPI_GETDESKWALLPAPER' : undeclared identifier"
What compiler? What OS? What changes did you make?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I am using Visual Studio 6.0 and my OS is Windows XP, Service pack 2.
And I didn't make any changes to ur code.
SYAMLAL
|
|
|
|
|
Are you using the latest Platform SDK for VS6?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
It seems not the latest SDK.
Pls let me know how can I check it?
SYAMLAL
|
|
|
|
|
SyamlalS wrote: Pls let me know how can I check it?
Use the Add/Remove Programs applet in Control Panel.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|