Click here to Skip to main content
15,920,801 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to stop popup menu from closing? Pin
Iain Clarke, Warrior Programmer19-Jul-09 20:38
Iain Clarke, Warrior Programmer19-Jul-09 20:38 
QuestionBN_CLICKED not sent to parent. (Button control) Pin
Netc19-Jul-09 3:57
Netc19-Jul-09 3:57 
AnswerRe: BN_CLICKED not sent to parent. (Button control) Pin
Iain Clarke, Warrior Programmer19-Jul-09 8:07
Iain Clarke, Warrior Programmer19-Jul-09 8:07 
AnswerRe: BN_CLICKED not sent to parent. (Button control) Pin
Netc19-Jul-09 12:59
Netc19-Jul-09 12:59 
GeneralRe: BN_CLICKED not sent to parent. (Button control) Pin
Iain Clarke, Warrior Programmer19-Jul-09 20:39
Iain Clarke, Warrior Programmer19-Jul-09 20:39 
QuestionProgram Deployment Pin
Bram van Kampen18-Jul-09 15:00
Bram van Kampen18-Jul-09 15:00 
AnswerRe: Program Deployment Pin
Rick York18-Jul-09 16:50
mveRick York18-Jul-09 16:50 
QuestionMFC Functions Pin
sidkraft18-Jul-09 14:07
sidkraft18-Jul-09 14:07 
AnswerRe: MFC Functions Pin
CPallini18-Jul-09 21:16
mveCPallini18-Jul-09 21:16 
QuestionIs there any way to convert resource name to resource id? Pin
transoft18-Jul-09 11:51
transoft18-Jul-09 11:51 
AnswerRe: Is there any way to convert resource name to resource id? Pin
Stuart Dootson18-Jul-09 13:20
professionalStuart Dootson18-Jul-09 13:20 
QuestionControls flickering, (buttons over a static control) Pin
Netc18-Jul-09 9:36
Netc18-Jul-09 9:36 
AnswerRe: Controls flickering, (buttons over a static control) Pin
transoft18-Jul-09 11:53
transoft18-Jul-09 11:53 
GeneralRe: Controls flickering, (buttons over a static control) Pin
Netc18-Jul-09 13:20
Netc18-Jul-09 13:20 
AnswerRe: Controls flickering, (buttons over a static control) Pin
Moak19-Jul-09 5:41
Moak19-Jul-09 5:41 
QuestionCSocket::Create function has thrown exception Pin
Elsie18-Jul-09 5:31
Elsie18-Jul-09 5:31 
AnswerRe: CSocket::Create function has thrown exception Pin
Moak19-Jul-09 3:38
Moak19-Jul-09 3:38 
AnswerRe: CSocket::Create function has thrown exception Pin
decentsmile28-Jan-10 6:04
decentsmile28-Jan-10 6:04 
QuestionDestructor Pin
Gjm18-Jul-09 3:17
Gjm18-Jul-09 3:17 
AnswerRe: Destructor Pin
Stuart Dootson18-Jul-09 3:29
professionalStuart Dootson18-Jul-09 3:29 
AnswerRe: Destructor Pin
Bram van Kampen18-Jul-09 15:22
Bram van Kampen18-Jul-09 15:22 
AnswerRe: Destructor Pin
Iain Clarke, Warrior Programmer19-Jul-09 8:16
Iain Clarke, Warrior Programmer19-Jul-09 8:16 
GeneralUninstallation of Visual C++ 8.0 ATL (x86) WinSXS MSM Pin
VictorSotnikov18-Jul-09 2:36
VictorSotnikov18-Jul-09 2:36 
QuestionCreating new object from type_info (typeid) Pin
Tomas(cz)18-Jul-09 2:13
Tomas(cz)18-Jul-09 2:13 
Hello,
I would like to ask, if it is possible to create a new object of some type when i only have the object type_info.
I need to have a map that stores a pair<int,some class="" info=""> and than a function that returns new object (all the objects are derived from one base class) according to the the id in the map.
map<int,type_info> myMap;

base_class* GetObject(int id)
{
map<int,type_info>::iterator iter = myMap.find(id);
if( iter != myMap.end() )
{
return new object according to iter.second
}
}
I know I could just check for the id and return the object of specific type, but the problem is that i don't know yet what types of object will be stored. That would mean that every time I create a new class I should add it manually in this code.
So if there any way to create a new object from some information such as type_info?
Thank you for your help.
AnswerRe: Creating new object from type_info (typeid) Pin
Stuart Dootson18-Jul-09 2:55
professionalStuart Dootson18-Jul-09 2:55 

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.