|
Because "\" is an escape character prefix you have to write "\\" if you mean the "\".
You can also escape other characters with the single \, e.g. \n \r \"
Regards Konrad
|
|
|
|
|
i have a bat file which runs when system starts (i add it in register of "...\Microsoft\...\Run").
it runs properly.
my Qrestion:
I hope dos window launched by the bat file is invisible (hidden or similar), so users will not see the dos window when system starts.
how to do that?
thanks
includeh10
|
|
|
|
|
mkae a shortcut to the batch file. go the property of the short cut and tell it to run minimised. then tell windows to run that shortcut in startup. that should slove your problem
|
|
|
|
|
I need a map where I can find the value to a key and also a key to a value. Since I can't find any article on Codeproject regarding this issue, I ask this question here: Is there a simple solution to this? My idea was to simply use two CMaps: CMap<KEY, KEY&, VALUE, VALUE&> and CMap<VALUE, VALUE&, KEY, KEY&>. Is there a simpler approach? Thanks for any help.
Konrad
|
|
|
|
|
|
Isn't there a simple MFC class somewhere out there as extension to CMap, because I don't want to use the huge boost library?
Konrad
|
|
|
|
|
I've not come across one and yes I too am put of by the huge Boost library. I vaguely recall coming across a simpler solution somewhere but I can't think where. Maybe on CodeGuru?
Kevin
|
|
|
|
|
Nearly all of Boost is in headers and it does not add lots of code to your app. The fact that it is large is irrelevant IMO. MFC and STL are also large.
I would definitely recommend using STL and Boost wherever possible instead of the MFC Containers (which I used to use heavilly).
Boost.MultiIndex will do what you want and it looks quite elegant. Of course you can use two CMap's or two STL map's but why would you want to.
Make the move to STL and Boost and you'll never regret it.;)
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
Neville Franks wrote:
The fact that it is large is irrelevant IMO.
Well, I've only comparatively recently moved from dial-up to broadband. With dial-up it just wasn't worth it. Now I've got broadband it's more psychological.
Neville Franks wrote:
I would definitely recommend using STL and Boost wherever possible instead of the MFC Containers (which I used to use heavilly).
Recently I've been more focused on .NET,so I've not had much incentive to look into Boost. When I do get to do C++ it's invariably maintenance work on code that's barely heard of STL, yet alone Boost! (For that nmatter it's often barely heard of MFC's data structures!) I just don't think it would go down too well if I downloaded Boost just to do maintenance work.
However, for new work or new extensions to MFC apps. I tend to go for STL containers nowadays. Still, I do intend to give Boost a try at some point.
Kevin
|
|
|
|
|
Konrad Windszus wrote:
because I don't want to use the huge boost library?
You probably can insert only the relevant classes into your project.
Boost is all source code.
I am doing so with the smart-pointer classes from boost.
You will want to stay well clear of the MFC-containers, as the STL containers are better in all respects, and are well documented and portable.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
jhwurmbach wrote:
You will want to stay well clear of the MFC-containers, as the STL containers are better in all respects, and are well documented and portable.
If you're working on an MFC app. it's generally going to be non-portable anyway, so why is it important to use portable STL? I agree that the STL containers are better and I use them for that reason, not because they're portable.
Kevin
|
|
|
|
|
If you don't expect the number of keys to be very large, you could just write a simple function to do the latter (i.e. return the collection of keys that map to the value).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Did you checked one of the best available source code here[^]
|
|
|
|
|
Thank you very much. I also found that article, after I posted my request. I already programmed my own CMap extension class, because I use MFC in my project (and therefore don't use STL, because I don't want to mix them). I will write an article about my extension class for codeproject when I have some free time.
Regards
Konrad
|
|
|
|
|
Konrad Windszus wrote:
because I use MFC in my project (and therefore don't use STL, because I don't want to mix them).
Why not? What's the problem?
Kevin
|
|
|
|
|
Hi all,
I am about to become a crazy man because of the following:
I want to use a structure and some functions in winuser.h file, I #include it and link user32.lib with my project, but the compiler always tells me that they are undefined, I tried this on many projects and always the same:
I write :
INPUT i;
and the compiler writes:
error C2065: 'INPUT' : undeclared identifier
Please try it.
I feel like I have not ever done anykind of programming.
Regards,
Mohammad
|
|
|
|
|
|
Hi Mike,
Thanx for replying my message, but I have another question:
the FAQ question you refered includes a link to micrososft windows sdk updates, but when I got into the page I found that these updates are for Windows Server 2003, should I install these on Windows 2000/XP/98?
Do they work well for these platforms?
If no, Where Can I find other SDK updates for other versions of Windows?
Regards,
Mohammad
|
|
|
|
|
Hi,
Are you sure that th compiler is familiar with these files?
Go to Tools->Options,choose the "directories" tab,and search in the list box those directories(Full path name).
If it's not in the list box,you should add this(add the directory of winuser.h to the "include files listbox" and the directory of the user32.lib to the "library files list box").
this sould solve your problem.
Good luck,
Eli
|
|
|
|
|
Questions:
how to delete some installed files (i.e. COMs) which are used by Windows system by inno uninstall (in section or script)?
those files were installed by inno setup.
normal uninstall does not work for these files because they are used by system and can not be deleted - even can not be deleted manaully.
thx
includeh10
|
|
|
|
|
Hi, I have use the text that a user input in an Edit Box in MFC, in my function.
Infact, the user input a sentence and I have to broke it into tokens. But the problem is that Im dont kno how to retrieve the sentence from the edit box to use it in the tokeniser function. Can sm1 plz help. I Need it soon koz lots of work is going pending since I cant see if the function is working properly b4 continuing.
& plz also tell me how to display the text that my function returns. Have done it in C++, it works but the only problem is MFC
|
|
|
|
|
Hello There!
Let Consider the m_strEditBox of type CString which is the variable associated with the EditBox from which you want to get text input by User.
now! For Getting Text in to your Variable i.e. m_strEditBox
Call UpdateData(...); with TRUE as Argument
this->UpdateData(TRUE);
this will fill your m_strEditBox with the data entered by user
.................
Now do anything with the m_streditBox variable i.e. broke in token etc etc.
..................
now if you want to update the data back to Edit Box
just again Call UpdateData(...); with FALSE as argument
i.e. UpdateData(FALSE);
"I Think this Will Help"
[Vote One Here,.....]
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Thanks.
how do I display my output in some other edit box now .
|
|
|
|
|
Now let the m_strEditBox1 of type CString is associated with some other edit box where you want to put data.
//now give value to m_strEditBox1
m_strEditBox1 ="Codeproject is great";
//Update the data back to edit box call UpdateData
this->UpdateData(FALSE );
"I Think this Will Help"
[Vote One Here,.....]
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
CEdit m_MyEditControl;
CString m_csEditControlText;
// fill in edit field immediately, bypassing dialog's UpdateData call...
m_MyEditControl.SetWindowText(m_csEditControlText);
|
|
|
|