示例#1
0
int main(int argc, char** argv) {


	int i,j,k;
	int num,temp;
	i = 0;
	while (scanf("%s",szA[i])!= EOF)
			i++;
	for (j = 0; j < i; j++)
	{
		sscanf(szA[j],"%s",szB[j]);
		//printf("%s ",szB[j]);
	}

	qsort (szA,i,sizeof(szA[0]),cmp);// 脑残了,居然直接写ROW,不一定是满的呀 
//	for ( j = 0; j < i; j++)
//	   printf("%s ",szA[j]);
	//   printf("\n");
	for ( j = 0; j < i; j++)
	{
		//printf("%s ",szA[j]);
		k = FindPosition(szB[j],i); 
	//	printf("%d ",k);
		if (k == 0)
		{
			num = strc(szA[k],szA[k+1]);
			szA[k][num] = '\0';
		//	printf("%d ",num);
			printf("%s %s\n",szB[j],szA[k]);
		}
		else if (k == i - 1)
		{
			num = strc(szA[k-1],szA[k]);
			szA[k][num] = '\0';
		//	printf("%d ",num);
			printf("%s %s\n",szB[j],szA[k]);
		}
		else{
			num = strc(szA[k-1],szA[k]);
			if (strc(szA[k],szA[k+1])> num)
				num = strc(szA[k],szA[k+1]);
			szA[k][num] = '\0';
			//printf("%d ",num);
			printf("%s %s\n",szB[j],szA[k]);
		}
	}
	
	
	return 0;
}
示例#2
0
int main()
{
	char a[100],b[]="this is a book.";
	strc(a,b);
	puts(a);
	getchar();
	return 0;
}
示例#3
0
// ------------------------------------------------------------------------------------------------
//
//
void InstEditor::draw(Drawable *S, int active)
{
  int cy;
  TColor f,b;
  char str[26],str2[5];

  //    memset(str,' ',26); str[25]=0;

  for (cy=0;cy<ysize;cy++) {

    int inst_num = list_start+cy ;

    memset(str,' ',26); str[25]=0;
    strc(str,(char *)&song->instruments[inst_num]->title[0]);
    printBG(col(x),row(cy+y),str,COLORS.EditText,COLORS.EditBG,S);

    //<Manu>

    if(song->instruments[inst_num]->IsUsed()) printBG(col(x-4), row(cy+y), INSTRUMENT_USED_MARK, COLORS.Text, COLORS.Background, S);

    sprintf(str2,"%.2d", inst_num);
    printBG(col(x-3),row(cy+y),str2,COLORS.Text,COLORS.Background,S);



    if (active) {

      f = COLORS.EditBG;  
      b = COLORS.Highlight;

    }
    else {

      f = COLORS.EditBG;  
      b = COLORS.EditText;
    }

    if (cy == cursor) {

      if (text_cursor<24) {

        printcharBG(col(x + text_cursor),row(cy+y),song->instruments[inst_num]->title[text_cursor],f,b,S);
        printBG(col(x+25),row(cy+y),"Play",COLORS.EditText,COLORS.EditBG,S);
      }
      else printBG(col(x+25),row(cy+y),"Play",f,b,S);
    } 
    else printBG(col(x+25),row(cy+y),"Play",COLORS.EditText,COLORS.EditBG,S);
    
    printcharBG(col(x + 24),row(cy+y),168,COLORS.Lowlight,COLORS.EditBG,S);
  }

  frm->type=0;
  frm->x=x; frm->y=y; frm->xsize=xsize; frm->ysize=ysize;
  frm->draw(S,0);
  
  screenmanager.Update(col(x-4),row(y-1),col(x+xsize+1),row(y+ysize+1));
}
示例#4
0
文件: la.c 项目: chetank88/mywork
int main ()
{
	
 	FILE *fout=fopen("hellof.c","r");
 
  char str[100];
  char pch[100];
  int i=0;
  int j=0;
  while(!feof(fout))
  {
	  i=0,j=0;
	  
	
    //printf("%s",pch);
	  fgets(str,100,fout);
  while (i<strlen(str))
  {
    strc(str,pch,i,j);
    //printf("%s",pch);
    
		if(strcmp(pch,"for")==0)
		{
		printf("FOR\n");
		i=j+1;
		j=i;
		//printf("%d\n%d",i,j);
	   }
		else if(strcmp(pch,"if")==0)
		{
		printf("IF\n");
		  	i=j+1;
		j=i;
	    }
		else if(strcmp(pch,"else")==0)
		{
		printf("ELSE\n");
			i=j+1;
		j=i;
		
	    }
		else if(strcmp(pch,"int")==0)
		{
		printf("INT\n");
		 	i=j+1;
		j=i;
	    }
	    else if(strcmp(pch,"return")==0)
		{
		printf("RETURN\n");
		 	i=j+1;
		j=i;
	    }
		else
		{
			j++;
		//printf("<ID>");
	
	    }
   }
}
  
  return 0;
}
INT main( INT argc, PCHAR argv[] )
{
 // Сбрасываем свойства приложения.
 bzero( &Enhancer, sizeof( ENHANCER ) );

 // Определяем приложение в системе.
 Enhancer.Application = WinInitialize( 0 );

 // Если это сделать не удалось - выход.
 if( Enhancer.Application == NULLHANDLE )
  {
   // Звук - ошибка.
   WinAlarm( HWND_DESKTOP, WA_ERROR );
   // Выход.
   DosExit( EXIT_PROCESS, 0 );
  }

 // Создаем очередь сообщений.
 HMQ Message_queue = WinCreateMsgQueue( Enhancer.Application, 0 );

 // Если очередь создать не удалось - выход.
 if( Message_queue == NULLHANDLE )
  {
   // Звук - ошибка.
   WinAlarm( HWND_DESKTOP, WA_ERROR );
   // Выход.
   WinTerminate( Enhancer.Application );
   DosExit( EXIT_PROCESS, 0 );
  }

 // Проверяем системные настройки.
 CheckSystemConfig();

 // Запускаем составляющие приложения.
 StdLib_Start();
 Strings_Start();
 Files_Start();

 Environment_Start();
 EnhancerProperties_Start();

 Loader_Start();
 Launcher_Start();

 // Узнаем, что надо сделать.
 if( argc == 2 )
  {
   if( stristr( "hide",    argv[ 1 ] ) ) Enhancer.Launcher_mode = 1;
   if( stristr( "mini",    argv[ 1 ] ) ) Enhancer.Launcher_mode = 1;
   if( stristr( "launch",  argv[ 1 ] ) ) Enhancer.Launcher_mode = 1;
   if( stristr( "enhance", argv[ 1 ] ) ) Enhancer.Enhancer_mode = 1;
  }

 // Возможно, надо вызвать окно настроек.
 if( argc == 2 )
  {
   if( strstr( "ControlCenter", argv[ 1 ] ) )
    {
     CHAR Path_to_ControlCenter[ SIZE_OF_PATH ] = "";
     GetCurrentPath( Path_to_ControlCenter );
     strcat( Path_to_ControlCenter, "\\Nice-eCS.exe" );

     Execute( Path_to_ControlCenter, argv[ 1 ] );

     WinDestroyMsgQueue( Message_queue );
     WinTerminate( Enhancer.Application );
     DosExit( EXIT_PROCESS, 0 );
    }
  }

 // Если действие не распознано - выход.
 if( !Enhancer.Enhancer_mode && !Enhancer.Launcher_mode )
  {
   WinDestroyMsgQueue( Message_queue );
   WinTerminate( Enhancer.Application );
   DosExit( EXIT_PROCESS, 0 );
  }

 // Если окно приложения уже есть - выход.
 {
  CHAR Semaphore_name[] = "\\SEM32\\NICE-OS2!L"; HMTX hmtxAlreadyRunning = NULLHANDLE;
  if( Enhancer.Enhancer_mode ) Semaphore_name[ strlen( Semaphore_name ) - 1 ] = 'E';

  if( DosOpenMutexSem( Semaphore_name, &hmtxAlreadyRunning ) == NO_ERROR )
   {
    WinDestroyMsgQueue( Message_queue );
    WinTerminate( Enhancer.Application );
    DosExit( EXIT_PROCESS, 0 );
   }
  else
   {
    DosCreateMutexSem( Semaphore_name, &hmtxAlreadyRunning, DC_SEM_SHARED, 1 );
   }
 }

 // Загрузчик должен запускаться до расширителя.
 if( Enhancer.Launcher_mode )
  {
   CHAR Semaphore_name[] = "\\SEM32\\NICE-OS2!E"; HMTX hmtxAlreadyRunning = NULLHANDLE;

   if( DosOpenMutexSem( Semaphore_name, &hmtxAlreadyRunning ) == NO_ERROR )
    {
     WinDestroyMsgQueue( Message_queue );
     WinTerminate( Enhancer.Application );
     DosExit( EXIT_PROCESS, 0 );
    }
  }

 // Расширитель должен запускаться после загрузчика
 if( Enhancer.Enhancer_mode )
  {
   CHAR Semaphore_name[] = "\\SEM32\\NICE-OS2!L"; HMTX hmtxAlreadyRunning = NULLHANDLE;

   if( DosOpenMutexSem( Semaphore_name, &hmtxAlreadyRunning ) != NO_ERROR )
    {
     WinDestroyMsgQueue( Message_queue );
     WinTerminate( Enhancer.Application );
     DosExit( EXIT_PROCESS, 0 );
    }
  }

 // Если надо вызвать загрузчик:
 if( Enhancer.Launcher_mode )
  {
   // Создаем поток для запуска расширителя.
   DosCreateThread( &Threads.Launcher, (PFNTHREAD) LauncherThread, 0, 0, STACK_SIZE );
  }

 // Если надо вызвать расширитель:
 if( Enhancer.Enhancer_mode )
  {
   // Пробуем найти окно загрузчика.
   HWND Launcher_window = NULLHANDLE; CHAR Launcher_title[] = "Nice-OS2!L";

   {
    // Перебираем окна в окне рабочего стола.
    HENUM Enumeration = WinBeginEnumWindows( WinQueryDesktopWindow( Enhancer.Application, NULLHANDLE ) ); HWND Window = NULLHANDLE;
    while( ( Window = WinGetNextWindow( Enumeration ) ) != NULLHANDLE )
     {
      // Узнаем заголовок окна.
      CHAR Window_title[ SIZE_OF_TITLE ] = "";
      WinQueryWindowText( WinWindowFromID( Window, FID_TITLEBAR ), SIZE_OF_TITLE, Window_title );

      // Если это окно расширителя - запоминаем его.
      if( strc( Window_title, Launcher_title ) )
       {
        Launcher_window = Window;
        break;
       }
     }
    WinEndEnumWindows( Enumeration );
   }

   // Если загрузчика нет - выход.
   // Вообще-то он должен быть, раз найден семафор, но кто знает...
   if( !Launcher_window )
    {
     WinTerminate( Enhancer.Application );
     DosExit( EXIT_PROCESS, 0 );
    }

   // Создаем потоки, устанавливаем обработчики событий.
   BYTE Success = NiceLoadEnhancer( Enhancer.Application, 0, Launcher_window );

   // Если это сделать не удалось - выход.
   if( !Success )
    {
     WinTerminate( Enhancer.Application );
     DosExit( EXIT_PROCESS, 0 );
    }

   // Читаем настройки и загружаем изображения в расширитель.
   // Этот метод выполняется внутри Nice-os2.dll, но так как DLL использует
   // адресное пространство приложения, все данные остаются в этом приложении.
   NiceReadSettings( 0 );

   // Включаем слежение за сообщениями.
   NiceRunEnhancer();
  }

 // Создаем окно рабочей области.
 CHAR Class_name[] = "NiceOS2WndClass!L";
 if( Enhancer.Enhancer_mode ) Class_name[ strlen( Class_name ) - 1 ] = 'E';
 WinRegisterClass( Enhancer.Application, Class_name, (PFNWP) Enhancer_MainWindowProc, 0, 0 );

 // Создаем окно рамки.
 CHAR MainWindow_title[] = "Nice-OS2!L";
 if( Enhancer.Enhancer_mode ) Class_name[ strlen( Class_name ) - 1 ] = 'E';

 ULONG Creation_flags = FCF_TITLEBAR | FCF_SYSMENU;
 Enhancer.Frame_window = WinCreateStdWindow( HWND_DESKTOP, CS_FRAME, &Creation_flags, Class_name, MainWindow_title, 0, NULLHANDLE, 0, &Enhancer.Client_window );
 WinShowWindow( Enhancer.Frame_window, 0 );

 // Выбираем сообщения из очереди.
 QMSG Message; bzero( &Message, sizeof( QMSG ) );
 while( WinGetMsg( Enhancer.Application, &Message, 0, 0, 0 ) ) WinDispatchMsg( Enhancer.Application, &Message );

 // Закрываем окна.
 WinDestroyWindow( Enhancer.Client_window );
 WinDestroyWindow( Enhancer.Frame_window );

 // Если вызван расширитель:
 if( Enhancer.Enhancer_mode )
  {
   // Отключаем обработчики событий, завершаем работу потоков.
   NiceReleaseEnhancer( Enhancer.Application, 0 );
  }

 // Удаляем файлы отладочной версии.
 DosForceDelete( "_log.txt" ); DosForceDelete( "XTest.exe" );

 // Сбрасываем очередь сообщений.
 WinDestroyMsgQueue( Message_queue );

 // Выход.
 WinTerminate( Enhancer.Application );
 DosExit( EXIT_PROCESS, 0 );
}
// Show_items - скрыть или показать строки, Hide_known_applications - скрыть известные приложения.
VOID Remover_ShowAllItemsInSwitchList( BYTE Show_or_hide, BYTE Hide_known_applications = 0 )
{
 // Окно оболочки прятать нельзя.
 PCHAR Shell_window_item = NULL;

 if( ShellIsWPS() )
  {
   // Узнаем окно оболочки.
   HWND Shell_window = GetDetectedShellWindow();

   if( Shell_window != NULLHANDLE )
    {
     // Узнаем, есть ли оно в списке окон.
     HSWITCH Switch_handle = WinQuerySwitchHandle( Shell_window, NULLHANDLE );
     SWCNTRL Task; bzero( &Task, sizeof( SWCNTRL ) );

     // Если его нет - добавляем его.
     if( Switch_handle == NULLHANDLE )
      {
       Task.hwnd = Shell_window;
       GetDefaultShellTitle( Task.szSwtitle );

       Task.uchVisibility = SWL_VISIBLE;
       Task.fbJump = SWL_JUMPABLE;

       HSWITCH Switch_handle = WinAddSwitchEntry( &Task );
      }
     // Если оно есть - делаем его видимым в списке.
     else
      {
       WinQuerySwitchEntry( Switch_handle, &Task );

       if( Task.uchVisibility != SWL_VISIBLE || Task.fbJump != SWL_JUMPABLE )
        ShowItemInSwitchList( Switch_handle, Task, 1 );
      }

     // Запоминаем строку.
     Shell_window_item = Task.szSwtitle;
    }
  }

 // Узнаем список окон.
 PSWBLOCK SWBlock = NULL; QuerySwitchList( &SWBlock );

 // Показываем или скрываем строки.
 {
  INT Count; INT Item_count;

  for( Count = 0; Count < SWBlock->cswentry; Count ++ )
   {
    BYTE Hide_this_item = 0;

    // Скрываем приложения, известные расширителю.
    if( Hide_known_applications )
     {
      HWND Frame_window = SWBlock->aswentry[ Count ].swctl.hwnd;

      if( !Hide_this_item && IsECenterWindow( Frame_window ) ) Hide_this_item = 1;
      if( !Hide_this_item && IsWarpCenterWindow( Frame_window ) ) Hide_this_item = 1;
      if( !Hide_this_item && IsLaunchPadWindow( Frame_window ) ) Hide_this_item = 1;
      if( !Hide_this_item && IslSwitcherWindow( Frame_window ) ) Hide_this_item = 1;

      if( !Hide_this_item && IsVIOWindow( Frame_window ) )
       {
        PCHAR Title = SWBlock->aswentry[ Count ].swctl.szSwtitle;

        if( strc( Title, Remover.Settings.DDNS ) ||
            strc( Title, Remover.Settings.DHCP ) ||
            strc( Title, Remover.Settings.BINL ) ) Hide_this_item = 1;
       }

      if( !Hide_this_item && ShellIsWPS() )
       {
        if( WindowIsUsedTo( DO_IMPROVE_WORKPLACE, Frame_window ) )
         if( !WindowIsCreatedBy( APP_NICE, Frame_window ) )
          Hide_this_item = 1;

        if( !Hide_this_item && IsSysTrayWindow( Frame_window ) ) Hide_this_item = 1;
        if( !Hide_this_item && IsSmartBarWindow( Frame_window ) ) Hide_this_item = 1;
       }
     }

    // Скрываем приложения, заданные пользователем.
    for( Item_count = 0; Item_count < 8; Item_count ++ )
     {
      PCHAR Item_name = Remover.Settings.WinListNames.Remove_from_list_1_name;
      if( Item_count == 1 ) Item_name = Remover.Settings.WinListNames.Remove_from_list_2_name;
      if( Item_count == 2 ) Item_name = Remover.Settings.WinListNames.Remove_from_list_3_name;
      if( Item_count == 3 ) Item_name = Remover.Settings.WinListNames.Remove_from_list_4_name;
      if( Item_count == 4 ) Item_name = Remover.Settings.WinListNames.Remove_from_list_5_name;
      if( Item_count == 5 ) Item_name = Remover.Settings.WinListNames.Remove_from_list_6_name;
      if( Item_count == 6 ) Item_name = Remover.Settings.WinListNames.Remove_from_list_7_name;
      if( Item_count == 7 ) Item_name = Remover.Settings.WinListNames.Remove_from_list_8_name;

      if( Item_name[ 0 ] != 0 )
       {
        PCHAR Title = SWBlock->aswentry[ Count ].swctl.szSwtitle;

        #ifndef INCLUDED_BY_SHELL

        if( Shell_window_item != NULL )
         if( strc( Title, Shell_window_item ) ) continue;

        #endif

        if( strc( Title, Item_name ) ) Hide_this_item = 1;
       }

       if( Hide_this_item ) break;
     }

    // Скрываем строки.
    if( Hide_this_item )
     {
      HSWITCH Switch_handle = SWBlock->aswentry[ Count ].hswitch;
      SWCNTRL Task = SWBlock->aswentry[ Count ].swctl;

      ShowItemInSwitchList( Switch_handle, Task, Show_or_hide );
     }
   }
 }

 // Освобождаем память.
 FreeSwitchListMemory( SWBlock ); SWBlock = NULL;

 // Возврат.
 return;
}
// Поток приложения вызывает WindowProc всякий раз, когда для окна есть сообщение.
// Window - окно, Message - сообщение, *_parameter - данные, которые передаются вместе с сообщением.
MRESULT EXPENTRY WinList_Settings_WndProc( HWND Window, ULONG Message, MPARAM First_parameter, MPARAM Second_parameter )
{
 // Указатель на страницу.
 PPAGE Page = Enhancer.Pages.WinList_settings;

 // Проверяем сообщение.
 switch( Message )
  {
   // Отображаем настройки.
   case SM_SHOW_SETTINGS:
    {
     BYTE Value = 0; if( Remover.Settings.Remove_items_from_Window_list ) Value = 1;
     WinSendDlgItemMsg( Window, WinList_Settings.Settings.Modify_WinList_button_ID, BM_SETCHECK, MPFROMLONG( Value ), 0 );

     WinEnableWindow( WinWindowFromID( WinWindowFromID( Window, WinList_Settings.Settings.Container_ID ), WinList_Settings.Settings.Hidden_list_ID ), Value );
     WinEnableWindow( WinWindowFromID( WinWindowFromID( WinWindowFromID( Window, WinList_Settings.Settings.Container_ID ), WinList_Settings.Settings.Hidden_buttons_ID ), WinList_Settings.Settings.Hidden_Move2V_button_ID ), Value );

     WinEnableWindow( WinWindowFromID( WinWindowFromID( Window, WinList_Settings.Settings.Container_ID ), WinList_Settings.Settings.Visible_list_ID ), Value );
     WinEnableWindow( WinWindowFromID( WinWindowFromID( WinWindowFromID( Window, WinList_Settings.Settings.Container_ID ), WinList_Settings.Settings.Visible_buttons_ID ), WinList_Settings.Settings.Visible_Move2H_button_ID ), Value );
     WinEnableWindow( WinWindowFromID( WinWindowFromID( WinWindowFromID( Window, WinList_Settings.Settings.Container_ID ), WinList_Settings.Settings.Visible_buttons_ID ), WinList_Settings.Settings.Visible_Refresh_button_ID ), Value );
    }
   return 0;

   // Отображаем список.
   case SM_UPDATE_LIST:
    {
     {
      HWND Hidden_ListBox_window = WinWindowFromID( WinWindowFromID( Window, WinList_Settings.Settings.Container_ID ), WinList_Settings.Settings.Hidden_list_ID );

      WinSendMsg( Hidden_ListBox_window, LM_DELETEALL, 0, 0 );

      if( Remover.Settings.WinListNames.Remove_from_list_1_name[ 0 ] != 0 ) WinSendMsg( Hidden_ListBox_window, LM_INSERTITEM, MPFROMSHORT( LIT_END ), MPFROMP( Remover.Settings.WinListNames.Remove_from_list_1_name ) );
      if( Remover.Settings.WinListNames.Remove_from_list_2_name[ 0 ] != 0 ) WinSendMsg( Hidden_ListBox_window, LM_INSERTITEM, MPFROMSHORT( LIT_END ), MPFROMP( Remover.Settings.WinListNames.Remove_from_list_2_name ) );
      if( Remover.Settings.WinListNames.Remove_from_list_3_name[ 0 ] != 0 ) WinSendMsg( Hidden_ListBox_window, LM_INSERTITEM, MPFROMSHORT( LIT_END ), MPFROMP( Remover.Settings.WinListNames.Remove_from_list_3_name ) );
      if( Remover.Settings.WinListNames.Remove_from_list_4_name[ 0 ] != 0 ) WinSendMsg( Hidden_ListBox_window, LM_INSERTITEM, MPFROMSHORT( LIT_END ), MPFROMP( Remover.Settings.WinListNames.Remove_from_list_4_name ) );
      if( Remover.Settings.WinListNames.Remove_from_list_5_name[ 0 ] != 0 ) WinSendMsg( Hidden_ListBox_window, LM_INSERTITEM, MPFROMSHORT( LIT_END ), MPFROMP( Remover.Settings.WinListNames.Remove_from_list_5_name ) );
      if( Remover.Settings.WinListNames.Remove_from_list_6_name[ 0 ] != 0 ) WinSendMsg( Hidden_ListBox_window, LM_INSERTITEM, MPFROMSHORT( LIT_END ), MPFROMP( Remover.Settings.WinListNames.Remove_from_list_6_name ) );
      if( Remover.Settings.WinListNames.Remove_from_list_7_name[ 0 ] != 0 ) WinSendMsg( Hidden_ListBox_window, LM_INSERTITEM, MPFROMSHORT( LIT_END ), MPFROMP( Remover.Settings.WinListNames.Remove_from_list_7_name ) );
      if( Remover.Settings.WinListNames.Remove_from_list_8_name[ 0 ] != 0 ) WinSendMsg( Hidden_ListBox_window, LM_INSERTITEM, MPFROMSHORT( LIT_END ), MPFROMP( Remover.Settings.WinListNames.Remove_from_list_8_name ) );
     }

     {
      HWND Visible_ListBox_window = WinWindowFromID( WinWindowFromID( Window, WinList_Settings.Settings.Container_ID ), WinList_Settings.Settings.Visible_list_ID );
      ShowSwitchListItems( Visible_ListBox_window );
     }
    }
   return 0;

   // Следим за полями ввода.
   case WM_CONTROL:
    {
     ULONG WM_Control_Window_ID = SHORT1FROMMP( First_parameter );
     ULONG WM_Control_Action_ID = SHORT2FROMMP( First_parameter );

     if( WM_Control_Window_ID == WinList_Settings.Settings.Modify_WinList_button_ID )
      {
       switch( WM_Control_Action_ID )
        {
         case BN_CLICKED:
         case BN_DBLCLICKED:
          {
           ULONG Button_is_checked = (ULONG) WinSendDlgItemMsg( Window, WM_Control_Window_ID, BM_QUERYCHECK, 0, 0 );

           if( Button_is_checked ) Remover.Settings.Remove_items_from_Window_list = 0;
           else Remover.Settings.Remove_items_from_Window_list = 1;

           WinSendMsg( Window, SM_SHOW_SETTINGS, 0, 0 );
          }
         break;
        }
      }
    }
   break;

   // Обрабатываем нажатия на кнопки.
   case WM_COMMAND:
    {
     ULONG WM_Control_Button_ID = SHORT1FROMMP( First_parameter );

     if( WM_Control_Button_ID == WinList_Settings.Settings.Hidden_Move2V_button_ID )
      {
       HWND Hidden_ListBox_window = WinWindowFromID( WinWindowFromID( Window, WinList_Settings.Settings.Container_ID ), WinList_Settings.Settings.Hidden_list_ID );
       INT Selected_string = (INT) WinSendMsg( Hidden_ListBox_window, LM_QUERYSELECTION, MPFROMLONG( LIT_FIRST ), MPFROMLONG( 0 ) );

       if( Selected_string != LIT_NONE )
        {
         CHAR Name[ SIZE_OF_NAME ] = "";
         WinSendMsg( Hidden_ListBox_window, LM_QUERYITEMTEXT, MPFROM2SHORT( Selected_string, SIZE_OF_NAME ), MPFROMP( Name ) );

         ShowItemInSwitchList( Name, 1 );

         {
          CHAR Empty_name[ SIZE_OF_NAME ] = ""; bzero( Empty_name, SIZE_OF_NAME );

          switch( Selected_string )
           {
            case 0:
             memcpy( Remover.Settings.WinListNames.Remove_from_list_1_name, Remover.Settings.WinListNames.Remove_from_list_2_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_2_name, Remover.Settings.WinListNames.Remove_from_list_3_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_3_name, Remover.Settings.WinListNames.Remove_from_list_4_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_4_name, Remover.Settings.WinListNames.Remove_from_list_5_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_5_name, Remover.Settings.WinListNames.Remove_from_list_6_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_6_name, Remover.Settings.WinListNames.Remove_from_list_7_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_7_name, Remover.Settings.WinListNames.Remove_from_list_8_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_8_name, Empty_name, SIZE_OF_NAME );
            break;

            case 1:
             memcpy( Remover.Settings.WinListNames.Remove_from_list_2_name, Remover.Settings.WinListNames.Remove_from_list_3_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_3_name, Remover.Settings.WinListNames.Remove_from_list_4_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_4_name, Remover.Settings.WinListNames.Remove_from_list_5_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_5_name, Remover.Settings.WinListNames.Remove_from_list_6_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_6_name, Remover.Settings.WinListNames.Remove_from_list_7_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_7_name, Remover.Settings.WinListNames.Remove_from_list_8_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_8_name, Empty_name, SIZE_OF_NAME );
            break;

            case 2:
             memcpy( Remover.Settings.WinListNames.Remove_from_list_3_name, Remover.Settings.WinListNames.Remove_from_list_4_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_4_name, Remover.Settings.WinListNames.Remove_from_list_5_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_5_name, Remover.Settings.WinListNames.Remove_from_list_6_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_6_name, Remover.Settings.WinListNames.Remove_from_list_7_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_7_name, Remover.Settings.WinListNames.Remove_from_list_8_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_8_name, Empty_name, SIZE_OF_NAME );
            break;

            case 3:
             memcpy( Remover.Settings.WinListNames.Remove_from_list_4_name, Remover.Settings.WinListNames.Remove_from_list_5_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_5_name, Remover.Settings.WinListNames.Remove_from_list_6_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_6_name, Remover.Settings.WinListNames.Remove_from_list_7_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_7_name, Remover.Settings.WinListNames.Remove_from_list_8_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_8_name, Empty_name, SIZE_OF_NAME );
            break;

            case 4:
             memcpy( Remover.Settings.WinListNames.Remove_from_list_5_name, Remover.Settings.WinListNames.Remove_from_list_6_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_6_name, Remover.Settings.WinListNames.Remove_from_list_7_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_7_name, Remover.Settings.WinListNames.Remove_from_list_8_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_8_name, Empty_name, SIZE_OF_NAME );
            break;

            case 5:
             memcpy( Remover.Settings.WinListNames.Remove_from_list_6_name, Remover.Settings.WinListNames.Remove_from_list_7_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_7_name, Remover.Settings.WinListNames.Remove_from_list_8_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_8_name, Empty_name, SIZE_OF_NAME );
            break;

            case 6:
             memcpy( Remover.Settings.WinListNames.Remove_from_list_7_name, Remover.Settings.WinListNames.Remove_from_list_8_name, SIZE_OF_NAME );
             memcpy( Remover.Settings.WinListNames.Remove_from_list_8_name, Empty_name, SIZE_OF_NAME );
            break;

            case 7:
             memcpy( Remover.Settings.WinListNames.Remove_from_list_8_name, Empty_name, SIZE_OF_NAME );
            break;
           }
         }

         WinPostMsg( Window, WM_COMMAND, (MPARAM) OK_BUTTON_ID, 0 );
        }
      }

     if( WM_Control_Button_ID == WinList_Settings.Settings.Visible_Move2H_button_ID )
      {
       HWND Visible_ListBox_window = WinWindowFromID( WinWindowFromID( Window, WinList_Settings.Settings.Container_ID ), WinList_Settings.Settings.Visible_list_ID );
       INT Selected_string = (INT) WinSendMsg( Visible_ListBox_window, LM_QUERYSELECTION, MPFROMLONG( LIT_FIRST ), MPFROMLONG( 0 ) );

       if( Selected_string != LIT_NONE )
        {
         CHAR Name[ SIZE_OF_NAME ] = "";
         WinSendMsg( Visible_ListBox_window, LM_QUERYITEMTEXT, MPFROM2SHORT( Selected_string, SIZE_OF_NAME ), MPFROMP( Name ) );

         BYTE Name_is_present_in_list = 0;
         if( strc( Name, Remover.Settings.WinListNames.Remove_from_list_1_name ) ) Name_is_present_in_list = 1;
         if( strc( Name, Remover.Settings.WinListNames.Remove_from_list_2_name ) ) Name_is_present_in_list = 1;
         if( strc( Name, Remover.Settings.WinListNames.Remove_from_list_3_name ) ) Name_is_present_in_list = 1;
         if( strc( Name, Remover.Settings.WinListNames.Remove_from_list_4_name ) ) Name_is_present_in_list = 1;
         if( strc( Name, Remover.Settings.WinListNames.Remove_from_list_5_name ) ) Name_is_present_in_list = 1;
         if( strc( Name, Remover.Settings.WinListNames.Remove_from_list_6_name ) ) Name_is_present_in_list = 1;
         if( strc( Name, Remover.Settings.WinListNames.Remove_from_list_7_name ) ) Name_is_present_in_list = 1;
         if( strc( Name, Remover.Settings.WinListNames.Remove_from_list_8_name ) ) Name_is_present_in_list = 1;

         if( !Name_is_present_in_list )
          {
           PCHAR Item = NULL;

           if( Remover.Settings.WinListNames.Remove_from_list_8_name[ 0 ] == 0 ) Item = Remover.Settings.WinListNames.Remove_from_list_8_name;
           if( Remover.Settings.WinListNames.Remove_from_list_7_name[ 0 ] == 0 ) Item = Remover.Settings.WinListNames.Remove_from_list_7_name;
           if( Remover.Settings.WinListNames.Remove_from_list_6_name[ 0 ] == 0 ) Item = Remover.Settings.WinListNames.Remove_from_list_6_name;
           if( Remover.Settings.WinListNames.Remove_from_list_5_name[ 0 ] == 0 ) Item = Remover.Settings.WinListNames.Remove_from_list_5_name;
           if( Remover.Settings.WinListNames.Remove_from_list_4_name[ 0 ] == 0 ) Item = Remover.Settings.WinListNames.Remove_from_list_4_name;
           if( Remover.Settings.WinListNames.Remove_from_list_3_name[ 0 ] == 0 ) Item = Remover.Settings.WinListNames.Remove_from_list_3_name;
           if( Remover.Settings.WinListNames.Remove_from_list_2_name[ 0 ] == 0 ) Item = Remover.Settings.WinListNames.Remove_from_list_2_name;
           if( Remover.Settings.WinListNames.Remove_from_list_1_name[ 0 ] == 0 ) Item = Remover.Settings.WinListNames.Remove_from_list_1_name;

           if( Item != NULL )
            {
             strncpy( Item, Name, SIZE_OF_NAME );

             ShowItemInSwitchList( Name, 0 );

             WinPostMsg( Window, WM_COMMAND, (MPARAM) OK_BUTTON_ID, 0 );
            }
          }
        }
      }

     if( WM_Control_Button_ID == WinList_Settings.Settings.Visible_Refresh_button_ID )
      {
       WinSendMsg( Window, SM_UPDATE_LIST, 0, 0 );
      }

     if( WM_Control_Button_ID == OK_BUTTON_ID )
      {
       CHAR Settings_file_name[ SIZE_OF_PATH ] = ""; GetSettingsFileName( Settings_file_name );
       HINI Ini_file = OpenIniProfile( Enhancer.Application, Settings_file_name );

       if( Ini_file )
        {
         BYTE Hide_known_applications = 1;

         PrfWriteProfileData( Ini_file, "Settings", "Remove items from Window list", &Remover.Settings.Remove_items_from_Window_list, sizeof( BYTE ) );
         PrfWriteProfileData( Ini_file, "Settings", "Hide known applications", &Hide_known_applications, sizeof( BYTE ) );

         PrfWriteProfileData( Ini_file, "WinList", "Remove from list 1 name", NULL, 0 );
         PrfWriteProfileData( Ini_file, "WinList", "Remove from list 2 name", NULL, 0 );
         PrfWriteProfileData( Ini_file, "WinList", "Remove from list 3 name", NULL, 0 );
         PrfWriteProfileData( Ini_file, "WinList", "Remove from list 4 name", NULL, 0 );
         PrfWriteProfileData( Ini_file, "WinList", "Remove from list 5 name", NULL, 0 );
         PrfWriteProfileData( Ini_file, "WinList", "Remove from list 6 name", NULL, 0 );
         PrfWriteProfileData( Ini_file, "WinList", "Remove from list 7 name", NULL, 0 );
         PrfWriteProfileData( Ini_file, "WinList", "Remove from list 8 name", NULL, 0 );

         if( Remover.Settings.WinListNames.Remove_from_list_1_name[ 0 ] != 0 ) PrfWriteProfileData( Ini_file, "WinList", "Remove from list 1 name", Remover.Settings.WinListNames.Remove_from_list_1_name, strlen( Remover.Settings.WinListNames.Remove_from_list_1_name ) + 1 );
         if( Remover.Settings.WinListNames.Remove_from_list_2_name[ 0 ] != 0 ) PrfWriteProfileData( Ini_file, "WinList", "Remove from list 2 name", Remover.Settings.WinListNames.Remove_from_list_2_name, strlen( Remover.Settings.WinListNames.Remove_from_list_2_name ) + 1 );
         if( Remover.Settings.WinListNames.Remove_from_list_3_name[ 0 ] != 0 ) PrfWriteProfileData( Ini_file, "WinList", "Remove from list 3 name", Remover.Settings.WinListNames.Remove_from_list_3_name, strlen( Remover.Settings.WinListNames.Remove_from_list_3_name ) + 1 );
         if( Remover.Settings.WinListNames.Remove_from_list_4_name[ 0 ] != 0 ) PrfWriteProfileData( Ini_file, "WinList", "Remove from list 4 name", Remover.Settings.WinListNames.Remove_from_list_4_name, strlen( Remover.Settings.WinListNames.Remove_from_list_4_name ) + 1 );
         if( Remover.Settings.WinListNames.Remove_from_list_5_name[ 0 ] != 0 ) PrfWriteProfileData( Ini_file, "WinList", "Remove from list 5 name", Remover.Settings.WinListNames.Remove_from_list_5_name, strlen( Remover.Settings.WinListNames.Remove_from_list_5_name ) + 1 );
         if( Remover.Settings.WinListNames.Remove_from_list_6_name[ 0 ] != 0 ) PrfWriteProfileData( Ini_file, "WinList", "Remove from list 6 name", Remover.Settings.WinListNames.Remove_from_list_6_name, strlen( Remover.Settings.WinListNames.Remove_from_list_6_name ) + 1 );
         if( Remover.Settings.WinListNames.Remove_from_list_7_name[ 0 ] != 0 ) PrfWriteProfileData( Ini_file, "WinList", "Remove from list 7 name", Remover.Settings.WinListNames.Remove_from_list_7_name, strlen( Remover.Settings.WinListNames.Remove_from_list_7_name ) + 1 );
         if( Remover.Settings.WinListNames.Remove_from_list_8_name[ 0 ] != 0 ) PrfWriteProfileData( Ini_file, "WinList", "Remove from list 8 name", Remover.Settings.WinListNames.Remove_from_list_8_name, strlen( Remover.Settings.WinListNames.Remove_from_list_8_name ) + 1 );

         PrfCloseProfile( Ini_file );

         BroadcastRSMessages();
         NiceReadSettings();
        }
      }

     if( WM_Control_Button_ID == PD_BUTTON_ID )
      {
       CHAR String[ 256 ] = ""; LONG Reply = 0;
       BYTE Clear_list = 0;
       LONG Code_page = Enhancer.Code_page;

       if( Remover.Settings.WinListNames.Remove_from_list_1_name[ 0 ] != 0 || Remover.Settings.WinListNames.Remove_from_list_2_name[ 0 ] != 0 ||
           Remover.Settings.WinListNames.Remove_from_list_3_name[ 0 ] != 0 || Remover.Settings.WinListNames.Remove_from_list_4_name[ 0 ] != 0 ||
           Remover.Settings.WinListNames.Remove_from_list_5_name[ 0 ] != 0 || Remover.Settings.WinListNames.Remove_from_list_6_name[ 0 ] != 0 ||
           Remover.Settings.WinListNames.Remove_from_list_7_name[ 0 ] != 0 || Remover.Settings.WinListNames.Remove_from_list_8_name[ 0 ] != 0 )
        {
         if( Code_page == RUSSIAN ) strcpy( String, StrConst_RU_Pages_WinList_settings_Question );
         else strcpy( String, StrConst_EN_Pages_WinList_settings_Question );

         {
          CHAR Title[ SIZE_OF_TITLE ] = ""; GetEnhancerWindowTitle( Title );
          Reply = WinMessageBox( HWND_DESKTOP, HWND_DESKTOP, String, Title, 0, MB_YESNO );
         }

         if( Reply == MBID_YES ) Clear_list = 1;
        }

       if( Clear_list )
        {
         if( Remover.Settings.WinListNames.Remove_from_list_1_name[ 0 ] != 0 ) ShowItemInSwitchList( Remover.Settings.WinListNames.Remove_from_list_1_name, 1 );
         if( Remover.Settings.WinListNames.Remove_from_list_2_name[ 0 ] != 0 ) ShowItemInSwitchList( Remover.Settings.WinListNames.Remove_from_list_2_name, 1 );
         if( Remover.Settings.WinListNames.Remove_from_list_3_name[ 0 ] != 0 ) ShowItemInSwitchList( Remover.Settings.WinListNames.Remove_from_list_3_name, 1 );
         if( Remover.Settings.WinListNames.Remove_from_list_4_name[ 0 ] != 0 ) ShowItemInSwitchList( Remover.Settings.WinListNames.Remove_from_list_4_name, 1 );
         if( Remover.Settings.WinListNames.Remove_from_list_5_name[ 0 ] != 0 ) ShowItemInSwitchList( Remover.Settings.WinListNames.Remove_from_list_5_name, 1 );
         if( Remover.Settings.WinListNames.Remove_from_list_6_name[ 0 ] != 0 ) ShowItemInSwitchList( Remover.Settings.WinListNames.Remove_from_list_6_name, 1 );
         if( Remover.Settings.WinListNames.Remove_from_list_7_name[ 0 ] != 0 ) ShowItemInSwitchList( Remover.Settings.WinListNames.Remove_from_list_7_name, 1 );
         if( Remover.Settings.WinListNames.Remove_from_list_8_name[ 0 ] != 0 ) ShowItemInSwitchList( Remover.Settings.WinListNames.Remove_from_list_8_name, 1 );

         CHAR Empty_name[ SIZE_OF_NAME ] = ""; bzero( Empty_name, SIZE_OF_NAME );
         memcpy( Remover.Settings.WinListNames.Remove_from_list_1_name, Empty_name, SIZE_OF_NAME );
         memcpy( Remover.Settings.WinListNames.Remove_from_list_2_name, Empty_name, SIZE_OF_NAME );
         memcpy( Remover.Settings.WinListNames.Remove_from_list_3_name, Empty_name, SIZE_OF_NAME );
         memcpy( Remover.Settings.WinListNames.Remove_from_list_4_name, Empty_name, SIZE_OF_NAME );
         memcpy( Remover.Settings.WinListNames.Remove_from_list_5_name, Empty_name, SIZE_OF_NAME );
         memcpy( Remover.Settings.WinListNames.Remove_from_list_6_name, Empty_name, SIZE_OF_NAME );
         memcpy( Remover.Settings.WinListNames.Remove_from_list_7_name, Empty_name, SIZE_OF_NAME );
         memcpy( Remover.Settings.WinListNames.Remove_from_list_8_name, Empty_name, SIZE_OF_NAME );

         WinPostMsg( Window, SM_UPDATE_LIST, 0, 0 );
        }

       if( Page->SetDefSettings ) Page->SetDefSettings( Page->Settings_to_show );
       if( Page->SetDefSettings_Ext1 ) Page->SetDefSettings_Ext1( Page->Settings_to_show );
       if( Page->SetDefSettings_Ext2 ) Page->SetDefSettings_Ext2( Page->Settings_to_show );
       if( Page->SetDefSettings_Ext3 ) Page->SetDefSettings_Ext3( Page->Settings_to_show );

       WinPostMsg( Window, WM_COMMAND, (MPARAM) OK_BUTTON_ID, 0 );
      }

     if( WM_Control_Button_ID == HP_BUTTON_ID )
      {
       Help( Page->Settings_to_show, Enhancer.Code_page );
      }
    }
   return 0;
  }

 // Возврат.
 return WinDefWindowProc( Window, Message, First_parameter, Second_parameter );
}
// Frame_window - окно рамки, Target и Buttons_to_detect - какое свойство надо узнать.
// Update_frame_if_required - рамку можно обновить если это требуется.
VOID Diver_QueryWindowProperty( HWND Frame_window, ULONG Target, LONG Buttons_to_detect = ALL_ACTIONS, BYTE Update_frame_if_required = 0 )
{
 // Узнаем расположение окна и его состояние.
 SWP Window_state = {0}; WinQueryWindowPos( Frame_window, &Window_state );

 // Если окно уменьшено в значок или скрыто - возврат.
 if( Window_state.fl & SWP_MINIMIZE || Window_state.fl & SWP_HIDE ) return;

 // Узнаем значок окна.
 if( Target & WT_SYSMENU )
  {
   // Узнаем значок окна.
   HPOINTER Icon = Diver_QueryWindowIcon( Frame_window );

   // Если он есть:
   if( Icon != NULLHANDLE )
    {
     // Если значок изменился - рамка должна быть перерисована.
     HPOINTER Previous_icon = NULLHANDLE; FindProperty( Frame_window, PRP_ICON, &Previous_icon );

     if( Icon != Previous_icon )
      {
       // Устанавливаем свойство.
       SetProperty( Frame_window, PRP_ICON, &Icon );

       // Посылаем сообщение в поток рисования.
       WinPostQueueMsg( Enhancer.Modules.Painter->Message_queue, SM_DRAW_FRAME, (MPARAM) Frame_window, (MPARAM) WT_SYSMENU );
      }
    }
  }

 // Узнаем ширину рамки окна.
 if( Target & WT_SYSMENU )
  {
   // Отправляем сообщение в окно.
   Diver.RTSettings.FB_size.x = 0; Diver.RTSettings.FB_size.y = 0;
   WinSendMsg( Frame_window, WM_QUERYBORDERSIZE, (MPARAM) &Diver.RTSettings.FB_size, 0 );

   // Шириной рамки будем считать наименьшее полученное значение.
   INT Width = min( Diver.RTSettings.FB_size.x, Diver.RTSettings.FB_size.y );

   // Если оно было получено:
   if( Width != 0 )
    {
     // Если ширина изменилась - рамка должна быть перерисована.
     INT Previous_width = 0; FindProperty( Frame_window, PRP_BORDER, &Previous_width );

     if( Width != Previous_width )
      {
       // Устанавливаем свойство.
       SetProperty( Frame_window, PRP_BORDER, &Width );

       // Узнаем значение по умолчанию.
       INT System_value = FrameWidth( Frame_window );

       // Если это другое значение - посылаем сообщение в поток рисования.
       if( Width != System_value )
        {
         ULONG Update_all = WT_BORDER | WT_SYSMENU | WT_TITLEBAR | WT_MINMAX | WT_MENU;
         WinPostQueueMsg( Enhancer.Modules.Painter->Message_queue, SM_DRAW_FRAME, (MPARAM) Frame_window, (MPARAM) Update_all );
        }
      }
    }
  }

 // Узнаем заголовок окна.
 if( Target & WT_TITLEBAR )
  {
   // Узнаем заголовок окна.
   HWND TitleBar_window = WinWindowFromID( Frame_window, FID_TITLEBAR );
   CHAR Title[ SIZE_OF_TITLE ] = ""; QueryWindowTitle( Frame_window, TitleBar_window, Title, Update_frame_if_required );

   // Если заголовок определен:
   if( Title[ 0 ] != 0 )
    {
     // Если заголовок изменился - рамка должна быть перерисована.
     CHAR Previous_title[ SIZE_OF_TITLE ] = ""; FindProperty( Frame_window, PRP_TITLE, Previous_title );

     if( !strc( Title, Previous_title ) )
      {
       // Устанавливаем свойство.
       SetProperty( Frame_window, PRP_TITLE, Title );

       // Посылаем сообщение в поток рисования.
       WinPostQueueMsg( Enhancer.Modules.Painter->Message_queue, SM_DRAW_FRAME, (MPARAM) Frame_window, (MPARAM) WT_TITLEBAR );
      }
    }
  }

 // Узнаем состояние кнопок в правом верхнем углу окна.
 if( Target & WT_MINMAX )
  {
   // Узнаем, есть ли это свойство в списке.
   BYTE Actions_are_detected = 0; FindProperty( Frame_window, PRP_ACTIONS, &Actions_are_detected );

   // Если его нет - узнаем состояние кнопок по умолчанию.
   if( !Actions_are_detected )
    {
     // Узнаем состояние кнопок по умолчанию.
     LONG Buttons_state = Diver_GetPreDefinedButtonsState( Frame_window );

     // Запоминаем, что состояние кнопок определено.
     BYTE Detected = 1; SetProperty( Frame_window, PRP_ACTIONS, &Detected );

     // Если оно задано - рамка должна быть перерисована.
     if( Buttons_state != NO_ACTION )
      {
       // Устанавливаем свойство.
       SetProperty( Frame_window, PRP_BUTTONS, &Buttons_state );

       // Посылаем сообщение в поток рисования.
       WinPostQueueMsg( Enhancer.Modules.Painter->Message_queue, SM_DRAW_FRAME, (MPARAM) Frame_window, (MPARAM) WT_BORDER );
      }
    }

   // Узнаем состояние кнопок в окне.
   LONG Buttons_state = QueryButtonsState( Frame_window, Buttons_to_detect, 1 );

   // Если состояние кнопок изменилось - рамка должна быть перерисована.
   LONG Previous_state = NO_ACTION; FindProperty( Frame_window, PRP_BUTTONS, &Previous_state );

   if( Buttons_state != Previous_state )
    {
     // Устанавливаем свойство.
     SetProperty( Frame_window, PRP_BUTTONS, &Buttons_state );

     // Посылаем сообщение в поток рисования.
     WinPostQueueMsg( Enhancer.Modules.Painter->Message_queue, SM_DRAW_FRAME, (MPARAM) Frame_window, (MPARAM) WT_BORDER );
    }
  }

 // Возврат.
 return;
}