|
Dear Suhredayan,
This is what i actually need. Thanks for your great help.
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
|
Hello Friends,
Can a class be declared as protected ?
For example
class X : protected Y
{
}
what is signifance of the above code ?
Can a class declared as protected as shown in the above?
Hoping for a reply.
Philip
|
|
|
|
|
phijophlip wrote:
what is signifance of the above code ?
It indicates that any members of X derived from Y have at least protected visibility. If they're defined as public in the base class they'll be protected in the derived class. I like to remember this little table:
A B C D
public public protected private
protected protected protected private
private private private private Where:
- A - is the visibility of the member in the base class
- B - is the visibility of the member in the derived class with public inheritance
- C - is the visibility of the member in the derived class with protected inheritance
- D - is the visibility of the member in the derived class with private inheritance
I hope that's clear enough to understand
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Great Ryan, thats a cool way to remember it. I know this public private stuff but this is a really easy way to recall things quickly.
I hated going to weddings. All the grandmas would poke me saying "You're next". They stopped that when I started doing it to them at funerals.
My Articles
|
|
|
|
|
phijophlip wrote:
Can a class be declared as protected ?
no, a class is a type which you can use to create objects.
in the opposite, a class can have its members (datas or functions) set as public, protected or private, but that delimits only the access to the members from outside of the class...
phijophlip wrote:
class X : protected Y { /*...*/ };
what is signifance of the above code ?
you are not declaring X as protected, you are declaring X, adding the precision that X is derivated ("protectedly") from Y, that means that only public and protected members of Y will be accessible from X...
ps : don't forget the smi-colon (';') after the declaration-closing bracket ('}') of the class...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I am from china,I have been developing software by Visual C++ 6.0 three years.but Visual C++ 6.0 is the last version.Now there are many developers using it to develop in china.so I wonder if Visual C++ 6.0 is still used by many developer all over the world?
your friend:bobi
|
|
|
|
|
|
Hi:
What are you from? Do you develop on .NET?
your friend:bobi
|
|
|
|
|
I use the 6.0 version of the language but I use the .net ide
|
|
|
|
|
Why do you use .net ide instead of VS 6.0?
your friend:bobi
|
|
|
|
|
Using vs.net ide for last 10+ months. But I still missing my shortcuts over here which is replaced with diffrent ones. Like ctrl+shift+g opens the include file etc etc. And also faced some problems at the begining to add oninitdialog() to my dialog class .
suhredayan There is no spoon.
|
|
|
|
|
My general rule of thumb is:
Applications that are complex and large enough to warrant diistribution on media are developed in NET.
Applications that are intended to be distributed by download are developed in VS6 to keep the download size smalller.
Someday in the future when most people are using an OS that installs the Net Framework already I will use NET exclusively. In the meantime, I don't want to require people who are downloading a small software application to possibly also have to download a 25MB framework file just to get the application to run.
Robert
|
|
|
|
|
I agree with you! Do you think how long the VS 6.0 will replace with .NET entirely? thank you very much
your friend:bobi
|
|
|
|
|
Well, win98 has been around for more than 7 seven years, and a lot of people still use it. Newer versions of XP and Win2003 are the only ones that install the fraemework as standard procedure. VS6 is still very much alive and kicking. Who knows? Years if at all is my guess...
|
|
|
|
|
It's probably not really important from a practical perspective if or when the actual platform, for example NET, replaces VS6.
Rather, the meaningful question is at what point in time does any particular skill become widely obsolete or widely required in the job market?
C++ is in general is by no means obsolete the US, but NET has already replaced VS6 in becoming the latest must-have essential skill in much of the job market.
So in the important sense, NET has or soon will "replace" VS6 because employer demand for NET skills have either already surpassed, or soon will surpass VS6 skills in terms of a developer's marketibility.
I could not comment on that status in China.
At what point in time do you think most software companies in China will have managed to acquire bootlegged illigitemate copies of VS.NET? That is the time when VS6 skillsets will need to be replaced by VS.NET skillsets.
|
|
|
|
|
Hi all:
I am using OLE DB consumer templates to access database like:
datasource.Open(...);
session.Open(datasource);
command.Open(session,...)
Question is how could I know there is something or nothing (rows) returned from command.Open() method?
Thank you very much!
Lisoft
|
|
|
|
|
I have been programming for years and thought I know my stuff. Apparently Not. this is a simple CString operation. I have done this many times and never had a problem. The following makes no sense.
//..............
CString asset_class;
CString asset_sub_class;
Object my_object;
asset_class = "Garden Tools";
asset_sub_class = my_object.GetName();
//The GetName function returns a CString containing "Power Tools"
//I know this because I have it on my watch list
m_header_1.SetWindowText("Category: " + asset_class);
m_header_2.SetWindowText("Sub Category: " + asset_sub_class);
m_header_3.SetWindowText(my_object.GetName());
//.........................
the control m_header_1 prints "Category: Garden Tools"
the control m_header_2 prints "Sub Category: "
the control m_header_3 prints "Garden Tools"
The m_header_2 control is not printing "Sub Category: Power tools"
Does anyone have any ideas why?
|
|
|
|
|
Only thing that comes onto my mind is that the function GetName() returns just a reference on a CString object.
But I doubt it's the problem...
--------
Dave
[Math Studio]
|
|
|
|
|
I tried that. If I store the return value in a CString object the object has the data. If i am not concatenating, the window does not show it. I used another solution, i created another static field. I think it might have been that the pixel width given to the control was not large enough to show the full string.
Anyaways - thank you for your time.
|
|
|
|
|
|
Is there anyway to make a class a friend of it and anything that inherits from it? Thanks.
-Ken
|
|
|
|
|
Classes are by definition friends to themselves ( anyone who is not their own friend has serious issues ), and anything derived from it ( most of us try to be friends with our offspring ).
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hey Everybody,
I made a dialog that has 2 sets of a radio button and combo box. When one radio button is set, it disables the other combo box (and enables it's own combo box) and vice versa. I can't seem to find an example where that can be done in the articles. I also want to return the results of the dialog to the calling function. I know it has to do with the DoDataExchange function. I've read though examples but they just say "do this and do that" but they don't tell me how to get it working with my own program. If I can get a set of steps to get it working, I can try and figure it out, I just need some breadcrumbs.
Any help would be greatly appreciated because the data exchanging thing is a very important part of MFC, thanks in advance.
|
|
|
|
|
One method is to create the radio button variables as controls not ints, and create event handlers that enable and disable controls when the respective button has been clicked. Then the OnOK can be overridden. This part is dangerous. I would recommend instead, creating a public variable that stores the radio button state, and then after the DoModal() function returns IDOK pull the value from the variable. Let me know if you would like more detail.
|
|
|
|