
a simple simple question...
Your idea of using theApp is good. The only thing you need is to declare
theApp object in the module where you want to use it. To do this, include
the header containing theApp declaration in that module. Wizard usually
places this declaration in <project_name>.h file.
You can also create a global var, not member of CWInApp-derived class. To do
this:
1. define your var in _one_ cpp-file, e. g.:
int g_var;
2. declare your var in each module where you want to use it, e. g.:
extern int g_var;
(you can place this declaration in some header and #include it whenever
necessary)
3. use the var, e. g.:
g_var = 0;
--
Sincerely,
Alexander
http://www.RSDN.ru - Russian Software Developer Network
Quote:
> hi all,
> I'm new to evc,
> I would like to know how to create a global variable and put value in it??
> I've tried creating a pulic member varible in theApp,
> and set theApp.m_var=myvalue when I click an button,
> but the error says theApp is undefined....
> so, what should I do ??