|
Remove the system("PAUSE"), thats the batch command for "Press any key to continue . . .". The program will wait on getch until a key is pressed.
modified 12-Jul-20 21:01pm.
|
|
|
|
|
My monitoring program needs to locate a file held by another application ,apply DuplicateHandle() on it and read certain portions of that file.
This seems like a long way to achieve a simple task - but normally - not
all monitored application would share that file as they open it.
So - I do not have any other choice but - to grab the file handle , duplicate it
and read what I need for monitoring (do I?)
The file name is known in advance (and even the process name / ID can be determined in
most cases...)
How can I carry out this task?
Thanx
Hillel.
|
|
|
|
|
Hi,
I am trying to select the full row of a listview control.What I am doing is setting the extended style to
FullRowSelect , then deselcting all rows, then selecting a certain row. My code looks something like
this:
ListView_SetExtendedListViewStyle(hWnd1,LVS_EX_FULLROWSELECT);
ListView_SetItemState(hWnd1,-1,0,LVIS_SELECTED);//deselect all
ListView_SetItemState(hWnd1,LVIS_SELECTED ,LVIS_SELECTED); //select a row
What happens is that I end up with multiple rows selected. Please help me on this problem ASAP.
Thanks in advance.
Ayon
|
|
|
|
|
I have a problem with Rational Robot.
I can not record IIOP requests.
Should I install any DLL?
Please help me.
Thanks very much.
|
|
|
|
|
How will i be able to truncate a string by 1 then append another 1 into it?
Ex:
str1 = "Happy!";
str2 = " Birthday";
str3 should be "Happy Birthday" //str1 will be cut by 1 character
I tried to forcefully terminate str1 by placing '\0' on the loc of '!' (which is str1.GetLength() - 1). '\0' must be the mistake, I don't know how to adjust the string terminator. Thanks
|
|
|
|
|
str1 = str1.Left( str1.GetLength() - 1 ); is one possibility.
Don't try it, just do it!
|
|
|
|
|
Alexander M. wrote:
str1 = str1.Left( str1.GetLength() - 1 );
it didn't work, i also tried to put /2 on GetLength but to no effect. What is the character symbol of a string terminator?
|
|
|
|
|
benjnp wrote:
str1 = "Happy!";
str2 = " Birthday";
try this
CString str1,str2,str3;
str1 = "Happy!";
str2 = " Birthday";
str1.Delete(str1.GetLength()-1,1);
str3=str1+str2;
MessageBox(str3);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Try this:
CString str1,str2,str3;
str1 = "Happy!";
str2 = " Birthday";
str3 = str1.Left(str1.GetLength() - 1) + str2;
The code above assumes that str1 has at least one character.
-- modified at 6:21 Monday 19th September, 2005
|
|
|
|
|
How will I be able to activate the shortcut keys on the menu of a dialog-based MFC project just like on SDI/MDI?
|
|
|
|
|
whats problem? Have you tried accelerators?
|
|
|
|
|
yup, i tried using accelarators and their not working at all
|
|
|
|
|
what problem it is giving, ideally, when you go to new accelerator , it give you option of selecting desired menu id,
And if you have written a menu handler function for that, then it will get called
|
|
|
|
|
Hi could you please remind me how I can get time in msec? time() returns time in sec but I need more precision.
Thanks
|
|
|
|
|
GetLocalTime [^] retrieves the local time.
Software Zen: delete this;
|
|
|
|
|
Absolute system time or a timer to calculate time differences?
Don't try it, just do it!
|
|
|
|
|
Hi
GetTickCount() retrieves the number of milliseconds the system has been running.
If you need MicroSecunds You can use
QueryPerformanceCounter() and QueryPerformanceFrequency()
Iman Ghasrfakhri
|
|
|
|
|
Thank you all for you answers!
|
|
|
|
|
I want to do performance test with Rational Robot.
My application under test uses CORBA for comunication between server and client.
I dont know if I should instal any DLL to be able to record CORBA calls.
Can you help me please?
|
|
|
|
|
I've got a problem. I'll get input to my program and I have to determine which type of data that is. Input will occur in a text file and will look similar to this:
<br />
Add: 41.4 51.8 48.4 22.1<br />
Delete: 84.1 57.4 15.1<br />
etc....<br />
The problem is I have to determine the type of the data that needs to be added to the tree.
The tree is a template class.
I want to know code that could do the same as the following is supposed to do:
<br />
typedef T;<br />
T = int of T = double;<br />
AbstractTree<T> *tree = new BTree<T>;<br />
I then want to use type T in the rest of my program. etc.
AbstractClass<t> *tree = new BTree<t>;
I need this for a project that needs to be in on Monday 20:00(GMT)
Your help will be greatly appreciated.
Thanks alot
|
|
|
|
|
Hi
Why at the end of the OnPaint() there is a comment saying:
// Do not call CView::OnPaint() for painting messages
?
what should i do for refreshing the window, i try to call the function Invalidate() but when I call it the screen blinks.
Please advice.
Regards
Assay.
|
|
|
|
|
In order to avoid blinkings try to invalidate only the area you are updating instead of the whole paint area.
Themis
|
|
|
|
|
|
It's easy if you know what you have updated in each call. Instead of calling Invalidate() call InvalidateRect(). It takes as argument the area that you want to invalidate. It will update only that area this way if only a small portion of your view has changed you won't redraw everything.
Themis
|
|
|
|
|
Many thanks !
Do you know about more methods for redrawing the window except for calling the Onpaint()?
|
|
|
|