-
August 29th, 2012, 08:47 AM
#1
some questions about Window Class (WNDCLASS)
I read chapter 19 for Chalres Petzold Book (Windows Programming)..
This chapter explain how to create Multi Document interface (MDI)..
But after reading this chapter I was confused for Window Class ...
I will expalin in simple words ..
for MDI we have to create two windows
first Window is : Frame Window (= Main window of program)
second Window: Child Window
Petzold in his book Created only one window Class Say = WndClass
He Used This class one time to Prepare Frame Window ; Second time He Used the same class to prepare Child Window
the code for frame Window is :
wndclass.lpfnWndProc = FrameWndProc ;
....................
...............
the code for Child Window is :
wndclass.lpfnWndProc = HelloWndProc ;
........................
.............................
My Questions are :
Q1:
should the application have only one Window Class ?? and this will be used for all windows of the program,
Or I can Use many Window Classes in the same Program ?? and Why...
Q2:
and here , Petzold used the same Window class , How I can store the data two times .. I stored the data for wndclass when I create Frame Window
and Again I store the new data for the same Class when I create The Child Window!!!?? or something is not clear with Me??
Thanks & Regards
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|