Click here to Skip to main content
15,918,193 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to use control Pin
BirJas21-Jul-03 23:22
BirJas21-Jul-03 23:22 
GeneralRe: how to use control Pin
ladder22-Jul-03 23:47
ladder22-Jul-03 23:47 
AnswerRe: how to use control Pin
El'Cachubrey21-Jul-03 23:38
El'Cachubrey21-Jul-03 23:38 
GeneralRe: how to use control Pin
ladder22-Jul-03 23:51
ladder22-Jul-03 23:51 
GeneralRe: how to use control Pin
El'Cachubrey23-Jul-03 20:03
El'Cachubrey23-Jul-03 20:03 
AnswerRe: how to use control Pin
Bob Stanneveld22-Jul-03 2:46
Bob Stanneveld22-Jul-03 2:46 
GeneralRe: how to use control Pin
ladder23-Jul-03 0:09
ladder23-Jul-03 0:09 
GeneralRe: how to use control Pin
Bob Stanneveld23-Jul-03 1:38
Bob Stanneveld23-Jul-03 1:38 
Classwizard generated classes are derived from CObject and support dynamic creation! If you look inside the class you should see that the default constructor is protected! You can't create it with the new operator. You should make it a RUNTIME_CLASS and use CreateObject to create the control. Second you should initialize it with the Create() method.

exemple:
<br />
CRuntimeClass *pClass = RUNTIME_CLASS(CSampleControl);<br />
CSampleControl *pControl = (CSampleControl*) pClass->CreateObject();<br />
pControl->Create();<br />


the runtime class contains the RTTI (RunTime Type Information).

hope this helps Smile | :)




A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.



GeneralCHtmlView and frame targets... Pin
mdingler21-Jul-03 22:08
mdingler21-Jul-03 22:08 
GeneralATL problem Pin
novachen21-Jul-03 21:58
novachen21-Jul-03 21:58 
GeneralRe: ATL problem Pin
El'Cachubrey21-Jul-03 23:19
El'Cachubrey21-Jul-03 23:19 
GeneralProblem with CDialogBar and CPropertySheet Pin
BirJas21-Jul-03 21:53
BirJas21-Jul-03 21:53 
QuestionVC++ Problem? Pin
DaveE9th21-Jul-03 21:40
DaveE9th21-Jul-03 21:40 
AnswerRe: VC++ Problem? Pin
Jon Hulatt21-Jul-03 21:43
Jon Hulatt21-Jul-03 21:43 
GeneralRe: VC++ Problem? Pin
DaveE9th21-Jul-03 22:33
DaveE9th21-Jul-03 22:33 
QuestionD3dx8.lib? Pin
DaveE9th21-Jul-03 21:15
DaveE9th21-Jul-03 21:15 
AnswerRe: Where's my D2dx8.lib? Pin
John M. Drescher21-Jul-03 21:19
John M. Drescher21-Jul-03 21:19 
GeneralRe: Where's my D3dx8.lib? Pin
DaveE9th21-Jul-03 21:22
DaveE9th21-Jul-03 21:22 
GeneralRe: Where's my D2dx8.lib? Pin
John M. Drescher21-Jul-03 21:37
John M. Drescher21-Jul-03 21:37 
GeneralRe: Where's my D3dx8.lib? Pin
DaveE9th21-Jul-03 21:41
DaveE9th21-Jul-03 21:41 
Generalneed some help here Pin
FASTian21-Jul-03 20:35
FASTian21-Jul-03 20:35 
GeneralRe: need some help here Pin
JohnJ21-Jul-03 21:03
JohnJ21-Jul-03 21:03 
GeneralRe: need some help here Pin
FASTian21-Jul-03 21:29
FASTian21-Jul-03 21:29 
Questionif I add a text file to the resource, how could I get this file in the programe? Pin
benben21-Jul-03 20:29
benben21-Jul-03 20:29 
AnswerRe: if I add a text file to the resource, how could I get this file in the programe? Pin
Eugene Pustovoyt21-Jul-03 20:41
Eugene Pustovoyt21-Jul-03 20:41 

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.