|
LearnVC++MFC wrote: I have a two string one is Array type and second one in simple String
I guess the problem is that you don't understand the basics of C++. You don't have 2 strings, you have 101 strings: 100 are in a array (A) and one is alone (B). Please, review the basis and understand what an array is and what a CString is.
LearnVC++MFC wrote: I need some code example..
It would be much more easy for us if you explain EXACTLY what you are trying to do, because for now it doesn't make any sense to me.
|
|
|
|
|
Can you give me Some line of code how to store String Variable in String array.Plz give me
Thanks in advance
|
|
|
|
|
Oh my god. Is it a joke ? It's the third time you ask that and I gave you code in my first reply already.
|
|
|
|
|
Where you gave this one
A[10] = B; How will think it is code example..
Thanks very much for help like that...
|
|
|
|
|
LearnVC++MFC wrote: Where you gave this one
A[10] = B;
How will think it is code example..
1. That's exactly what you asked for.
2. If you don't recognise this as code you should reconsider your career choice.
LearnVC++MFC wrote: Thanks very much for help like that...
Your sarcasm is highly inappropriate. Cedric (and others) spent a lot of time trying to help you but you're simply too dense to understand.
|
|
|
|
|
How can you expect people to give you an answer when you can't even ask a proper question.
You asked this: "I have two string CString A[100]and CString B.I want to store variable of B in A".
The code I gave you does what you are asking for, so why do you still complain ? I asked you several time to rephrase your question properly, is it my fault if you can't express yourself ? If the code I gave you is not what you are looking for, then why do you continue asking exactly the same question over and over ?
|
|
|
|
|
ok i accept it's my fault...
Can i continue..IF yes the reply me.I will try to do more specific..
|
|
|
|
|
LearnVC++MFC wrote: I will try to do more specific..
Go ahead.
|
|
|
|
|
Thanks
I have told already about two String.CString a[100] and CString b;
Every time b values is change at the run time.And i want to store every value of b at the run time.
I have got some example
CString a[10];
CString b;
a[0] = b;
a[1] = b;
But it is not proper working.Every time both a1[0] and a1[1] values is changed. But i want to store like that..
a[0]="assa",a[1]="iuf".
So plz help me
|
|
|
|
|
First of all, CString a[100] is an array of type CString. In your example you assign the value of "b" to the first two elements of "a". So, your code does exactly what you described:
LearnVC++MFC wrote: Every time both a1[0] and a1[1] values is changed
If you want different values in a[0] and a[1] then you have to assign different values and not the same.
|
|
|
|
|
I really think you need to start by reading a good book on C++ because you don't know at all what you are doing. Do you know what an array is and how to use it ? It seems not.
So, what you have to do is store each new string in a NEW position in the array, not overriding the previous values.
CString a[10];
CString b;
b = "Test";
a[0] = b;
b = "Test2";
a[1] = b;
|
|
|
|
|
I understand the question. It's "please finish my homework assignment for me?"
|
|
|
|
|
I see you need to learn the basics. I advise to try some projects out and read the docs from Microsoft.
Greetings from Germany
|
|
|
|
|
Have you considered something like:
CStringArray A;
CString B;
B = "First value";
A.Add(B);
B = "Second value";
A.Add(B);
B = "Third value";
A.Add(B);
...
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
how can i load image from c: directory and then making a resouce ID for that image using coding as
bmp.loadbitmap require resource ID of bitmap. plz help..
|
|
|
|
|
If you want to do drawing with your bitmap, use the LoadImage() function, with hinst as NULL, lpszName as the path to your bitmap, uType as IMAGE_BITMAP and fuLoad as LR_LOADFROMFILE . This will then return a HANDLE which can be used in GDI drawing functions.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
i need resource id in some method is there anyway to create resource id while loading image .
|
|
|
|
|
As Mark said, resource ID's are for resources only. What is it that you are trying to achieve?
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
use LoadImage() with the LR_LOADFROMFILE flag.
|
|
|
|
|
using HBITMAP hbitmap = (HBITMAP)LoadImage(NULL,"D:\\a.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
but how can make resource ID of this image.
|
|
|
|
|
If you have loaded the bitmap once you havent to load it anymore.
You can make copies or use it. Read the CBitmap class in MFC.
Greetings from Germany
|
|
|
|
|
ani_ikram wrote: how can make resource ID of this image.
You can't. Only resources have resource IDs!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Dear All,
My project requirement is VC++ application need to support multilanguage.That is Im having 3 different language files(english.txt,Català.txt,Français.txt). All files having same messages but different language.I need to access all the messages throws key(ex. 1,2,3..).If i send key(1) and lanuage name means it will show the corresponding language message.
It will be much helpful to me to give some advice on this..
Thank you very much,
|
|
|
|
|
Please check Localisation[^] section of CP.
I hope it helps.
Regards,
Sandip.
|
|
|
|
|
How can I get the ID of a thread that has created a specific window?
for clarification, see we have the handle of a window (e.g m_hWnd). Now for any reason, I'm gonna get the ID of the thread that has created this window.
Please pay attention I mean a window from another application.
Thank you masters!
modified on Friday, September 26, 2008 3:26 AM
|
|
|
|