Click here to Skip to main content
15,889,651 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralEnumWindows() Pin
Nirav Doshi21-Feb-04 12:17
Nirav Doshi21-Feb-04 12:17 
GeneralRe: EnumWindows() Pin
Gary R. Wheeler21-Feb-04 12:36
Gary R. Wheeler21-Feb-04 12:36 
GeneralRe: EnumWindows() Pin
Nirav Doshi21-Feb-04 12:41
Nirav Doshi21-Feb-04 12:41 
Generalconsole i/o problems Pin
#937021-Feb-04 12:04
#937021-Feb-04 12:04 
GeneralRe: console i/o problems Pin
valikac21-Feb-04 14:36
valikac21-Feb-04 14:36 
GeneralRe: console i/o problems Pin
#937022-Feb-04 1:56
#937022-Feb-04 1:56 
GeneralSomeone, Anyone Help Plz Pin
MrNiceBerG21-Feb-04 11:34
MrNiceBerG21-Feb-04 11:34 
GeneralRe: Someone, Anyone Help Plz Pin
Gary R. Wheeler21-Feb-04 12:09
Gary R. Wheeler21-Feb-04 12:09 
Question 1: Global variables in C/C++ work like the following. Suppose you have three source files, Src1.cpp, Src2.cpp, and Src3.cpp, and you want a variable to be global between all three. Variables have to be declared exactly once, so we'll do that in Src1.cpp:
int TheGlobalVariable;
The other two sources will define the global as extern like this:
extern int TheGlobalVariable;
The extern keyword lets the compiler and the linker know that this variable is declared elsewhere (which means that it's storage is in another place).

Question 2: All windows (buttons, edit controls, anything) can be made to 'appear' and 'disappear' the same way, using the ShowWindow() function. The basic Win32 API function is like this:
ShowWindows(HWND window,int show_cmd);
where window is the handle to the window, and show_cmd is the operation you want to perform. The two values for show_cmd you are interested in are SW_SHOW and SW_HIDE which 'show' and 'hide' the window, respectively.

If you are using MFC, all windows ultimately have CWnd as a base class, which has the method
ShowWindows(int show_cmd);
where show_cmd takes the same values as the Win32 API function.


Software Zen: delete this;
GeneralRe: Someone, Anyone Help Plz Pin
Ravi Bhavnani21-Feb-04 12:32
professionalRavi Bhavnani21-Feb-04 12:32 
GeneralRe: Someone, Anyone Help Plz Pin
Gary R. Wheeler21-Feb-04 13:05
Gary R. Wheeler21-Feb-04 13:05 
GeneralNeed help with restaring a thread Pin
Aralguppe21-Feb-04 8:23
Aralguppe21-Feb-04 8:23 
GeneralRe: Need help with restaring a thread Pin
Neville Franks21-Feb-04 9:50
Neville Franks21-Feb-04 9:50 
GeneralRe: Need help with restaring a thread Pin
Tim Smith21-Feb-04 12:10
Tim Smith21-Feb-04 12:10 
GeneralRe: Need help with restaring a thread Pin
Neville Franks21-Feb-04 20:01
Neville Franks21-Feb-04 20:01 
GeneralRe: Need help with restaring a thread Pin
Aralguppe22-Feb-04 7:09
Aralguppe22-Feb-04 7:09 
GeneralRe: Need help with restaring a thread Pin
Neville Franks22-Feb-04 9:24
Neville Franks22-Feb-04 9:24 
GeneralRe: Need help with restaring a thread Pin
Gary R. Wheeler21-Feb-04 12:21
Gary R. Wheeler21-Feb-04 12:21 
GeneralRe: Need help with restaring a thread Pin
Aralguppe22-Feb-04 6:40
Aralguppe22-Feb-04 6:40 
GeneralRe: Need help with restaring a thread Pin
Gary R. Wheeler22-Feb-04 15:43
Gary R. Wheeler22-Feb-04 15:43 
Generalrotate function Pin
Cuu21-Feb-04 7:55
Cuu21-Feb-04 7:55 
GeneralRe: rotate function Pin
alex.barylski21-Feb-04 11:16
alex.barylski21-Feb-04 11:16 
GeneralRe: rotate function Pin
Cuu21-Feb-04 19:32
Cuu21-Feb-04 19:32 
GeneralRe: rotate function Pin
Cuu22-Feb-04 4:23
Cuu22-Feb-04 4:23 
GeneralVisual C++ 6 Syntax Highlighting Pin
Archer28221-Feb-04 7:11
Archer28221-Feb-04 7:11 
GeneralRe: Visual C++ 6 Syntax Highlighting Pin
Ravi Bhavnani21-Feb-04 8:07
professionalRavi Bhavnani21-Feb-04 8: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.