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

C / C++ / MFC

 
AnswerRe: How to scroll the Edit box without flash Pin
Yiling Lai20-Nov-05 16:03
Yiling Lai20-Nov-05 16:03 
GeneralRe: How to scroll the Edit box without flash Pin
LaHaHa20-Nov-05 18:11
LaHaHa20-Nov-05 18:11 
QuestionMFCListCtrl Question Pin
kevin12720-Nov-05 11:14
kevin12720-Nov-05 11:14 
AnswerRe: MFCListCtrl Question Pin
followait20-Nov-05 14:55
followait20-Nov-05 14:55 
GeneralRe: MFCListCtrl Question Pin
kevin12720-Nov-05 15:51
kevin12720-Nov-05 15:51 
GeneralRe: MFCListCtrl Question Pin
kevin12720-Nov-05 15:59
kevin12720-Nov-05 15:59 
QuestionAre plugins necessary in this situation? Pin
hymerman20-Nov-05 10:49
hymerman20-Nov-05 10:49 
AnswerRe: Are plugins necessary in this situation? Pin
Roger Allen21-Nov-05 6:54
Roger Allen21-Nov-05 6:54 
Something like no 2:

Declare a helper class which is a gene repository. Any new gene (methods) which you want to add register themselves with this repository. All genes inherit from a pure virtual base class, so they have to implement an interface which allows your think procedure to interact with them.

Once you have the repository, you have to create a standard interface through which you need to access these genes. In your case you do not know in advance what parameters they are going to need, this means that you probably need to pass a pointer to an object which allows query access to the "world state"/"creature state" so that gene can make its decisions.

You can ask the repository for a list of the registered genes and store a pointer to the selected on in your creature class. You can then call functions on it.

We do something very similar to this to handle printing of reports where report sections register themselves with a repository, and we ask them if they apply to your document. If they do, they get added to a list which is used to generate the final report.


If you vote me down, my score will only get lower
GeneralRe: Are plugins necessary in this situation? Pin
hymerman21-Nov-05 13:29
hymerman21-Nov-05 13:29 
QuestionCHtmlView Question Pin
Mohammad A Gdeisat20-Nov-05 10:07
Mohammad A Gdeisat20-Nov-05 10:07 
AnswerRe: CHtmlView Question Pin
Sheng Jiang 蒋晟20-Nov-05 10:35
Sheng Jiang 蒋晟20-Nov-05 10:35 
GeneralRe: CHtmlView Question Pin
vikas amin21-Nov-05 0:54
vikas amin21-Nov-05 0:54 
QuestionCFile::GetPosition and Seek Pin
Felagund226820-Nov-05 8:18
Felagund226820-Nov-05 8:18 
AnswerRe: CFile::GetPosition and Seek Pin
Mircea Puiu20-Nov-05 9:58
Mircea Puiu20-Nov-05 9:58 
GeneralRe: CFile::GetPosition and Seek Pin
Felagund226820-Nov-05 10:51
Felagund226820-Nov-05 10:51 
QuestionMFC application migration to C# Pin
jacka199920-Nov-05 7:59
jacka199920-Nov-05 7:59 
AnswerRe: MFC application migration to C# Pin
ThatsAlok20-Nov-05 21:30
ThatsAlok20-Nov-05 21:30 
AnswerRe: MFC application migration to C# Pin
jacka199921-Nov-05 9:05
jacka199921-Nov-05 9:05 
QuestionHow to establish the programming enviroment to begin my DirectX program? Pin
sude20-Nov-05 2:50
sude20-Nov-05 2:50 
AnswerRe: How to establish the programming enviroment to begin my DirectX program? Pin
Gary R. Wheeler20-Nov-05 3:29
Gary R. Wheeler20-Nov-05 3:29 
QuestionVS 2005 Add-Ins Pin
Franz Klein20-Nov-05 0:15
Franz Klein20-Nov-05 0:15 
QuestionCreateFile in ext2 Pin
Aqueel19-Nov-05 21:03
Aqueel19-Nov-05 21:03 
AnswerRe: CreateFile in ext2 Pin
kakan20-Nov-05 19:59
professionalkakan20-Nov-05 19:59 
QuestionSignature bytes Pin
zooley19-Nov-05 20:18
zooley19-Nov-05 20:18 
QuestionHelp for MFC OCX control Pin
Rajesh match19-Nov-05 19:47
Rajesh match19-Nov-05 19:47 

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.