TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: PAT GLENN
from: RAY GEAR
date: 1998-01-23 17:36:00
subject: Borland c++ v 4.52

 Pat, 
        Thanks for the reply. I appreciate you taking the time to help. 
  
 PG>     #ifdef RC_INVOKED  //Place at the beginning of file 
 PG>     // Other lines of resource code 
 PG>     #endif  // Place at the end of the file  
 PG>      
  
 I tried to put this into my .rc file but it made no difference. 
 The program will compile and run but the menu does not appear in the 
 window. 
 
 PG> functions. (Maybe you could post a short snippet) If your program's  
 
 Following is a copy of the .rh file produced by Resource Workshop 
 
 #define EXITMENU       1 
 #define CM_EXIT        24310 
 #define CM_HEIGHT26    106 
 #define CM_HEIGHT20    105 
 #define CM_HEIGHT14    104 
 #define CM_HEIGHT10    103 
 #define CM_HEIGHT8     101 
 
 The first line seems to be the problem. With that removed the menu 
 appears in the window. Following is part of the code to set up the window  
 sub class and assign the menu. 
 
 
 #include  
 #include  
 #include  
 #include  
 #include  
 #include  
 #include  
  
#include "window2.rh"         // This is the file above 
 
class TMyWindow : public TWindow 
{ 
public: 
        TMyWindow(Twindow* parent = 0); 
        ~TMyWindow(); 
protected: 
        virtual void SetupWindow(); 
        BOOL CanClose(); 
        void CmExit(); 
        void CmHeight8(); 
        // rest of menu items as above line 
private: 
        TFont * pFont; 
        void newFont(int); 
        DECLARE_RESPONSE_TABLE(TMyWindow); 
}; 
 
DEFINE_RESPONSE_TABLE1(TMyWindow, TWindow) 
        EV_COMMAND(CM_EXIT, CmExit), 
        EV_COMMAND(CM_HEIGHT8, CmHeight8, 
        //rest of menu options as above line 
END_RESPONSE_TABLE; 
 
class TMyApp : public TApplication
{ 
public: 
        TMyApp() : TApplication() {} 
        void InitMainWindow() 
        { 
                SetMainWindow(new TFrameWindow(0, "Title", new TMyWindow)); 
                GetMainWindow()->AssignMenu("EXITMENU"); 
                EnableBWCC(TRUE); 
        } 
}; 
___ 
 * OFFLINE 1.56 
--- Maximus 2.02
---------------
* Origin: Infoboard - Auckland - (09) 833-8788 - (3:772/140)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.