|
Ok Thanks again WhiteSky
You 've been very helpfull i'll try some of the code samples from the liks that you gave me and i hope i get them right this time.
I never thought that connecting to a DB with visual c++ will be that hard
Thanks again.
|
|
|
|
|
How to bind the custom defined ID together with the String when adding the String into the Combobox.
Why do this? Cause I want to get the custom defined ID associated with the String but not the String.
For example,
ID | TEXT | 13 | goods from 13th shop | 11 | goods from 11th shop | ... | ... |
The TEXT content is only for display, when selecting, the ID is wanted.(Because by using the ID, I can get more detailed infomation such as a list of goods.)
But with MFC it is seems I can not associate the customed ID with the TEXT ,what is added into combobox when calling AddString method.
Is the Combobox has any way to satisfy the requirement.
If it has not, I have to build a map between customed IDs and the Combobox self-created IDs.
//////////////////////////////
|
|
|
|
|
|
Thank you for your help
//////////////////////////////
|
|
|
|
|
When i opened my project,the IDE shows the error as classview cannot be loaded.wats the reason for that.And my class view tab in project workspace shows nothing.
|
|
|
|
|
I think, This problem is due to some problem in .clw file.Try deleting that file and rebuild the solution again.
This would solve the problem.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Ya,I did like that.I deleted .Clw file and rebuild the priject but the class view shows only GLOBALS not any class.
Pls help me.
|
|
|
|
|
delete .OPT and .NCB Files and Build the Solution.
Still if it fails,
There is class view add-in 'Restore Class View Add-In' at codeproject.. get this and install this. It will show you all classes.
refer here..
http://www.codeproject.com/macro/restoreclassviewaddin.asp[^]
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
<b><i></i></b>Hi!
I want to know whether there is any limit in number of base classes used in multiple inheritance. If there is a limit what is the maximum number of base classes supported?
Maheswar Reddy
|
|
|
|
|
|
An interesting question, indeed. I don't have a copy of the Standard with me to tell for sure. MSDN doesn't mention any such limit; they just say "a derived class can have a number of direct base classes"
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
Inorder to open the browser, we need to click on the Explorer icon.
Similarly i want my VC++ program with an Icon. How can i do this???
Thanks in advance.
|
|
|
|
|
Go to resource tab,and then click ICon.already there is MFC icon change what ever you want.u can made icon as u like.
|
|
|
|
|
What u answered is how to add an icon in VC++ program.
But what i want is an icon on desktop, clicking on which will execute a file.
For eg When click on notepad icon, notepad.exe will be executed.
In the same way i want my program to get executed when i click on the icon.
Anyhow thanks for ur reply.
|
|
|
|
|
What you want to do is to create a shortcut.
To do this, you need to know how to use COM, and a Windows shell interface IShellLink.
There is almost certainly an article on CP that shows how to do this, if you search on that keyword.
Steve S
Developer for hire
|
|
|
|
|
Do you need to shortcut?
if yes see Here[^]
whitesky
|
|
|
|
|
Hi all,
I have an owner draw list control. i use the DrawItem method to draw the item and sub items.
i seperate the states so whenever item will be disabled i will to draw like this:
if (ODS_DISABLED & lpDrawItemStruct->itemState)
{
// draw somthing
}
problem is i don't know how to bring an item to the state of ODS_DISABLED???
any suggestions?
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Did u tried making the listctrl disabled
nave
|
|
|
|
|
I think he is trying to disable one of the item among the whole.
- NS -
|
|
|
|
|
yes that is what i want to do...
i read in google news groups that one suggested to put an Item Data that will notify if the item is disabled, and in the OnItemChanging return true to prevent the selection of the item if the item data flag is raised....
isn't there an easier way?
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
YaronNir wrote: isn't there an easier way?
I don't have another suggestion yet...
Or you can use any of the states like LVIS_CUT, etc. to do the same...
If you get a better method, please let me know too.
- NS -
|
|
|
|
|
NS17 wrote: Or you can use any of the states like LVIS_CUT, etc. to do the same...
what do u mean?
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Oh! It is only a suggestion as I didn't try it yet.
I meant that if you are not using the states, for example LVIS_CUT state, it can be used as a disable item state.
So u can set the state of the item ( that you want to be disabled ) to the CUT state and in DrawItem you can check the state of each item and if it is in CUT state, you can draw it as disabled.
- NS -
|
|
|
|
|
ok now i follow
but this is good only for the drawing, because i will still need to implement onitemchaning and prevent the selecting for that state....so it is just like puting an item data...
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
YaronNir wrote: is just like puting an item data...
Yes...
But I don't have any other ideas...
- NS -
|
|
|
|