Home - Light Alloy - Руководство пользователя
  О программе    Руководство пользователя    Шкурки    Кино    Форум    Автору    Альтернативы   
« Назад к содержанию

Управление из других приложений

Можно посылать основному окну программы сообщения, где Msg = WM_APP + 2504 (0x89C8), wParam = команда. (Если в настройках установлен флажок "Эмулировать окно WinAMP", то программа также эмулирует окно WinAMP'а и принимает все его команды.)

Пример:

procedure LightAlloyFullScreen;
var
  Wnd:HWND;
begin
  Wnd:=FindWindow('LightAlloyFront',NIL);
  if (Wnd<>0) then
    SendMessage(Wnd,WM_LACMD,LAC_WINDOW_FULLSCREEN,0);
end;
Все возможные команды перечислены ниже - если Вы пишете на Delphi - можете просто скопировать этот фрагмент.
 
const
   WM_LACMD  = WM_APP + 2504;

   LAC_VERSION                 = 000;

   LAC_FILE_OPEN               = 050;
   LAC_FILE_INFO               = 051;

   LAC_PLAYBACK_STOP           = 100;
   LAC_PLAYBACK_PLAY           = 101;
   LAC_PLAYBACK_STOP_PLAY      = 102;
   LAC_PLAYBACK_SPEED_PLAY     = 103;
   LAC_PLAYBACK_FILTERS        = 104;

   LAC_SEEK_FRAME_STEP         = 150;
   LAC_SEEK_FRAME_BACK         = 151;
   LAC_SEEK_FORWARD            = 152;
   LAC_SEEK_BACKWARD           = 153;
   LAC_SEEK_JUMP_FORWARD       = 154;
   LAC_SEEK_JUMP_BACKWARD      = 155;
   LAC_SEEK_REWIND             = 156;
   LAC_SEEK_SET_BOOKMARK       = 157;

   LAC_WINDOW_CONTROL_PANEL    = 200;
   LAC_WINDOW_PLAYLIST         = 201;
   LAC_WINDOW_FULLSCREEN       = 202;
   LAC_WINDOW_ORIGINAL         = 203;
   LAC_WINDOW_STAY_ON_TOP      = 204;
   LAC_WINDOW_MINIMIZE         = 205;
   LAC_WINDOW_MAXIMIZE         = 206;

   LAC_PLAYLIST_NEXT           = 250;
   LAC_PLAYLIST_PREV           = 251;
   LAC_PLAYLIST_PLAY           = 252;
   LAC_PLAYLIST_ADD_FILES      = 253;
   LAC_PLAYLIST_ADD_FOLDER     = 254;
   LAC_PLAYLIST_DELETE         = 255;
   LAC_PLAYLIST_CLEAR          = 256;
   LAC_PLAYLIST_SAVE           = 257;
   LAC_PLAYLIST_MOVE_UP        = 258;
   LAC_PLAYLIST_MOVE_DOWN      = 259;
   LAC_PLAYLIST_SHUFFLE        = 260;
   LAC_PLAYLIST_SORT           = 261;
   LAC_PLAYLIST_REPORT         = 262;
   LAC_PLAYLIST_REPEAT         = 263;
   LAC_PLAYLIST_BOOKMARKS      = 264;

   LAC_VIDEO_PROPERTIES        = 300;
   LAC_VIDEO_SCREENSHOT        = 301;
   LAC_VIDEO_SCALE_50          = 302;
   LAC_VIDEO_SCALE_100         = 303;
   LAC_VIDEO_SCALE_200         = 304;
   LAC_VIDEO_RATIO_ASIS        = 305;
   LAC_VIDEO_RATIO_16_9        = 306;
   LAC_VIDEO_RATIO_4_3         = 307;
   LAC_VIDEO_RATIO_WIDTH       = 308;
   LAC_VIDEO_RATIO_HEIGHT      = 309;
   LAC_VIDEO_RATIO_CUSTOM      = 310;
   LAC_VIDEO_RATIO_FREE        = 311;
   LAC_VIDEO_ZOOM_IN           = 312;
   LAC_VIDEO_ZOOM_OUT          = 313;
   LAC_VIDEO_BRIGHTNESS_INC    = 314;
   LAC_VIDEO_BRIGHTNESS_DEC    = 315;
   LAC_VIDEO_CONTRAST_INC      = 316;
   LAC_VIDEO_CONTRAST_DEC      = 317;
   LAC_VIDEO_SATURATION_INC    = 318;
   LAC_VIDEO_SATURATION_DEC    = 319;

   LAC_SUBTITLES_LOAD          = 350;
   LAC_SUBTITLES_SHOW          = 351;

   LAC_SOUND_PROPERTIES        = 400;
   LAC_SOUND_VOLUME_INC        = 401;
   LAC_SOUND_VOLUME_DEC        = 402;
   LAC_SOUND_MUTE              = 403;
   LAC_SOUND_ADD               = 404;

   LAC_APPLICATION_PREFERENCES = 450;
   LAC_APPLICATION_HELP        = 451;
   LAC_APPLICATION_ABOUT       = 452;
   LAC_APPLICATION_EXIT        = 453;
   LAC_APPLICATION_POWER_OFF   = 454;

« Назад к содержанию

[ Home ]