HasPBVisualObject

PowerBuilder Native Interface

IPB_Session interface:

HasPBVisualObject method

Description

Syntax

HasPBVisualObject()

Return Values

Examples

PBXRESULT   PB_MyWinAppRunner::RunApplication()
{
    PBXRESULT res;
    pbboolean restart = FALSE;

    do
    {
        res = StartApplication();
        if (res == PBX_OK)
        // Process message dispatch
        {
          if ( GetSession()->HasPBVisualObject() )
          {
            MSG msg;
            while ( GetMessage(&msg, 0, 0, 0) )
            {
              TranslateMessage(&msg);
              DispatchMessage(&msg);

              if ( !GetSession()->HasPBVisualObject() )
                  break;
            }
          }
        }
        else
            break;

        restart = GetSession()->RestartRequested();
        if (restart)
            RecreateSession();
    } while (restart);

    return CleanApplication();
}

Usage

See Also