|
neha.agarwal27 wrote: Can anybody tell me how can i get temp folder path
GetTempPath
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Or,
getenv("TEMP");
(type set in cmd for more vars)
//Johannes
|
|
|
|
|
Hello All,
I am changing the cursor position for inserting,updating and deleting the text in a text box control.
I am able to get the cursor position pertaining to the current cursor location though.
Please suggest me the way to find the text pertaining to the cursor.
Thanks and Regards.
Amar.
|
|
|
|
|
From VC++ Help:
<br />
CEditView::GetSelectedText <br />
void GetSelectedText( CString& strResult ) const;<br />
<br />
Parameters<br />
strResult: A reference to the CString object that is to receive the selected text.<br />
<br />
Remarks<br />
Call GetSelectedText to copy the selected text into a CString object, up to the end of the selection or the character preceding the first carriage-return character in the selection.<br />
A tip... Try checking the help. Go to index view, write the name of the control and at the bottom of the help text usually is "CLASS MEMBERS" link. With all the possible things you can do by default with that control/class.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Friends,
I wanted to know your suggestions on the following:
There is an MFC application with TCP/IP connections(CAsyncSocket) to connect to machines that send out a string when the user presses a button there.
Now what do you think is the probablity(Yes/No/%) that the string is not received by the software when they are connected on LAN??
Or
Is it that there is absolutely no chance of missing(I dont think so though)
Assumptions:
Physical connections, cabling are proper and never break.
|
|
|
|
|
yashveer wrote: Now what do you think is the probablity(Yes/No/%) that the string is not received by the software when they are connected on LAN??
The target machine will either receive the data or it won't.
yashveer wrote: Is it that there is absolutely no chance of missing(I dont think so though)
There's always the possibility that the target machine could not receive the data.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
is there any diffrence working on windows 2000 and windows NT.
|
|
|
|
|
There are differences of course.
But for instance, there are more differences between Windows 2000 and Linux (i.e. IMHO you have to reformulate a bit your rather vague question).
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.
|
|
|
|
|
ya i am aware of ht differences between Linux and windows 2000
i am working on Visual Studio 6.0. now i want to know what differnce does it make working on 2000 and NT. i hope u got the question.
and what is this IMHO?
|
|
|
|
|
Well, usually, unless you're doing low level stuff, the differences are not so important. Anyway, for instance, compatibility of Win32 API is well documented for every function (under Requirements section).
Chandrasekharanp wrote: and what is this IMHO
it stands for "In My Honest Opinion", internet slang, see [^]
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.
|
|
|
|
|
thanks a lot for ur response.. and thanks for the slang...
|
|
|
|
|
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.
|
|
|
|
|
Hi,
I am the administrator for my system.I have created a user.
What I need is , Can I deny the user from creating files and folders in my system?
If so, how can that be done programmatically?
Any suggestions would be appreciated.
Thanks
Satya
Today is a gift, that's why it is called the present.
|
|
|
|
|
U'll need to add ACE. But it works in NTFS file system.
Come online at:-
jubinc@skype
|
|
|
|
|
Hello everyone,
I am feeling template function is more tricky than template class. For the reason that the compiler will do the matching automatically for template function, but for template class, developer can assign how to match.
Sometimes compiler is doing mysterious matching rules for template function, which makes us confused. Does anyone have the same senses?
Example,
1. for template function
we define
template <class T> void sort ( vector <T>& )
when we invoke like,
sort ( vector<int> )&, T will automatically matched by compiler to int -- we have no control. Sometimes, how compiler will do the matching is mysterious.
2. for template class
developer has full control. For example, when use some template class, developer can assign the type of parameter,
we define,
template <class T> class Foo
{
}
when developer use it, we can explicitly assign the type, like Foo <int> or Foo <bool>.
Any comments or experiences or even disagreement is welcome.
thanks in advance,
George
modified on Thursday, December 13, 2007 2:19:41 AM
|
|
|
|
|
George_George wrote: when we invoke like,
sort ( vector < int > )&, T will automatically matched by compiler to int
And.... where is the problem? You are giving a < int > what do you expect? To have a double?
I dont really understand where the problem is..
George_George wrote: when use some template class, developer can assign the type of parameter,
And you can do a conversion of type in the first lines of the function as well, don't you?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Sorry Nelek,
I have not made myself fully understood. My question is (after reorganization),
1. for template function, we can choose to use either implicit mode to let compiler deduce or explicit mode to assign type;
2. for template class, we have to use explicit mode to assign type?
regards,
George
|
|
|
|
|
IMHO:
George_George wrote: sort ( vector<int> )&
The above doesn't make sense.
In both cases, the developer is providing explicitely the template type.
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.
|
|
|
|
|
Sorry CPallini,
I have not made myself fully understood. My question is (after reorganization),
1. for template function, we can choose to use either implicit mode to let compiler deduce or explicit mode to assign type;
2. for template class, we have to use explicit mode to assign type?
regards,
George
|
|
|
|
|
A curiosity:
George_George wrote: Sorry CPallini,
I have not made myself fully understood
Do you apologize and at same time vote me down?
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.
|
|
|
|
|
Yeah, that's what he call:
Any comments or experiences or even disagreement is welcome.
"You are welcome, I will just vote you down if I didn't express myself correctly and if you didn't guess what I had in mind."
|
|
|
|
|
|
A bug of my mouse, CPallini!
regards,
George
|
|
|
|
|
Sorry, CPallini!
I made a wrong click.
regards,
George
|
|
|
|
|
I suppose that you were asking about something like this (in which case your example is very badly chosen because you specify explicitely the type):
template <class T>
void myTemplateFunc(T arg)
{
}
And to use it, you do something like this:
int myValue = 42;
myTemplateFunc(myValue);
But, in fact even in that case there is no matching involved. The compiler will simply 'generate'a new function and replace T by an integer. Now if you call that function and supply a float, then the compiler will generate a second function and replace T by a float. You have to look at templates as code that will be generated by the compiler once you use the template (be it a class or a function). And if you call your function with two different types, then two different functions will be generated.
The only case where a matching is done, is when you use template specialization (if I provide a version of my function specifically for float for example). In that case, the compiler will try to find the best match. But in general, the compiler is quite intelligent to solve the problem on its own.
|
|
|
|