Click here to Skip to main content
15,912,578 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralQuestions on behavior of code Pin
yukikyo16-Apr-03 16:16
yukikyo16-Apr-03 16:16 
Generalanyone know of a free utility that can... Pin
Roman Nurik16-Apr-03 15:09
Roman Nurik16-Apr-03 15:09 
GeneralRe: anyone know of a free utility that can... Pin
Nish Nishant16-Apr-03 19:06
sitebuilderNish Nishant16-Apr-03 19:06 
GeneralRe: anyone know of a free utility that can... Pin
Joan M16-Apr-03 21:52
professionalJoan M16-Apr-03 21:52 
GeneralMFC & MDI Pin
Brian Shifrin16-Apr-03 14:54
Brian Shifrin16-Apr-03 14:54 
GeneralRe: MFC & MDI Pin
Brian Shifrin16-Apr-03 14:56
Brian Shifrin16-Apr-03 14:56 
Generalglobal variables Pin
Gabor Kalman16-Apr-03 13:34
Gabor Kalman16-Apr-03 13:34 
GeneralRe: global variables Pin
Maximilien16-Apr-03 13:50
Maximilien16-Apr-03 13:50 
look for the singleton pattern, it's a class that can be instanciated only once, and can live everywhere,

for example ( taken from Design Patter, by Gamma, Helm, Johnson and Vlissides):

class Singleton {
    public:
        static Singleton* Instance();
    protected:
        Singleton();
    private:
        static Singleton* _instance;
    };

The corresponding implementation is

    Singleton* Singleton::_instance = 0;
    
    Singleton* Singleton::Instance () {
        if (_instance == 0) {
            _instance = new Singleton;
        }
        return _instance;
    }



Maximilien Lincourt
For success one must aquire one's self
GeneralRe: global variables Pin
Taka Muraoka16-Apr-03 13:56
Taka Muraoka16-Apr-03 13:56 
GeneralRe: global variables Pin
Christian Graus16-Apr-03 14:14
protectorChristian Graus16-Apr-03 14:14 
Generalstatic libraries Pin
jason9916-Apr-03 12:46
jason9916-Apr-03 12:46 
GeneralSetPaneText not working Pin
jcjollant16-Apr-03 12:16
jcjollant16-Apr-03 12:16 
GeneralUsing Custom Classes in AFX message maps Pin
Anonymous16-Apr-03 10:07
Anonymous16-Apr-03 10:07 
GeneralRe: Using Custom Classes in AFX message maps Pin
Nitron16-Apr-03 16:10
Nitron16-Apr-03 16:10 
GeneralRe: Using Custom Classes in AFX message maps Pin
Anonymous17-Apr-03 4:31
Anonymous17-Apr-03 4:31 
QuestionNot an MFC project?? Pin
Ed K16-Apr-03 8:24
Ed K16-Apr-03 8:24 
AnswerRe: Not an MFC project?? Pin
Joaquín M López Muñoz16-Apr-03 8:38
Joaquín M López Muñoz16-Apr-03 8:38 
AnswerRe: Not an MFC project?? Pin
perlmunger16-Apr-03 8:38
perlmunger16-Apr-03 8:38 
AnswerRe: Not an MFC project?? Pin
Toni7816-Apr-03 21:24
Toni7816-Apr-03 21:24 
GeneralStupid comb box not working Pin
Anonymous16-Apr-03 7:25
Anonymous16-Apr-03 7:25 
GeneralRe: Stupid comb box not working Pin
Anonymous16-Apr-03 8:44
Anonymous16-Apr-03 8:44 
GeneralRe: Stupid comb box not working Pin
perlmunger16-Apr-03 8:57
perlmunger16-Apr-03 8:57 
GeneralRe: Stupid comb box not working Pin
Anonymous16-Apr-03 9:30
Anonymous16-Apr-03 9:30 
GeneralRe: Stupid ... (figured it out, still need help though) Pin
Anonymous16-Apr-03 9:42
Anonymous16-Apr-03 9:42 
GeneralRe: Stupid ... (figured it out, still need help though) Pin
Mr. Maan16-Apr-03 12:07
Mr. Maan16-Apr-03 12:07 

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.