delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/23/15:15:10

From: "Steven S. Falls" <broadview AT earthlink DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Function Pointer Problem
Date: Wed, 23 Dec 1998 11:42:28 -0800
References: <367F672B DOT E7A3F4CA AT earthlink DOT net> <367f982c DOT 23433981 AT news DOT snafu DOT de> <367FFB4D DOT DE5C6EFC AT earthlink DOT net> <368027fa DOT 60253828 AT news DOT snafu DOT de>
X-Posted-Path-Was: not-for-mail
X-ELN-Date: 23 Dec 1998 19:39:22 GMT
X-ELN-Insert-Date: Wed Dec 23 11:45:03 1998
Organization: EarthLink Network, Inc.
Lines: 321
Mime-Version: 1.0
NNTP-Posting-Host: ip222.san-francisco22.ca.pub-ip.psi.net
Message-ID: <368147A4.C2FC96D4@earthlink.net>
X-Mailer: Mozilla 4.02 [en]C-DIAL (Win95; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

--------------4EBE1F8BB5B17BE4858E8E51
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

You see, I'm trying to write a fast svga GUI for DJGPP which will be up as freeware
and also will take part in a game I'm writing.
   new_window creates a new window and adds its information to a linked list of
windows
the struct is..

     #define WINHANDLE       long
     typedef struct type_winnode {
        int Width,Height;               //Width and Height of Window(in Pixels)
        int X,Y;                        //X,Y Location;
        int active;                     //Active or Inactive State
        int depth;                      //Window Depth
        unsigned char *ViewPort;        //Windows Viewing Section
        long *YTbl;                     //ViewPort Y-address Table
        void (*funct)();                //Function Called
        WINHANDLE WinHandle;            //Window Handle
        type_winnode *next;             //Pointer To next Window in List
     };
     class winclass {
        private:
           type_winnode node;           //Base window Node
           WINHANDLE ActiveNode;        //Current Active Window
           long Number_Of_Nodes;        //Number of Windows
           long Handle_Count;           //Handle Counter
           long Curr_Depth;             //Curent Depth
           void sort_windows(WINHANDLE *SortList);     //Sorts The Windows
           void Activate(WINHANDLE Handle);
           void DeActivate(WINHANDLE Handle);
        public:
           winclass(void);
           ~winclass(void);
           WINHANDLE new_window(void);
           void delete_window(WINHANDLE Handle);
           type_winnode *window_info(WINHANDLE Handle);
           WINHANDLE Create_Window(int x,int y,int xSize,int ySize,void
     (*WinFunct)());
           int wMouse_X(WINHANDLE Handle);
           int wMouse_Y(WINHANDLE Handle);
           int wMouse_S(WINHANDLE Handle);
           void Display(void);
     };
     In another cpp file
     class apiclass {
        private:
           btnclass BControl;
           msgclass MControl;
           winclass WControl;
        public:
           WINHANDLE new_window(int x,int y,int xSize,int ySize,void
     (*WinFunct)());
           BTNHANDLE new_button(int x,int y,int width, int height,int delay,void
     (*Afunct)(),void (*Sfunct)());
           MSGHANDLE new_message(int x,int y,char *msg,int width,int height);
           void del_window(WINHANDLE Handle);
           void del_button(BTNHANDLE Handle);
           void del_message(MSGHANDLE Handle);
           type_winnode *info_window(WINHANDLE Handle);
           type_btnnode *info_button(BTNHANDLE Handle);
           type_msgnode *info_message(MSGHANDLE Handle);
           void display_windows(void);
           void display_buttons(BTNHANDLE Handle,WINHANDLE wHandle);
           void display_message(type_msgnode *Msg);
           int window_mouse_x_position(WINHANDLE Handle);
           int window_mouse_y_position(WINHANDLE Handle);
           void input_message(type_msgnode *Msg);
           void load_gui_font(char *FileName);
     };
     WINHANDLE apiclass::new_window(int x,int y,int xSize,int ySize,void
     (*WinFunct)()) {
        return(WControl.Create_Window(x,y,xSize,ySize,WinFunct));
     }
     BTNHANDLE apiclass::new_button(int x,int y,int width, int height,int
     delay,void (*Afunct)(),void(*Sfunct)()) {
        return(BControl.new_btn(x,y,width,height,delay,Afunct,Sfunct));
     }
     MSGHANDLE apiclass::new_message(int x,int y,char *msg,int width,int height) {
        return(MControl.New_Msg(x,y,msg,width,height));
     }
     void apiclass::del_window(WINHANDLE Handle) {
        WControl.delete_window(Handle);
     }
     void apiclass::del_button(BTNHANDLE Handle) {
        BControl.delete_btn(Handle);
     }
     void apiclass::del_message(MSGHANDLE Handle) {
        MControl.Delete_Msg(Handle);
     }
     type_winnode * apiclass::info_window(WINHANDLE Handle) {
        return(WControl.window_info(Handle));
     }
     type_btnnode * apiclass::info_button(BTNHANDLE Handle) {
        return(BControl.btn_info(Handle));
     }
     type_msgnode * apiclass::info_message(MSGHANDLE Handle) {
        return(MControl.Msg_Info(Handle));
     }
     void apiclass::display_windows(void) {
        WControl.Display();
     }
     void apiclass::display_buttons(BTNHANDLE Handle,WINHANDLE wHandle) {
        BControl.display_btn(Handle,WControl.window_info(wHandle));
     }
     void apiclass::display_message(type_msgnode *Msg) {
        MControl.FxText(Msg);
     }
     int apiclass::window_mouse_x_position(WINHANDLE Handle) {
        return(WControl.wMouse_X(Handle));
     }
     int apiclass::window_mouse_y_position(WINHANDLE Handle) {
        return(WControl.wMouse_Y(Handle));
     }
     void apiclass::input_message(type_msgnode *Msg) {
        MControl.FxInput(Msg);
     }
     void apiclass::load_gui_font(char *FileName) {
        MControl.LoadFont(FileName);
     }


The reason why new_window is just a regualar function pointer is because then it is
more general and will hopefully work with many different classes.

    Any suggestions to make it work without "castrationg" class functions? I was
thinking of makeing a global buffer and passing the private members of the desired
class in it to get around the need of using or passing  a class function to the GUI
interface (such as ne_window). That would just defete the purpous of  having
classes though, it could get really unorginized.
        Thanks,
                Ardy



--------------4EBE1F8BB5B17BE4858E8E51
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
You see, I'm trying to write a fast svga GUI for DJGPP which will be up
as freeware and also will take part in a game I'm writing.
<BR>&nbsp;&nbsp; new_window creates a new window and adds its information
to a linked list of windows
<BR>the struct is..
<UL><B><I><FONT SIZE=-1>#define WINHANDLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
long</FONT></I></B>
<BR><B><I><FONT SIZE=-1>typedef struct type_winnode {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; int Width,Height;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//Width and Height of Window(in Pixels)</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; int X,Y;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//X,Y Location;</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; int active;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//Active or Inactive State</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; int depth;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//Window Depth</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; unsigned char *ViewPort;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//Windows Viewing Section</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; long *YTbl;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//ViewPort Y-address Table</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; void (*funct)();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//Function Called</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; WINHANDLE WinHandle;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//Window Handle</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; type_winnode *next;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//Pointer To next Window in List</FONT></I></B>
<BR><B><I><FONT SIZE=-1>};</FONT></I></B>
<BR><B><I><FONT SIZE=-1>class winclass {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; private:</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type_winnode node;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//Base window Node</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WINHANDLE ActiveNode;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//Current Active Window</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; long Number_Of_Nodes;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//Number of Windows</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; long Handle_Count;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//Handle Counter</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; long Curr_Depth;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//Curent Depth</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void sort_windows(WINHANDLE
*SortList);&nbsp;&nbsp;&nbsp;&nbsp; //Sorts The Windows</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void Activate(WINHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void DeActivate(WINHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; public:</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; winclass(void);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ~winclass(void);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WINHANDLE new_window(void);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void delete_window(WINHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type_winnode *window_info(WINHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WINHANDLE Create_Window(int
x,int y,int xSize,int ySize,void (*WinFunct)());</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int wMouse_X(WINHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int wMouse_Y(WINHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int wMouse_S(WINHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void Display(void);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>;
<BR>In another cpp file
<BR><B><I><FONT SIZE=-1>class apiclass {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; private:</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; btnclass BControl;</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msgclass MControl;</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; winclass WControl;</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; public:</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WINHANDLE new_window(int
x,int y,int xSize,int ySize,void (*WinFunct)());</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTNHANDLE new_button(int
x,int y,int width, int height,int delay,void (*Afunct)(),void (*Sfunct)());</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSGHANDLE new_message(int
x,int y,char *msg,int width,int height);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void del_window(WINHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void del_button(BTNHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void del_message(MSGHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type_winnode *info_window(WINHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type_btnnode *info_button(BTNHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type_msgnode *info_message(MSGHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void display_windows(void);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void display_buttons(BTNHANDLE
Handle,WINHANDLE wHandle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void display_message(type_msgnode
*Msg);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int window_mouse_x_position(WINHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int window_mouse_y_position(WINHANDLE
Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void input_message(type_msgnode
*Msg);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void load_gui_font(char
*FileName);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>};</FONT></I></B>
<BR><B><I><FONT SIZE=-1>WINHANDLE apiclass::new_window(int x,int y,int
xSize,int ySize,void (*WinFunct)()) {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; return(WControl.Create_Window(x,y,xSize,ySize,WinFunct));</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>BTNHANDLE apiclass::new_button(int x,int y,int
width, int height,int delay,void (*Afunct)(),void(*Sfunct)()) {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; return(BControl.new_btn(x,y,width,height,delay,Afunct,Sfunct));</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>MSGHANDLE apiclass::new_message(int x,int y,char
*msg,int width,int height) {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; return(MControl.New_Msg(x,y,msg,width,height));</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>void apiclass::del_window(WINHANDLE Handle) {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; WControl.delete_window(Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>void apiclass::del_button(BTNHANDLE Handle) {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; BControl.delete_btn(Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>void apiclass::del_message(MSGHANDLE Handle) {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; MControl.Delete_Msg(Handle);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>type_winnode * apiclass::info_window(WINHANDLE
Handle) {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; return(WControl.window_info(Handle));</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>type_btnnode * apiclass::info_button(BTNHANDLE
Handle) {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; return(BControl.btn_info(Handle));</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>type_msgnode * apiclass::info_message(MSGHANDLE
Handle) {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; return(MControl.Msg_Info(Handle));</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>void apiclass::display_windows(void) {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; WControl.Display();</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>void apiclass::display_buttons(BTNHANDLE Handle,WINHANDLE
wHandle) {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; BControl.display_btn(Handle,WControl.window_info(wHandle));</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>void apiclass::display_message(type_msgnode *Msg)
{</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; MControl.FxText(Msg);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>int apiclass::window_mouse_x_position(WINHANDLE
Handle) {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; return(WControl.wMouse_X(Handle));</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>int apiclass::window_mouse_y_position(WINHANDLE
Handle) {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; return(WControl.wMouse_Y(Handle));</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>void apiclass::input_message(type_msgnode *Msg)
{</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; MControl.FxInput(Msg);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR><B><I><FONT SIZE=-1>void apiclass::load_gui_font(char *FileName) {</FONT></I></B>
<BR><B><I><FONT SIZE=-1>&nbsp;&nbsp; MControl.LoadFont(FileName);</FONT></I></B>
<BR><B><I><FONT SIZE=-1>}</FONT></I></B>
<BR>&nbsp;</UL>
The reason why new_window is just a regualar function pointer is because
then it is more general and will hopefully work with many different classes.

<P>&nbsp;&nbsp;&nbsp; Any suggestions to make it work without "castrationg"
class functions? I was thinking of makeing a global buffer and passing
the private members of the desired class in it to get around the need of
using or passing&nbsp; a class function to the GUI interface (such as ne_window).
That would just defete the purpous of&nbsp; having classes though, it could
get really unorginized.
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks,
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Ardy
<BR>&nbsp;
<BR>&nbsp;</HTML>

--------------4EBE1F8BB5B17BE4858E8E51--


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019