Click here to Skip to main content
15,921,716 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Setting Font for Menu Items Pin
Beer2612-Oct-03 5:09
Beer2612-Oct-03 5:09 
GeneralRe: Setting Font for Menu Items Pin
Ian Darling12-Oct-03 5:22
Ian Darling12-Oct-03 5:22 
GeneralRe: Setting Font for Menu Items Pin
ramya8312-Oct-03 20:30
ramya8312-Oct-03 20:30 
GeneralRe: Setting Font for Menu Items Pin
ramya8312-Oct-03 18:04
ramya8312-Oct-03 18:04 
GeneralRe: Setting Font for Menu Items {EDITED} Pin
Ian Darling12-Oct-03 22:08
Ian Darling12-Oct-03 22:08 
GeneralRe: Setting Font for Menu Items {EDITED} Pin
Mike Dimmick13-Oct-03 1:27
Mike Dimmick13-Oct-03 1:27 
GeneralRe: Setting Font for Menu Items {EDITED} Pin
Ian Darling13-Oct-03 4:53
Ian Darling13-Oct-03 4:53 
GeneralClass constructor modifying another class Pin
immanis10-Oct-03 19:54
immanis10-Oct-03 19:54 
I posted this twice earlier, no responses. They got buried in a few pages of messages.

I have classes car, street, building and static world. The car, street, and building are created and modified and "exist" in the world object. Here is my post (after posting a question about how to create global class objects):

I declared a global static class world, and it was indeed available to all objects. Thank you for the advice. Eventually I'll do the singleton method. The only problem now is, for some reason, objects are incapable of modifying public attributes or calling public methods of the global class.

Lets go back to my example. Before I had the global class, when constructing a "building" object, I had to pass it the myworld object constructor. The constructor would initialize certain variables, and call some initializing member functions. It would also call a member function of the myworld object, that would essentially(on the myworld object side) just increment the building count attribute of the world class. Before and after building object construction, I cout'ed myworld object's building count. It didnt change.
Now, with the static global object myworld, the results are the same. Myworld just refuses to change. Building has been made a friend class to the world class. In fact, nothing is private in the world class.

Just to check my coding, I called world class member functions and modified building counts directly from the main function, and it worked. It just doesnt seem to want to be modified by another object.

Any ideas?

GeneralRe: Class constructor modifying another class Pin
Blake Coverett10-Oct-03 20:57
Blake Coverett10-Oct-03 20:57 
GeneralQuestion about FindWindow. Pin
George210-Oct-03 17:36
George210-Oct-03 17:36 
GeneralRe: Question about FindWindow. Pin
Anthony_Yio10-Oct-03 22:25
Anthony_Yio10-Oct-03 22:25 
GeneralRe: Question about FindWindow. Pin
George211-Oct-03 19:43
George211-Oct-03 19:43 
General.NET and assembly Pin
Sirrius10-Oct-03 17:31
Sirrius10-Oct-03 17:31 
GeneralRe: .NET and assembly Pin
ZoogieZork10-Oct-03 18:20
ZoogieZork10-Oct-03 18:20 
GeneralRe: .NET and assembly Pin
Blake Coverett10-Oct-03 21:02
Blake Coverett10-Oct-03 21:02 
GeneralRe: .NET and assembly Pin
Beer2611-Oct-03 7:08
Beer2611-Oct-03 7:08 
GeneralRe: .NET and assembly Pin
Blake Coverett11-Oct-03 10:06
Blake Coverett11-Oct-03 10:06 
Generalhash trouble Pin
Sirrius10-Oct-03 17:27
Sirrius10-Oct-03 17:27 
GeneralRe: hash trouble Pin
ZoogieZork10-Oct-03 18:11
ZoogieZork10-Oct-03 18:11 
Questionhow to resize and reposition all the controls in a dialog Pin
pampatipraveen10-Oct-03 16:29
pampatipraveen10-Oct-03 16:29 
AnswerRe: how to resize and reposition all the controls in a dialog Pin
Ravi Bhavnani10-Oct-03 16:46
professionalRavi Bhavnani10-Oct-03 16:46 
Generalpassing parameters Pin
Sirrius10-Oct-03 14:00
Sirrius10-Oct-03 14:00 
GeneralRe: passing parameters Pin
Michael Dunn10-Oct-03 14:47
sitebuilderMichael Dunn10-Oct-03 14:47 
GeneralRe: passing parameters Pin
Sirrius10-Oct-03 15:04
Sirrius10-Oct-03 15:04 
GeneralRe: passing parameters Pin
Phil Hamer10-Oct-03 15:34
Phil Hamer10-Oct-03 15:34 

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.