|
The oldest way to do that is to create a .ini file (I don't recommend this approach)
The next old way would be to use CObject Serialization ( I don't recommend this but it might be best for you)
The current way is to use XML and XML API's (like MSXML.dll)
led mike
|
|
|
|
|
hi,
i have to program to validate countries, states and cities for North of America. Do you know a SOA or somethings else that returns all countries, states and cities?
thanks.
|
|
|
|
|
You will need to find a database to either download or query at runtime.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Before you said somethings to another person, you have to understand his needs and approches. If not, yours words are insignificant this means you are useless.
MK.
|
|
|
|
|
Such as this?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
You can use one of the USPS Web APIs, I think the Address Validation one can do this for you. You will have to register to gain access to the API testing server, and then you have to develop, test and validate your implementation and then you get access to the production server.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I want to write a simple record program.
I have a microphone, and I can use it.
But waveInGetNumDevs returns 0.
why? Can somebody help me?
Thanks a lot.
|
|
|
|
|
minihotto wrote: I have a microphone, and I can use it.
Does Sound Recorder app works?
|
|
|
|
|
what is that????
minihotto
|
|
|
|
|
Sound Recorder is Windows "Accessories" application generally using sound card.
Has mic, line inputs and line, speakers output.
Plug your microphone in and run the app to see if it works.
|
|
|
|
|
|
I would like to code games and other applications for my Pocket PC/Palm OS devices. How would you all recommend I go about doing this? I have a full version of Visual Studio 2003 .NET. I am a pure C++ programmer and I also use MFC (no .NET). Any suggestions that you all can make on the best way to go about doing this would be greatly appreciated.
Thanks,
BP
|
|
|
|
|
|
if you want to advertise, buy an emplacement !
if you share the sources, you can also make an article about it.
but DON'T spam the boards with your ads
|
|
|
|
|
It seems its nota question
|
|
|
|
|
I like to create a functionpointer on an instance of an object.
I have a Universal-List that uses an array of pointer to different Rows.
A row has a basic-class and all specific rows ( for example customers ) are derivated from this Class.
Row -> CustomerRow
In the Universal-List i like to create an array of pointer to the member-functions of the rows.
The row exists already as an instance and i like to assign the functionpointer to the memberfonction of this instance...
Is it possible?
MSDN Help says that functionpointer must point to static functions.
But in an instance, the function is precised and accessible, so why does the fctpointer
don't save the "linkage"
Thanks
|
|
|
|
|
baerten wrote: But in an instance, the function is precised and accessible, so why does the fctpointer
don't save the "linkage"
Because with a member function, there is an explicit parameter that is passed to your function: the this parameter (pointer to the instance of the class). If you post some code, maybe we can help you. Basically, what you need to do is specify that the functions in your list are members of your class (by addind a CMyClass:: in front). But without seeing code, it is difficult.
|
|
|
|
|
void RTB::Config_Customer()<br />
{<br />
InternList = (BasicRow**)malloc(NumberofRows*sizeof(BasicRow*));<br />
for(int i=0; i<NumberofRows; i++)<br />
InternList [i] = new CustomerRow();
<br />
ActFillRow = InternList[0];
<br />
CustomerRow* ActCustomerToFill = static_cast<CustomerRow*>( ActFillRow );
MetaTable= (MetaInfo*)malloc(8*sizeof( MetaInfo));<br />
MetaTable[0].Name = "Name";<br />
MetaTable[0].Func = &CustomerRow::SetName;
MetaTable[1].Name = "Firstname";<br />
MetaTable[1].Func = &CustomerRow::SetFirstname;<br />
<br />
}
The MetaTable :
typedef struct MetaInfoForColumns {<br />
CString Name;<br />
ColumnSetter Func;<br />
} MetaInfo;
Column Setter:
typedef void (CustomerRow::*ColumnSetter)(CString); // Functionspointer
Thanks a lot
|
|
|
|
|
You're going to need a CustomerRow object to make the call to MetaTable[].Func if the function is a non-static member variable. If you make the columnsetter functions static they are going to
need a CustomerRow object to access any non-static CustomerRow members.
You could pass a CustomerRow reference/pointer to the function
that uses the metatable to dispatch to the corresponding column setter function.
Without seeing how you are using the metatable I can't give you a code example
Mark
|
|
|
|
|
|
When i displaying all the drives in the tree control,
it displayes drive names as A, C, D like that now i want to this drives as with required names
|
|
|
|
|
Don't confuse drive letter (i.e., name) with volume name.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I derive CStr from CString as..
class CStr : public CString
{
public:
CStr();
virtual ~CStr();
};
and then I declare object of CStr and call some function from CString
void CTestDialogDlg::OnOK()
{
CStr obj;
obj.GetLength();
obj = "Test";
}
the first line is OK but the second line complier show error.
It because I can't call operator in parent class, Right ?
If so, How I define string to object.
|
|
|
|
|
Max++ wrote: I derive CStr from CString as...
Are you sure this is what you want, since CString has no virtual destructor?
Max++ wrote: ...but the second line complier show error.
Are we supposed to guess the error? It likely has to do with a missing "using" declaration.
Aside from the dtor issue, the only argument I can see in your case for going ahead with the derivation is that you want to give your class a new ctor. Because ctors aren't inherited, you must be prepared to write forwarding ctors for all the CString ctors you want to be available in your derived class. Also, if you care about the return types of assignment operators, you must writing forwarding assignment operators. Compared to writing a handful of non-member "free" functions, this begins to sound like a lot of pointless work.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Are you sure this is what you want, since CString has no virtual destructor?
This is only an issue if you're going to delete it polymorphically.
Steve
|
|
|
|