Click here to Skip to main content
15,895,537 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Joe Woodbury13-Jul-05 8:10
professionalJoe Woodbury13-Jul-05 8:10 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
firebolt7713-Jul-05 16:27
firebolt7713-Jul-05 16:27 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
Joe Woodbury13-Jul-05 17:44
professionalJoe Woodbury13-Jul-05 17:44 
GeneralRe: troubles in making a filecopy program in visual c++ Pin
firebolt7714-Jul-05 0:21
firebolt7714-Jul-05 0:21 
QuestionDatabase existense in SQL Server ? Pin
Babarsaeed12-Jul-05 19:11
Babarsaeed12-Jul-05 19:11 
AnswerRe: Database existense in SQL Server ? Pin
Christian Graus12-Jul-05 19:51
protectorChristian Graus12-Jul-05 19:51 
AnswerRe: Database existense in SQL Server ? Pin
basementman13-Jul-05 5:00
basementman13-Jul-05 5:00 
Generalstatic global variables problem Pin
VV114412-Jul-05 19:07
VV114412-Jul-05 19:07 
Hi I am having the following probem when creating an MFC application.

I have a static global variable (declared in globals.h which is included in all places where foo is used) of class foo:

static foo foo_1;

I am accessing it in a windows dialog box called WorldView (class name).
From this dialog box I can open another modal dialog box called Options using CDialog::DoModal() method.

Here is my problem, when I try to access "foo" from Options its a completly new version of "foo" - the addresses of this pointer in Options and WorldView do not match. Changes to one "foo" do not reflec in the other "foo", so basically I now have 2 static variable of class "foo", which is really odd.

Can some one explain to me why this is hapening and how to fix it.
Thank you.


GeneralRe: static global variables problem Pin
Christian Graus12-Jul-05 19:47
protectorChristian Graus12-Jul-05 19:47 
GeneralRe: static global variables problem Pin
Bob Stanneveld12-Jul-05 21:04
Bob Stanneveld12-Jul-05 21:04 
GeneralRe: static global variables problem Pin
VV114413-Jul-05 7:06
VV114413-Jul-05 7:06 
GeneralRe: static global variables problem Pin
Bob Stanneveld13-Jul-05 20:28
Bob Stanneveld13-Jul-05 20:28 
GeneralXP-Style menu in win32 Pin
Anonymous12-Jul-05 18:36
Anonymous12-Jul-05 18:36 
GeneralRe: XP-Style menu in win32 Pin
Graham Bradshaw12-Jul-05 22:03
Graham Bradshaw12-Jul-05 22:03 
GeneralVirtualAlloc at specific address Pin
Blake V. Miller12-Jul-05 18:10
Blake V. Miller12-Jul-05 18:10 
GeneralRe: VirtualAlloc at specific address Pin
Toby Opferman12-Jul-05 19:56
Toby Opferman12-Jul-05 19:56 
GeneralRe: VirtualAlloc at specific address Pin
Blake Miller13-Jul-05 8:06
Blake Miller13-Jul-05 8:06 
GeneralTLS in a static library Pin
Chintoo72312-Jul-05 18:06
Chintoo72312-Jul-05 18:06 
GeneralRe: TLS in a static library Pin
Chintoo72312-Jul-05 18:15
Chintoo72312-Jul-05 18:15 
GeneralRe: TLS in a static library Pin
Magnus Westin13-Jul-05 2:32
Magnus Westin13-Jul-05 2:32 
GeneralBitmap in headcontrol does not work fine in Windows XP style Pin
lisoft12-Jul-05 16:26
lisoft12-Jul-05 16:26 
Generaltaskbar problem Pin
da^hype12-Jul-05 15:33
da^hype12-Jul-05 15:33 
GeneralRe: How to Insert a number into the Oracle Pin
Christian Graus12-Jul-05 17:33
protectorChristian Graus12-Jul-05 17:33 
Generalgetting yesterday's date Pin
Camron12-Jul-05 9:50
Camron12-Jul-05 9:50 
GeneralRe: getting yesterday's date Pin
Jose Lamas Rios12-Jul-05 10:01
Jose Lamas Rios12-Jul-05 10:01 

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.