home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / mswindo / programm / misc / 3565 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.2 KB  |  64 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc,comp.windows.ms.programmer
  2. Path: sparky!uunet!walter!porthos!rruxc!andys
  3. From: andys@rruxc.uucp (25651-say)
  4. Subject: TButton compiler errors... HELP!
  5. Organization: Bellcore, Livingston, NJ
  6. Date: Fri, 20 Nov 92 04:27:42 GMT
  7. Message-ID: <1992Nov20.042742.24952@porthos.cc.bellcore.com>
  8. Followup-To: poster
  9. Keywords: OWL TButton
  10. Sender: netnews@porthos.cc.bellcore.com (USENET System Software)
  11. Lines: 51
  12.  
  13. Help!
  14.  
  15.    I have just recently started programming Windows using OWL with
  16. Borland C++ 3.1.  I am trying to test out the TButton class for
  17. use in a program of mine but keep running into a compiler error that
  18. I am not sure of why I am getting it.
  19.    Below is a header file that keeps giving me the error:
  20. ----------------------------------------------------------------------
  21. #ifndef TCALCWIN_H
  22. #define TCALCWIN_H
  23. #include <owl.h>
  24. #include <button.h>
  25.  
  26. #define ID_BUTTON1 102;
  27.  
  28. // Define the applications main window object TCalcWindow.
  29. _CLASSDEF(TCalcWindow)
  30. class TCalcWindow : public TWindow
  31. {
  32. private:
  33.    TButton* PushButton;
  34. public:
  35.    TCalcWindow(PTWindowsObject AParent, LPSTR ATitle);
  36.    LPSTR GetClassName(void);
  37.    void GetWindowClass(WNDCLASS& AWndClass);
  38.    virtual void HandleButtonPush(RTMessage Msg) = [ID_FIRST + ID_BUTTON1];
  39. };
  40.  
  41. #endif
  42.  
  43. ----------------------------------------------------------------------
  44.  
  45. I am getting the following two compiler errors on the HandleButtonPush
  46. definition:
  47.  
  48. Error TCALCWIN.H 21: DDVT id missing ]
  49. Error TCALCWIN.H 21: Declaration terminated incorrectly
  50.  
  51. Anyone know what is wrong??  I am going through the ObjectWindows Book and
  52. on pages 76-79 shows the same type of thing I am attempting to do.  I have
  53. looked at the source code for Step10 and have even cut and pasted the
  54. class into my code with no luck.  So if anyone can inform me of what I
  55. am doing wrong I would appreciate it.
  56.  
  57. Thanks,
  58.  Andy
  59.  
  60. *******************************************************************************
  61. *  Andy Say                        |  E-mail: andys@seas.bellcore.com         *
  62. *  Bell Communications Research    |       I do not speak for Bellcore.       *
  63. *******************************************************************************
  64.