home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************
- * SVCINF.CXX
- * (c) 1992-1994 STAR DIVISION
- *******************************************************************/
-
- #include <sv.hxx>
- #include "svdde.hxx"
-
- // --- class ClientWindow ------------------------------------------
-
- class ClientWindow : public WorkWindow
- {
- FixedText aText;
-
- public:
- ClientWindow();
-
- void Resize();
- void Paint( const Rectangle& );
- };
-
- // --- class ClientApp ---------------------------------------------
-
- class ClientApp : public Application
- {
- public:
- void Main( int, char* [] );
- };
-
- // --- Instance of Class Application ------------------------------
-
- ClientApp aMyApp;
-
- // --- ClientApp::Main() -------------------------------------------
-
- void ClientApp::Main( int, char* [] )
- {
- ClientWindow aWin;
- aWin.SetText( String( "DDE Services" ) );
- aWin.ChangeSizePixel( Size( 300, 200 ) );
- aWin.Show();
- Execute();
- }
-
- // --- ClientWindow::ClientWindow() --------------------------------
-
- ClientWindow::ClientWindow() :
- WorkWindow( NULL, WinBits( WB_APP | WB_STDWORK ) ),
- aText( this, WinBits( WB_CENTER ) )
- {
- aText.Show();
- }
-
- // --- ClientWindow::Resize() --------------------------------------
-
- void ClientWindow::Resize()
- {
- aText.ChangeOutputSizePixel( GetOutputSizePixel() );
- }
-
- // --- ClientWindow::Paint() ---------------------------------------
-
- void ClientWindow::Paint( const Rectangle& )
- {
- String s;
- DdeServiceList aServices;
- String* p;
-
- for ( p = aServices.GetServices().First(); p ;
- p = aServices.GetServices().Next() )
- {
- s += "\r\n";
- s += *p;
- }
-
- aText.SetText( s );
- }
-