|
There is no windows message loop for command prompt applications, so no message queue and no routing of messages to a WndProc.
You could use a hidden window though.
What are you trying to do ?
|
|
|
|
|
I mean window of CMD.exe , i think CMD.exe is a window application , it has window handle , window class , ... , an program can use most of window related functions with Command Prompt window
I use global hook to subclass all top-level windows , in their subclassed WndProc i will send useful messages to main program written in .NET , main program will do something such as : adding title button + system menu , managing window . Would you like to try it ?
|
|
|
|
|
In a new MFC application, I obtain positional data from an eternal source, but would like to generate a Google Earth type image with this data. Perhaps updated a few times per second.
I have looked at Global Majic ActiveX controls (Digital Map), but are they any others that are out there?
I did think of Microsoft's Flight Simulator, it that an option?
Many thanks,
Andy.
|
|
|
|
|
Hi,
Is there any built in separator control in MFC?
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
"English is my second language; please excuse any grammatical or spelling mistakes"
|
|
|
|
|
pDC->MoveTo (100,0);
pDC->LineTo (100,100);
will draw a line, separating two parts of a DC....?
I feel fairly sure that's not what you are after though. Can you explain your question differently?
If it's for putting a line in a dialog box, I just use a static control, with the sunken flag, and make its width (or height) equal to zero.
Iain.
|
|
|
|
|
Iain thanks for reply, i want this sort of separator in some of my dialogs.
http://i9.tinypic.com/5ytbbsj.jpg[^]
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
"English is my second language; please excuse any grammatical or spelling mistakes"
|
|
|
|
|
Use Spy++ to find out what sort of control that is. I'd hazard a guess that it's a static control, one DLU in height.
"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
|
|
|
|
|
That is the method I described in my previous post. Use the dialog editor, and put a box on your dialog (static control).
Drag it to the width you want, and sent the style to sunken.
Move the top to the position you want, then drag the bottom up. Voila - 1 reeeeeally thin box = line / separator.
Iain.
|
|
|
|
|
|
I can tell u how to build that separator. As I'm replying after a long time of u'r post, first respond to this message.
Come online at:-
jubinc@skype
|
|
|
|
|
Are you "the" Don Box who wrote a book on COM?
Yours Truly, The One and Only!
|
|
|
|
|
in the dialog resource editor add a picture control and set it's Type to Ethced Horz
|
|
|
|
|
Hi all,
How would one go about restarting an application ? (i.e. for re-configuration purposes)
Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
I can't think of a little api to do it, but it wouldn't be too hard to write a small second program.
A.EXE
fire up B.EXE, and pass B its process handle as a parameter.
B.EXE:
wait for process A to die (for a finite length of time!)
start another A.EXE (perhaps with a "/restarted" flag?)
die!
A.EXE
carry on where you left off.
Iain.
|
|
|
|
|
By writing a wrapper application that calls your application?
Why do you need to do this? Restarting an application programmatically, unless it's a service, is something that I haven't heard of.
|
|
|
|
|
Cyrilix wrote: Why do you need to do this?
Cause when the data in my config file has changed, I need to get the new data. So I thought a restart would be the way to go .... I think I should call the function that reads the config data ... but still a good question I think.
Thanks for your input
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Do you really need to restart ?
You could just re-read the configuration data.
|
|
|
|
|
Hi,
Earlier suggestions about re-reading config data, won't work, see I have a loop that is running, that inserts data. I need to change the ODBC DSN connection string and certain field names that may have changed.
This might cause a problem when a update is busy. So back to my first question ,how to restart the application, and the previous sentance states the need for a restart.
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: So back to my first question ,how to restart the application...
What's wrong with Iain's suggestion.
"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 think that the current instance of your application can start a new one of itself (for instance using CreateProcess) and then exit.
I don't know if it is a viable scenario for you.
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.
|
|
|
|
|
you could just pop a message box telling the user to restart the application...
|
|
|
|
|
Hi,
ConnMgrQueryDetailedStatus() API fails due to error in connmgr.exe
Can anyone write a sample code to make use of ConnMgrQueryDetailedStatus()API and retrieve the contents of the structure it fills.
Thanks
|
|
|
|
|
|
I'm developing a winmobile6 application(using emulator).I'm not able to find the return type (HRESULT)on execuuting ConnMgrQueryDetailedStatus().
Its throws a runtime error on executing the API.
"A problem has occurred with connmgr.exe"
|
|
|
|
|
You could trying running a debug logging utility to see if anything is output by the crashing application, such as DebugVew or even setup a Symbol Server to get full call stack information, but you'd have to get it to crash under your debugger for that to help.
Sorry I can't be of more help.
regards,
|
|
|
|