|
I show a message box with AfxMessageBox.
However if my main dialog was minimized at that time, only the message box shows, and until OK is clicked the owner won't show even if I click on the program icon in the task bar.
Same if I use a custom dlg with DoModal instead of a message box.
This happens only if the main dlg was minimized, if it was simply out of focus there's no problem.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
modified on Saturday, March 7, 2009 5:31 AM
|
|
|
|
|
That is probably because when you bring up a message box it will become the active window of the process, after it is closed, the active/focused window of the process becomes the parent of the message box, which is your main dialog so it gets restored. I think if you want to show it before you bring up the message box you either have to manually do it or maybe try to capture the WM_ACTIVATE or WM_ACTIVATEAPP messages somewhere and check if your main dialog needs to be shown.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Thanks, this gave me the idea to try ShowWindow(SW_RESTORE) before showing the message box, which worked.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
sashoalm wrote:
Same if I use a custom dlg with DoModal instead of a message box.
You need to create a Modaless dialog rather. It's simple, instead of calling doModal, you need to call Create() & ShowWindow(),
More here[^]
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
hi
in an MDI application, where's the best place for calling MDIMaximize?
is there any way better than calling this function? maybe changing styles or something...
thx
|
|
|
|
|
hi,
May i know how can i download an EXE from Webserver to client.....without using the browser.....may be using Cinternetsession...
if possible plese send me the sample code....to
purna2pradeep@gmail.com...
|
|
|
|
|
|
there is a directory containing the executable image file and there is another directory called "process current diretory" and every current diretory per process.
Indeed, what is current directory and where is it?
Any one can help me?
modified on Saturday, March 7, 2009 3:37 AM
|
|
|
|
|
|
basicly, it's what the command CD used to set when people used DOS
so if you open the dos box and type:
CD C:\mydir\
"C:\WINDOWS\notepad.exe"
notepad would have a current directory C:\mydir, not C:\WINDOWS
but since in a GUI you can't explicitly change the current directory i'm not sure what use it has anymore
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hi,
if posible please let me know how can i invoke an exe from local machine using _spawnlp or shellexecute in MFC...
|
|
|
|
|
Check here[^]
You may also use CreateProcess().
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
|
I have looked all over the web for a simple serial read/write program in C++ so that i can study it and learn the process of serial communications by EXAMPLE. I have tried the serial library and the demos on this site as well as a bunch of other sites. All i need is a simple program that sends a string to the com port of my choosing with the baud, parity, etc of my choosing. The variables can be simply manipulated and recompiled. I just want to learn this and I am not that experienced with c++, so all the MSDN stuff is confusing to me.
Anything that can mimic a hyper terminal would be more than ideal.
Thanks,
Seb
|
|
|
|
|
|
Hi ,
i need to invoke an download an exe from server without opening browser...ie may i need to copy it in client machine and invoke it ...
i have used TEAR sample which is given in msdn ....where im able to copy any files from server like txt,ini,jpg etc... but when i copy exe and msi files ...and when i invoke them.....im unable to run that exe or msi... ie im getting a message box.. installation pacakge could not be opened.. contact the application vendor to verify that this a valid windows installer package.. and when i debug code i get status code as 406 ie(No responses acceptable to the client were found)HTTP_STATUS_NONE_ACCEPTABLE..
|
|
|
|
|
Do you need to URLDownloadToFile ?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
can i use this without opening url...if yes plese send me the sample code....
|
|
|
|
|
|
Hi,
In the first url what u have sent ..when i run the exe it is downloading but it is saving in my machine showing the path which is unavailable ie..
C:\Documents and Settings\ICS400758\Local Settings\Temporary Internet Files\Content.IE5\G1I74LIF\SIXS_es_ES[1].exe
where as i don"t have any folder like Local Settings....
and in the second url i was unable to download demo project...
|
|
|
|
|
Oh what happened with these examples why you cant download demo and also you can compile source code.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I wrote a console program in UNICODE to surpport multi-language
But the DEBUG and RELEASE have diffirent results
I've already defined _UNICODE,UNICODE
who can tell me? Thank you !~~
And my console can output UNICODE character , just output a number
how can I do ?
Thanks~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
You need to set them for both Release & debug's property pages. Did you do that for both?
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
I just set them in project->settings
delete _MBCS and add _UNICODE,UNICODE
I am wondering if I use TCHAR cause this problem
because for ansi build TCHAR = char
How I change the setting for both of them
This is the first time using UNICODE
Thank you VuNic
|
|
|
|
|
If you are using TCHAR then there shouldn't be a problem. But it also counts how are you using it.
york528 wrote: I just set them in project->settings
delete _MBCS and add _UNICODE,UNICODE
Yes, this is fine. You need to repeat the same after you choose "Release" version. Because the settings you give in the project properties in debug mode applies only to debug versions. ReDo the same after you choose "Release". This is what I asked you to check.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|