home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / powergui / toolbar / cbutsimp / cbutsimp.cpp next >
Encoding:
C/C++ Source or Header  |  1996-10-29  |  972 b   |  38 lines

  1. //************************************************************
  2. // Tool Bars  - Simple Custom Button Example
  3. //
  4. // Copyright (C) 1994, Law, Leong, Love, Olson, Tsuji.
  5. // Copyright (c) 1997 John Wiley & Sons, Inc. 
  6. // All Rights Reserved.
  7. //************************************************************
  8. #include <iframe.hpp>
  9. #include <ianimbut.hpp>
  10. #include <isetcv.hpp>
  11. #include <iapp.hpp>
  12. #include <icconst.h>
  13.  
  14. void main()
  15. {
  16. IFrameWindow
  17.   frame ("Simple Custom Button Example");
  18.  
  19. // Create a set canvas for the client area.
  20. ISetCanvas
  21.   client(IC_FRAME_CLIENT_ID, &frame, &frame);
  22.  
  23. // Create the custom button as a latchable button.
  24. ICustomButton
  25.   customButton(11, &client, &client);
  26.  
  27. customButton.enableLatching();
  28. customButton.setText("This is a \n latchable \n custom button!");
  29.  
  30. // Put the canvas in the client area and show the application.
  31. frame
  32.   .setClient(&client)
  33.   .setFocus()
  34.   .show();
  35. IApplication::current().run();
  36.  
  37. }
  38.