Beispiel #1
0
//-------------------------------------------------------------------
void StatusBarMessage (HWND hwndSB, WORD wMsg)
     {
     switch (wMsg)
          {
          case IDM_ST_GETBORDERS :
               {
               char ach[180] ;
               int aiBorders[3] ;

               Status_GetBorders (hwndSB, &aiBorders) ;
               wsprintf (ach, "Horiz Width = %d\n"
                         "Vert Width = %d\n"
                         "Separator Width = %d",
                         aiBorders[0], aiBorders[1],
                         aiBorders[2]) ;
               MessageBox (GetParent (hwndSB), ach, 
                           "SB_GETBORDERS", MB_OK) ;
               break ;
               }

          case IDM_ST_GETPARTS :
               {
               char ach[80] ;
               int nParts = Status_GetParts (hwndSB, 0, 0) ;
               wsprintf (ach, "Part Count = %d", nParts) ;
               MessageBox (GetParent (hwndSB), ach, 
                           "SB_GETPARTS", MB_OK) ;
               break ;
               }

          case IDM_ST_SETTEXT :
               Status_SetText (hwndSB, 0, 0, 
                               "SB_SETTEXT Message Sent") ;
               break;

          case IDM_ST_SIMPLE :
               {
               static BOOL bSimple = TRUE ;
               Status_Simple (hwndSB, bSimple) ;
               bSimple = (!bSimple) ;
               break ;
               }
          }
     }
Beispiel #2
0
//-------------------------------------------------------------------
void CStatusBar::StatusBarMessage(WORD wMsg)
{
	switch (wMsg) {
   case IDM_ST_GETBORDERS:
      {
      char ach[180];
      int aiBorders[3];

      Status_GetBorders(hwndStatusBar, (LPARAM) &aiBorders[0]);   //lint !e665 !e522
      wsprintfA (ach, "Horiz Width = %d\n"
         "Vert Width = %d\n"
         "Separator Width = %d",
         aiBorders[0], aiBorders[1], aiBorders[2]);   //lint !e530 Symbol 'aiBorders' not initialized
      OutputDebugStringA(ach) ;
      break;
      }

   case IDM_ST_GETPARTS:
      {
      char ach[80];
      int nParts = Status_GetParts (hwndStatusBar, 0, 0);   //lint !e665 !e522
      wsprintfA (ach, "Part Count = %d", nParts);
      OutputDebugStringA(ach) ;
      break;
      }

   case IDM_ST_SETTEXT:
      Status_SetText(hwndStatusBar, 0, 0, "SB_SETTEXT Message Sent");   //lint !e1773 !e522
      break;

   case IDM_ST_SIMPLE:
      {
      static BOOL bSimple = TRUE;
      Status_Simple (hwndStatusBar, bSimple);   //lint !e665 !e522
      bSimple = (!bSimple);
      break;
      }
   }  //lint !e744 
}
Beispiel #3
0
void Statusbar_mes( char *mes )
{
	Status_SetText ( hwndStatusBar, 0, 0, mes ) ;
}
Beispiel #4
0
/************************************************************************
* StatusMessage                                                         *
* - output a simple message to the status bar                           *
************************************************************************/
void StatusMessage(char *msg)
{
	/*EnterCriticalSection(&cs);*/     // was causing locks (possibly)
	Status_SetText(hwndStatusBar,0,0,msg);
	/*LeaveCriticalSection(&cs);    */
}