Click here to Skip to main content
15,921,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionNot able to make entries into vista operating system using reg... functions Pin
hariakuthota2-Sep-08 2:57
hariakuthota2-Sep-08 2:57 
AnswerRe: Not able to make entries into vista operating system using reg... functions Pin
Gary R. Wheeler2-Sep-08 3:03
Gary R. Wheeler2-Sep-08 3:03 
AnswerRe: Not able to make entries into vista operating system using reg... functions Pin
_AnsHUMAN_ 2-Sep-08 3:04
_AnsHUMAN_ 2-Sep-08 3:04 
AnswerRe: Not able to make entries into vista operating system using reg... functions Pin
Perspx2-Sep-08 5:59
Perspx2-Sep-08 5:59 
AnswerRe: Not able to make entries into vista operating system using reg... functions Pin
bob169722-Sep-08 7:01
bob169722-Sep-08 7:01 
GeneralRe: Not able to make entries into vista operating system using reg... functions Pin
hariakuthota2-Sep-08 19:38
hariakuthota2-Sep-08 19:38 
GeneralRe: Not able to make entries into vista operating system using reg... functions Pin
bob169726-Sep-08 5:33
bob169726-Sep-08 5:33 
Questionhow to duplicate object with type_info ? Pin
pedefetoll2-Sep-08 2:52
pedefetoll2-Sep-08 2:52 
I want to duplicate an object, knowing only a base object and the type_info
In following sample, with function DuplicateObject(.), I want to duplicate an object pVarA.
Does anybody have an idea ?

Best regards.

//*****************************************************
class classA
{
public :
classA( string MyComment)
{
_MyComment = MyComment;
}

string _MyComment;
};

//*****************************************************
class classB : public classA
{
public:
classB( string MyComment, string MyOtherComment)
: classA( MyComment)
{
_MyOtherComment = MyOtherComment;
}

string _MyOtherComment;
};

//*****************************************************
void DuplicateObject( classA *pVarA, const type_info& pType)
{
static_cast<ptype> *pVarB = new static_cast<ptype>( ""); // !!! problem

*pVarB = *pVarA; // !!! problem
}

//*****************************************************
void func()
{
// dupplicate object of same class (classic)
classA *pVarA1 = new classA( "hello world !");

classA *pVarA2 = new classA( "");
*pVarA2 = *pVarA1;

// dupplicate object of heritance (problem !!!)
classB *pVarB1 = new classB( "hello world !", "come on !");
DuplicateObject( pVarB1, typeid( pVarB1));
}
AnswerRe: how to duplicate object with type_info ? Pin
Cedric Moonen2-Sep-08 3:02
Cedric Moonen2-Sep-08 3:02 
GeneralRe: how to duplicate object with type_info ? Pin
Gary R. Wheeler2-Sep-08 3:10
Gary R. Wheeler2-Sep-08 3:10 
GeneralRe: how to duplicate object with type_info ? Pin
Cedric Moonen2-Sep-08 3:14
Cedric Moonen2-Sep-08 3:14 
GeneralRe: how to duplicate object with type_info ? Pin
Gary R. Wheeler2-Sep-08 3:45
Gary R. Wheeler2-Sep-08 3:45 
GeneralRe: how to duplicate object with type_info ? Pin
pedefetoll9-Sep-08 0:24
pedefetoll9-Sep-08 0:24 
GeneralRe: how to duplicate object with type_info ? Pin
pedefetoll9-Sep-08 2:46
pedefetoll9-Sep-08 2:46 
GeneralRe: how to duplicate object with type_info ? Pin
Cedric Moonen10-Sep-08 5:57
Cedric Moonen10-Sep-08 5:57 
Questionsetup package creation and deployment Pin
AnithaSubramani2-Sep-08 2:10
AnithaSubramani2-Sep-08 2:10 
AnswerRe: setup package creation and deployment Pin
_AnsHUMAN_ 2-Sep-08 2:13
_AnsHUMAN_ 2-Sep-08 2:13 
GeneralRe: setup package creation and deployment Pin
AnithaSubramani2-Sep-08 2:23
AnithaSubramani2-Sep-08 2:23 
GeneralRe: setup package creation and deployment Pin
_AnsHUMAN_ 2-Sep-08 2:49
_AnsHUMAN_ 2-Sep-08 2:49 
AnswerRe: setup package creation and deployment Pin
sashoalm2-Sep-08 5:57
sashoalm2-Sep-08 5:57 
GeneralRe: setup package creation and deployment Pin
AnithaSubramani3-Sep-08 20:19
AnithaSubramani3-Sep-08 20:19 
GeneralRe: setup package creation and deployment Pin
sashoalm3-Sep-08 20:59
sashoalm3-Sep-08 20:59 
GeneralRe: setup package creation and deployment Pin
AnithaSubramani4-Sep-08 0:43
AnithaSubramani4-Sep-08 0:43 
Questionsend message to view Pin
coding_ram2-Sep-08 2:06
coding_ram2-Sep-08 2:06 
AnswerRe: send message to view Pin
_AnsHUMAN_ 2-Sep-08 2:11
_AnsHUMAN_ 2-Sep-08 2:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.