|
:(Hello guru's
I am created one dialog box. From that dialog I am trying to access the next Dialog. LikeWise nearly seven dialog boxes. I acheive this by writing the code in the button.There are two main buttons in each Dialog. Next Button and Previous Button. Whenever I press the next I call the
dialogone objDialogOne;
objDialogOne.DoModal();
If I Press the Previous button, I use the same code. LikeWise Keep on going for the seven dialog box. At some sort of time the application hangs, I don't know why? Will it I have to destroy objects or Dialog. If so, I am having lot of controls like Combo box and Edit box and getting values from the user when the user press the button. If I Destroy the dialog box and delete the dialog will it affects the data that dialog holds.
Thanks and regards
The World is Too Much with us
|
|
|
|
|
Any reason why you are not using a wizard-style property sheet? It would sure be a lot easier than the road you are trying to take.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I don't know much about property sheet? but one of my senior programmer, says that he has facing lot of issues on propery sheet in WinCE, he ask me to do in Dialog.
Thank and regards
|
|
|
|
|
Anonymous wrote:
I don't know much about property sheet?
Which is all the more reason to at least try it, rather than letting a co-worker set the pace.
Anonymous wrote:
...he ask me to do in Dialog.
Does he not realize that a property page is a dialog?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello,
I am using shellexecute inside a UI thread to run a dos type command, I would like the output from that command to be piped into a text file.. Any ideas?
some.exe >> c:\\text.txt
doesn't work.
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
First of all... The pipe is represented by the |, and it means that the output of a program is the input of another.
What you mean is simply the redirection of the output to a file. In that case, only one > (greater than) is necessary.
If some.exe > c:\\text.txt using SellExecute doesn't work, by using system("some.exe > c:\\text.txt") should.
Jaime
|
|
|
|
|
> = redirect output
>> = append redirected output
Neither > nor >> work with Shellexecute. I may have to use CreateProcess instead of shellexecute because I am waiting on a single object 'ShExecInfo.hProcess' to give the user a chance to kill the running process.
Everything is already coded with ShellExecute using SHELLEXECUTEINFO and it works great minus not being able to redirect the output to a file... It would suck to have to go back through my code and change all the ShellExecutes to CreateProcess, and I dont think system() would fit my application.
Thanks anyway,
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
I had to shellexec cmd.exe with params of "/c some.exe >> log.txt"
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
I'm curious why you are not using handles with the call to CreateProcess() . The hStdOutput , hStdInput , and hStdError members of the STARTUPINFO structure contain handles returned by GetStdHandle() . You can then use ReadFile() to read from the different handles.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I should have used CreateProcess from the get-go, but I didn't think I would need the output so I opt'ed for the 'easier to use' shellexecute. Bad judgement on my part. I may go back through my code and change to CreateProcess instead of ShellExecute.
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Hi Rob ,
I do not have an exact answer to ur query. but , if ur looking for ways
to redirect the out put of a child process (created using Win32 API )
, i have got some pointers.
Redirecting the output to file is actually piping the output to the file or
some other process in the chain. One can use Anonymous pipes to redirect
the output to a file . Exact mechanism which u have to look for is
How to Create Anonymous PIPES ?
How Handle to the process can be retrieved ?
( if ur using CreateProcess instead of shellexecute u can )
How u can pipe the process to anonymous pipe etc
when i gave a search in the google
(Search string - Anonymous pipe process creation win32) , i got an excellent article at the following url
http://www.codeguru.com/Cpp/misc/misc/article.php/c277
Hope this helps
Praseed Pai
www.praseedpai.com
|
|
|
|
|
how do I convert a handle to an HWND to CWnd?
Thanks
|
|
|
|
|
Cwnd::Attach(HWND)
dont forget to detach
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I have a handle to a window,
I need to get a CWnd pointer variable to point to that window..
ex:
suppose I have "DWORD Handle" that is returning the handle to a window in a DWORD
and I have CWnd *pointCWnd
how do I get "pointCWnd" to point to the window for which the handle was returned byt the handle. ?
|
|
|
|
|
Use Attach() just like Papa prescribed.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hai,
I do not want to have more than one instance of my app running at a given time. If the app is already running on the machine, I want the invocation of the app to just bring the already running app in focus. I would assume there is a standard way of doing this since a lot of apps do it. Can someone give me an example? Thanks a lot.
|
|
|
|
|
See here and here.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Can anybody help in this problem:
There's an edit control - hwnd_edit.
SetWindowText(hwnd_edit, "A line #1\nHere goes next line");
I need to do this:
|-------------------|
|A line #1 |
|Here goes next line|
| |
| |
|-------------------|
Bus what's up? I see the following:
|---------------------------------|
|A line #1[]Here goes next line |
| |
| |
|---------------------------------|
[] is a small square
How to deal with it?
|
|
|
|
|
Try a \r\n
Make sure that the style multiline is checked
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
\n\r doesn't work - now there are two squares instead of CR LF.
Multiline is certainly checked
XPiS
|
|
|
|
|
XPiS wrote:
\n\r doesn't work
It's important that you use \r\n (not \n\r) as was prescribed.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Try \r\n, or even \r allone.
Jaime
|
|
|
|
|
As far as I know, nothing like that will cause a multil-line title bar. Simply because Windows is meant to be user-friendly (read: consistent).
I dont think using owner-draw for the title bar can accomplish multi-line title bars either.
I suggest u change your strategy and display the required data in an appropriate place.
Again, one of the reasons Windows is popular is because of the GUI consistency it maintains.
Bikram Singh
|
|
|
|
|
Where is there mention of a multi-line title bar? Unless the OP changed his post, he wanted a multi-line edit box. Yes?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
sorry ! my mistake!
Bikram Singh
|
|
|
|