|
I want to get the output of the console.using the pipe i can get most of them.
but a console use multithreads i cannot get the threads output,
so can anybody tell me what to do!!
|
|
|
|
|
linsion wrote: I want to get the output of the console.
Did you create the console window via CreateProcess() or ShellExecute() ?
"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 used CreateProces
or maybe the threads return too fast the app cannot capture them?
|
|
|
|
|
linsion wrote:
i used CreateProces
Then see here and here.
linsion wrote: or maybe the threads return too fast the app cannot capture them?
You should not need to be concerned with how slow/fast a thread executes. That's the whole paradigm behind asynchronous code.
"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
|
|
|
|
|
thanks for your help!
but the method your show me didnt work.
i have to give it up;
another question,when i connect to a remote computer(using nc),my console change,and this time i cannot input commands through the pipe.
how to solve this?
|
|
|
|
|
How can we use web parts as in like >> have a look at this site
http://www.pageflakes.com (asp.net 2.0 )
Please Help
|
|
|
|
|
i have made a sdi application, in that i have made a class derived from CForm view named CHttp.
Now from my main application class i have called a function which is inside CHttp
by simply making a object like this
CHttp test_http;
using this object i have called a function which is inside CHttp class
test_http.StartPingThread(URL_Name,nIndex);
void CHttp::StartPingThread(CString ping_url,int ping_index)
{
CWnd *obj_t = this;
th_run = 0;
error_ping_url = ping_url;
assocsping[ping_index] = (CPingThread*) AfxBeginThread(RUNTIME_CLASS(CPingThread),
THREAD_PRIORITY_NORMAL,
NULL,
CREATE_SUSPENDED,
NULL);
assocsping[ping_index]->ping_str = ping_url;
assocsping[ping_index]->ping_int = ping_index;
assocsping[ping_index]->ping_bool = TRUE;
assocsping[ping_index]->ResumeThread();
if(assocsping[ping_index])
{
m_PingThreadList.Add(pingThread);
assocsping[ping_index]->SetLogWindow(this);
assocsping[ping_index]->ResumeThread();
}
}
now in second last line it is not passing any value in this
ie. passing null
how to pass handle of a window in this function....
thanks in advance
|
|
|
|
|
this->GetSafeHwnd() returns you the handle to the current window
You mean this?
|
|
|
|
|
When i m not getting any value in this then how will GetSafeWnd() function will return anything..
|
|
|
|
|
When i m not getting any value in this then how will GetSafeWnd() function will return anything..
Is your function static?
If not, this has a value, as you have callted the function you are in on this. I.E> as if you had written
this->Function();
Failure is not an option - it's built right in.
|
|
|
|
|
Right,
If you are inside an object and "this" is corrupt, you have a big problem.
You did already verify if the constructor is correctly executed?
If you create a view without templates, you need to create the object, then execute Create(...),
to create the window and following a OnInitialUpdate.
Then your view is correctly created and initialized.
But even not to create and initialize the window, the "this"-pointer should have a value
|
|
|
|
|
neha.agarwal27 wrote: assocsping[ping_index]->SetLogWindow(this);
At this statement, what is the value of the this pointer? Perhaps you meant to use AfxGetMainWnd() instead.
"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 everybody,
i create a ContextMenu myself via AppendMenu(...);
The string is for example "List customers"
So i can choose the "List customers" via the contextmenu or via Key F2;
If i wish to add a Accelerator Key ( which is ONLY for this view )
I catch the KeyDown Message and if it's the F2 Key i open the window.
Now i like to display the menu in this way "List customers F2" with a tabulator between the
string and F2 ( that other menu-items displays the corresponding key in one "column" )
"List customers\tF2" doesn't work.
Has someone an idea?
Thanks
|
|
|
|
|
Can somebody help in for ..
i have an MDI Application. In that if i open one Document and then close it (from the close of tht specific document's frame window)will ask me to save the file(As i had made this by calling setmodifiedflag(true)) . But when i tried to directly close the mainframe window application ask me save two times . In this case the Destroy window of the frame window (opened document )gets called twice ..
and due to this my application get asserted ...
Thanks for your time ...
|
|
|
|
|
Hi
To start VC++ from scratch what is the best way?? or What is the best way to read VC++?? What topics must be started first
|
|
|
|
|
You can start reading Charles Petzold, MSDN etc. You should be aware about threading, messages etc. It's not that you would be able to grab all VC++ in one go. Once you start developing some code you would really need some help from Pro's (there are lot's of them on CodeProject ). With the confidence factor increasing you can make a move to MFC, ATL, COM and other relevant topics and read books like Inside COM, Beginning ATL etc.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I think see www.cplusplus will be helpful for you.
|
|
|
|
|
Hi
Without using VC++ editor how to run the VC++ program in command prompt by writing the program in notepad.
Regards
Kranthi.
|
|
|
|
|
you have to read about using the compiler (and the linker) in command line...
but just being curious, why would you like to do that, if you already dispose of the VC++ compiler ?
|
|
|
|
|
Hai All,
I'm in a difficult situation.Please help me out.
My requirement is:
1.I should create a txt file through my application in which I'll store some data.(it's okay the problem lies in the next two steps)
2.The so formed txt file should not be editable or delitable manually by using explorer or any other by any one.
3.My application should be able to append to the earlier created file with new datas.
I want to implement this in VC++.
Please help me out if anybody have a solution.
robs
|
|
|
|
|
Just a thought though but it may be useful. You can create a system wide hook to check if a the user hits delete or selects delete from the pop up menu by right clicking a file. When the user deletes a file check if the name of the file is that of yours. If affirmative just don't allow the message to pass through. I know that this would sound a bit too hypothetical but this is one way you can achieve this.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
What about using the SetFileAttributes() API with the FILE_ATTRIBUTE_READONLY attribute?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
How to sort values on an array. Just to get the top ten.
|
|
|
|
|
It would really depend on the type of array. If it's a integer array for instance you can use some sort of sorting algorithm. TO suggest a few you can look for quicksort, binarysort, bubble sort etc.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Use an array of the STL (vector or list) and use a sorting algorithm. See the first chapter in this article[^]
|
|
|
|