Click here to Skip to main content
15,911,141 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Close Active Document Pin
Bill Wilson20-Nov-01 13:06
Bill Wilson20-Nov-01 13:06 
GeneralRe: Close Active Document Pin
Troy20-Nov-01 19:48
Troy20-Nov-01 19:48 
Generalproblem with CTreeCtrl::GetSelectedItem() Pin
Vu Nguyen20-Nov-01 8:21
Vu Nguyen20-Nov-01 8:21 
GeneralRe: problem with CTreeCtrl::GetSelectedItem() Pin
Mukkie21-Nov-01 7:15
Mukkie21-Nov-01 7:15 
GeneralRe: problem with CTreeCtrl::GetSelectedItem() Pin
Vu Nguyen21-Nov-01 9:07
Vu Nguyen21-Nov-01 9:07 
GeneralCompiler Errors! AHHHH! Pin
20-Nov-01 7:21
suss20-Nov-01 7:21 
GeneralRe: Compiler Errors! AHHHH! Pin
Joaquín M López Muñoz20-Nov-01 7:28
Joaquín M López Muñoz20-Nov-01 7:28 
GeneralRe: Compiler Errors! AHHHH! Pin
Alvaro Mendez20-Nov-01 7:49
Alvaro Mendez20-Nov-01 7:49 
Joaquin is right that some code would help us solve your exact problem. However, this is mostly likely caused by one thing: global variables not properly defined/declared.

When using a global variable here's the general rule:

1. Define the variable in one (and only one) CPP file, like this:

int g_nWhatever = 0;


2. Declare it externally wherever you need to use it. This is typically done by putting it inside a header file, but it can also be placed at the top of a CPP file or even inside a function's body. Here's what it looks like:

extern int g_nWhatever;



Let me know if this helped.

Regards,
Alvaro
GeneralRe: Compiler Errors! AHHHH! Pin
James Bird20-Nov-01 10:00
James Bird20-Nov-01 10:00 
GeneralRe: Compiler Errors! AHHHH! Pin
Alvaro Mendez20-Nov-01 12:17
Alvaro Mendez20-Nov-01 12:17 
Generaluse a timer to interrupt a background thread - help pleaseee:) Pin
20-Nov-01 3:08
suss20-Nov-01 3:08 
GeneralRe: use a timer to interrupt a background thread - help pleaseee:) Pin
Joaquín M López Muñoz20-Nov-01 5:54
Joaquín M López Muñoz20-Nov-01 5:54 
GeneralRe: use a timer to interrupt a background thread - help pleaseee:) Pin
Nemanja Trifunovic20-Nov-01 7:08
Nemanja Trifunovic20-Nov-01 7:08 
QuestionHow to make the border and titlebar dissapear Pin
Christoffer Sandberg20-Nov-01 2:35
Christoffer Sandberg20-Nov-01 2:35 
AnswerRe: How to make the border and titlebar dissapear Pin
Rui Lopes20-Nov-01 7:32
Rui Lopes20-Nov-01 7:32 
GeneralRe: How to make the border and titlebar dissapear Pin
Christoffer Sandberg20-Nov-01 13:36
Christoffer Sandberg20-Nov-01 13:36 
GeneralRe: How to make the border and titlebar dissapear Pin
Rui Lopes20-Nov-01 23:01
Rui Lopes20-Nov-01 23:01 
QuestionPassing Window Handles? Pin
20-Nov-01 2:07
suss20-Nov-01 2:07 
AnswerRe: Passing Window Handles? Pin
Fazlul Kabir20-Nov-01 2:40
Fazlul Kabir20-Nov-01 2:40 
AnswerRe: Passing Window Handles? Pin
luckylourson20-Nov-01 2:54
luckylourson20-Nov-01 2:54 
AnswerRe: Pass the handle in the constructor. Pin
Masaaki Onishi20-Nov-01 4:12
Masaaki Onishi20-Nov-01 4:12 
Generalabout Linux Pin
Maer72720-Nov-01 1:41
Maer72720-Nov-01 1:41 
GeneralRe: about Linux Pin
Rassman20-Nov-01 2:00
Rassman20-Nov-01 2:00 
GeneralRe: about Linux Pin
markkuk20-Nov-01 2:47
markkuk20-Nov-01 2:47 
GeneralRe: about Linux Pin
Michael P Butler20-Nov-01 2:54
Michael P Butler20-Nov-01 2:54 

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.