|
.net has no class wizard like 6.0, if you wanna remove a function or variable you will need to remove it from the .h file of the class, and from the .cpp in case of a function
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
I usually use delete button, but you probably could also use backspace as well.
|
|
|
|
|
Anybody know how to set the width of a console window's app in VC++ 6? Like, say from 80 characters or whatever the defualt is to 120?
Thanks
|
|
|
|
|
I think it could be done with SetConsoleScreenBufferSize and SetConsoleWindowInfo.
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
I know how to build a project in VC6.0 but in VC7.0 the buttons for build are grayed out I am assuming it is because I have not complie the source file but in 7.0 I have not found the menu choose or button to do this Please help
|
|
|
|
|
all you should have to do is have a solution/project open and go to the 'build' drop down menu then 'Build Solution'.
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
|
According to MSDN, if source and target memory blocks overlap, using CopyMemory "the results are undefined". For overlapped blocks, we should use the MoveMemory function instead.
Having that been stated, my question is: why should we use CopyMemory? Is it OK to ALWAYS use MoveMemory even if the blocks do not overlap? Also, what does the verb "Move" imply here? Since the argument of source block is a "const VOID*", which means referenced memory data are unalterable...
Anyway, whats the deffernce between "CopyMemory" and "MoveMemory" other than one cannot copy overlapped blocks and the other can? Thanks a lot.
|
|
|
|
|
=[ Abin ]= wrote:
why should we use CopyMemory?
It may be faster than MoveMemory.
=[ Abin ]= wrote:
Is it OK to ALWAYS use MoveMemory even if the blocks do not overlap?
Absolutelly.
=[ Abin ]= wrote:
what does the verb "Move" imply here?
Nothing. Assembly copy instructions also called move.
|
|
|
|
|
That made things clear, thank you.
|
|
|
|
|
I am sending in an STL vector "keys" via my Create() :
Which should I do? In this case keys doesnt get changed in the class.....
Create( UINT iD, CWnd* pWnd, std::vector(CString) keys)
Or
Create( UINT iD, CWnd* pWnd, std::vector (CString)& keys)
Then I would just copy the incoming vec into a member in the Create function:
m_myKeys = keys;
==========
SO which prototype do I want?
How to get angled brackets to show up in the forum?
Appreciate your help,
ns
|
|
|
|
|
Probably
Create(UINT iD, CWnd*pWnd, const std::vector& keys)
The reason for a reference rather than not is that it prevents the creation of a temporary copy of the object in question, which might be quite expensive. The reason for const is that you're not changing it, so why not say that!
Steve S
[This signature space available for rent]
|
|
|
|
|
Okay so if I wanted to vchange "keys" I skip the const. Thats fine. My last confusion right now is this. I cant use the incoming vector in Create(), but i want to change it. SO I assign it to a member m_myClasVec, but when I make changes to m_myClasVEc they wont get transmitted through to "keys" . Whats the solution to this? It needs to be in a member vector because I want to do stuff to it outside of create....
Appreciate your help,
ns
|
|
|
|
|
In that case, you need to use pointers;
You can't use a reference as a member because you can't assign it after the constructor, so your member will have to be a pointer, and your parameter in Create will too.
Then, of course, you'll have to change all those
m_myClasVEc. into m_myClasVEc-> to make it all work again.
Steve S
[This signature space available for rent]
|
|
|
|
|
Ah....these things are so tricky..........I keep thinking I have these notions of references and pointers under control....I did see that it didnt want an unitialized reference as a member, but couldnt think of how to sidestep it...MAny thanks
Appreciate your help,
ns
|
|
|
|
|
Foe a nice read and quick reference, check out my little article[^] on the topic.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Ah ! Thanks !!! Most illuminating!
Appreciate your help,
ns
|
|
|
|
|
ns wrote:
How to get angled brackets to show up in the forum?
Under your sig window, you have a line named "Formatting", and in this line, between code and & you have the < and >
But you can also write < or > to get them.
~RaGE();
|
|
|
|
|
thanks!!!!
Appreciate your help,
ns
|
|
|
|
|
I'm working with CTreeCtrl, and i want to add ItemDta to an item.
I do:
CString * pURL[2];<br />
pURL[0] = new CString("SITE");<br />
pURL[1] = new CString("GOOOD");<br />
m_pTree.SetItemData(hItemSite, (DWORD) pURL);<br />
It is possible to retrieve the pURL[2] with the GetItemData ?if YES , how ??
CString* pURL[2] = ??????????? m_pTree.GetItemData(hItemSite);
|
|
|
|
|
You really need something like
CString** pURL = new CString*[2];
pUrl[0] = new CString("SITE");
pUrl[1] = new CString("GOOD");
m_pTree.SetItemData(hItemSite,(DWORD)pUrl);
You can then say
CString**pRetrieved = (CString*)m_pTree.GetItemData(hItemSite);
If you need to store multiple items like this, you might consider either a class/structure, or if they are all strings, a CStringArray instead of a simple pointer, especially if you want a varying number of items.
Steve S
[This signature space available for rent]
|
|
|
|
|
Thx !
Steve S wrote:
CString**pRetrieved = (CString*)m_pTree.GetItemData(hItemSite);
i have an error here, "impossible to convert CString* to CString** "
Steve S wrote:
If you need to store multiple items like this, you might consider either a class/structure, or if they are all strings, a CStringArray instead of a simple pointer, especially if you want a varying number of items.
I just need to save 2 CString, but if you think there is a best way to do this i'm OK.
|
|
|
|
|
That should, of course, be
CString**pRetrieved = (CString**)m_pTree.GetItemData(hItemSite);
My excuse is "It's Friday"
Steve S
[This signature space available for rent]
|
|
|
|
|
Steve S wrote:
My excuse is "It's Friday"
looool you have an excuse but not me !
Thx again
|
|
|
|
|
Hi,
I would like to have some help in my project...I am making an application that takes an image from a Twain source supposing the image is in JPG format (or i can accomodate other format) and then compare it with the image already present in image database. The user enters the ID and comparison is just with one image. Kindly tell me what kinda techniques I shoud use and If you have done this kind of project then I will be glad to contact you...Leave me a message ....Urgent Please....
Clouds Drift all around bringing hope of rain but it rains only at one place. Keep your hope alive...
|
|
|
|