Click here to Skip to main content
15,922,407 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Help!How to use getProcessMemoryInfo to get process CPU usage? Pin
John M. Drescher30-Jun-03 16:51
John M. Drescher30-Jun-03 16:51 
General[HELP ME]i can't implement multi selection and drag drop both for CTreeView Pin
HeartFriend30-Jun-03 15:35
HeartFriend30-Jun-03 15:35 
GeneralBackground for SDI document Pin
ppathan30-Jun-03 12:05
ppathan30-Jun-03 12:05 
GeneralRe: Background for SDI document Pin
basementman30-Jun-03 16:11
basementman30-Jun-03 16:11 
GeneralRe: Background for SDI document Pin
ppathan1-Jul-03 4:29
ppathan1-Jul-03 4:29 
QuestionDoes anybody have any experience making a Help app in MSVC++? Pin
nssone30-Jun-03 11:53
nssone30-Jun-03 11:53 
AnswerRe: Does anybody have any experience making a Help app in MSVC++? Pin
Toni7830-Jun-03 16:23
Toni7830-Jun-03 16:23 
QuestionWhy Use this Return Statement? Pin
ursus zeta30-Jun-03 11:32
ursus zeta30-Jun-03 11:32 
I am reading "Windows Graphics Programming", by Feng Yuan, and in the beginning he writes his own custom Window class to demonstrate a number of code techniques. It's C++, and looks a lot like the classic style of Petzold (I'm sure many of you are familiar with Petzold). Anyway, he writes two Windows Procedures for his class, one virtual and one static, (this is kind of confusing) so that the Windows system will dispatch messages to the correct message handler (he subclasses his child windows from this class).
Anyway, forget all that, my question is about something else entirely. In his header file for this custom window class, he lists the usual function calls you would make: the two Windows Procedures, constructor(void), destructor, Create, RegisterClass, and sets up the default message loop. Then, and this is what I don't understand, he does this:


BOOL ShowWindow(int nCmdShow) const<br />
{<br />
 return ::ShowWindow(m_hWnd, nCmdShow); <br />
}<br />
<br />
BOOL UpdateWindow(void) const<br />
{ <br />
return ::UpdateWindow(m_hWnd);<br />
}<br />

What exactly do those return statements do?
Oh, sorry, m_hWnd is the handle to the Window(type HWND). In his constructor, he does this:

KWindow(void) //this is his custom window class<br />
{<br />
  m_hWnd = NULL; <br />
}

AnswerRe: Why Use this Return Statement? Pin
Neville Franks30-Jun-03 11:51
Neville Franks30-Jun-03 11:51 
GeneralRe: Why Use this Return Statement? Pin
ursus zeta30-Jun-03 13:10
ursus zeta30-Jun-03 13:10 
GeneralRe: Why Use this Return Statement? Pin
Neville Franks30-Jun-03 13:15
Neville Franks30-Jun-03 13:15 
QuestionResource folder is missing? Pin
DaveE9th30-Jun-03 9:59
DaveE9th30-Jun-03 9:59 
AnswerRe: Resource folder is missing? Pin
Dave Bryant30-Jun-03 11:22
Dave Bryant30-Jun-03 11:22 
GeneralRe: Resource folder is missing? Pin
DaveE9th1-Jul-03 4:59
DaveE9th1-Jul-03 4:59 
GeneralQuick Instance Handle Question Pin
fluxt30-Jun-03 9:26
fluxt30-Jun-03 9:26 
GeneralRe: Quick Instance Handle Question Pin
Peter Weyzen30-Jun-03 9:31
Peter Weyzen30-Jun-03 9:31 
GeneralRe: Quick Instance Handle Question Pin
fluxt30-Jun-03 9:37
fluxt30-Jun-03 9:37 
GeneralRe: Quick Instance Handle Question Pin
basementman30-Jun-03 11:14
basementman30-Jun-03 11:14 
GeneralSocks Proxy in Winsock :: Winsock Pin
valikac30-Jun-03 8:54
valikac30-Jun-03 8:54 
GeneralRe: Socks Proxy in Winsock :: Winsock Pin
Peter Weyzen30-Jun-03 9:19
Peter Weyzen30-Jun-03 9:19 
Generalcreating an array of the corect size Pin
johnstonsk30-Jun-03 7:52
johnstonsk30-Jun-03 7:52 
GeneralRe: creating an array of the corect size Pin
David Crow30-Jun-03 8:22
David Crow30-Jun-03 8:22 
GeneralRe: creating an array of the corect size Pin
Dean Goodman30-Jun-03 8:52
Dean Goodman30-Jun-03 8:52 
GeneralRe: creating an array of the corect size Pin
johnstonsk30-Jun-03 9:13
johnstonsk30-Jun-03 9:13 
GeneralRe: creating an array of the corect size Pin
johnstonsk30-Jun-03 9:21
johnstonsk30-Jun-03 9:21 

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.