home *** CD-ROM | disk | FTP | other *** search
- Path: news.unige.ch!news
- From: erbuke@sc2a.unige.ch (Levent ERBâ–„KE)
- Newsgroups: comp.lang.c++
- Subject: EvGetMinMaxInfo in Borland C++ 4.52 - nouveau document texte.txt [1/1]
- Date: 12 Mar 1996 21:18:18 GMT
- Organization: TAZ
- Message-ID: <4i4pmq$32l@uni2f.unige.ch>
- NNTP-Posting-Host: 129.194.16.81
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.7
-
- I try to make a custom window derivate from TWindow class.
-
- I can't understand why the "EvGetMinMaxInfo" is never called
- when the size of the window is changing during an application,
- even tough the "EvSize" function work correctly (I can see that
- because I put a MessageBox in each function to see if this last
- is called) !
-
- I find one solution, is to declare and define the
- "EvGetMinMaxInfo" in a "TFrameWindow" class in which I put
- the "TCustomWindow" as client in the constructor declaration
- of "TFrameWindow". In this case, the "EvGetMinMaxInfo" work.
- But I definitively want to do that in the "TCustomWindow"
- class to be completely independant.
-
- If you know how resolved this problem, please send me the
- result to: erbuke@sc2a.unige.ch
- Thanks in advance !
-
-
-
- This is the code I try to use for the module of TCustomWindow
- --------------------------------------------------------------
- #include <owl\owlpch.h>
- #pragma hdrstop
-
- class TCustomWindow : public TWindow {
- public:
-
- TCustomWindow(TWindow* parent = 0);
-
- protected:
-
- void EvSize(uint, TSize &);
- void EvGetMinMaxInfo(MINMAXINFO &);
-
- DECLARE_RESPONSE_TABLE(TCustomWindow);
- };
-
-
-
- DEFINE_RESPONSE_TABLE1(TCustomWindow, TWindow)
- EV_WM_SIZE,
- EV_WM_GETMINMAXINFO,
- END_RESPONSE_TABLE;
-
-
- TCustomWindow::TCustomWindow(TWindow* parent) : TWindow(parent, 0, 0) {
-
- Attr.Style |= WS_VSCROLL | WS_HSCROLL;
- }
-
-
-
- void TCustomWindow::EvSize(uint, TSize &) {
-
- MessageBox("EvSize");
- }
-
- void TCustomWindow::EvGetMinMaxInfo(MINMAXINFO &) {
-
- MessageBox("EvGetMinMaxInfo");
- }
-
-
-
- --------------------------------------------------------------
-