Форум: "Начинающим";
Текущий архив: 2005.11.13;
Скачать: [xml.tar.bz2];
ВнизПрограммное изменение раскладки клавиатуры. Найти похожие ветки
← →
ZZZ (2005-10-21 12:44) [0]Задача:
необходимо вычислить, изменить и восстановить прежнее значение раскладки клавиатуры. Каким образом это можно осуществить?
← →
clickmaker © (2005-10-21 12:55) [1]GetKeyboardLayout
LoadKeyboardLayout
ActivateKeyboardLayout
← →
ZZZ (2005-10-21 13:05) [2]Куда это надо присобачить?
← →
ZZZ (2005-10-21 13:07) [3]Заодно подскажи как менять видео режимы, т.е. разрешение экрана?
← →
Tonich © (2005-10-21 13:10) [4]
> ZZZ (21.10.05 13:07) [3]
ChangeDisplaySettings()
← →
ZZZ (2005-10-21 13:25) [5]какие параметры прописывать Windows.ChangeDisplaySettings() - ?
GetKeyboardLayout() - ?
← →
ZZZ (2005-10-21 13:32) [6]UP
← →
ZZZ (2005-10-21 13:55) [7]кто нибудь может мне ответить на вопрос?
← →
Ega23 © (2005-10-21 14:03) [8]
> кто нибудь может мне ответить на вопрос?
А что на энтот вопрос отвечает хэлп?
← →
ZZZ (2005-10-21 14:12) [9]help воздерживается от ответа.
← →
Ega23 © (2005-10-21 14:24) [10]
> help воздерживается от ответа.
Не ври.
The ChangeDisplaySettings function changes the display settings to the specified graphics mode.
LONG ChangeDisplaySettings(
LPDEVMODE lpDevMode,
DWORD dwflags
);
Parameters
lpDevMode
Pointer to a DEVMODE structure that describes the graphics mode to switch to. The dmSize member must be initialized to the size, in bytes, of the DEVMODE structure. The following fields in the DEVMODE structure are used:
Member Meaning
dmBitsPerPel Bits per pixel
dmPelsWidth Pixel width
dmPelsHeight Pixel height
dmDisplayFlags Mode flags
dmDisplayFrequency Mode frequency
In addition to setting a value in one or more of the preceding DEVMODE members, you must also set the appropriate flags in the dmFields member. The flags indicate which members of the DEVMODE structure are used for the display settings change. If the appropriate bit is not set in dmFields, the display setting will not be changed. Set one or more of the following flags:
Flag Meaning
DM_BITSPERPEL Use the dmBitsPerPel value.
DM_PELSWIDTH Use the dmPelsWidth value.
DM_PELSHEIGHT Use the dmPelsHeight value.
DM_DISPLAYFLAGS Use the dmDisplayFlags value.
DM_DISPLAYFREQENCY Use the dmDisplayFrequency value.
If lpDevMode is NULL, all the values currently in the registry will be used for the display setting. Passing NULL for the lpDevMode parameter is the easiest way to return to the default mode after a dynamic mode change.
dwflags
Indicates how the graphics mode should be changed. May be one of the following:
Flag Meaning
0 The graphics mode for the current screen will be changed dynamically.
CDS_UPDATEREGISTRY The graphics mode for the current screen will be changed dynamically and the graphics mode will be updated in the registry. The mode information is stored in the USER profile.
CDS_TEST The system tests if the requested graphics mode could be set.
If CDS_UPDATEREGISTRY is specified and it is possible to change the graphics mode dynamically, the information is stored in the registry and DISP_CHANGE_SUCCESSFUL is returned. If it is not possible to change the graphics mode dynamically, the information is stored in the registry and DISP_CHANGE_RESTART is returned.
Windows NT: If the information could not be stored in the registry, the graphics mode is not changed and DISP_CHANGE_NOTUPDATED is returned.
Specifying CDS_TEST allows an application to determine which graphics modes are actually valid, without causing the system to change to that graphics mode.
Return Values
Returns one of the following values:
Value Meaning
DISP_CHANGE_SUCCESSFUL The settings change was successful.
DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
DISP_CHANGE_BADMODE The graphics mode is not supported.
DISP_CHANGE_NOTUPDATED Windows NT only: Unable to write settings to the registry.
Remarks
Using the DEVMODE returned by the EnumDisplaySettings function ensures that the DEVMODE passed to ChangeDisplaySettings is valid and contains only values supported by the display driver.
When the display mode is changed dynamically, the WM_DISPLAYCHANGE message is sent to all running applications with the following message parameters:
Parameters Meaning
wParam New bits per pixel
LOWORD(lParam) New pixel width
HIWORD(lParam) New pixel height
See Also
CreateDC, DEVMODE, EnumDisplaySettings, WM_DISPLAYCHANGE
← →
ZZZ (2005-10-21 14:30) [11]Благодарю.
← →
Ega23 © (2005-10-21 14:39) [12]
> Благодарю.
Не за что.
З.Ы.
Если не знал, то есть такой способ: набираешь в редакторе нужную функцию и жмёшь F1. Функции из WinAPI лежат в отдельном разделе справки delphi, поэтому поиск в самом хэлпе тебе ничего не даст.
← →
ZZZ (2005-10-21 14:43) [13]а вот, это ценная подсказка. еще раз спасибо.
← →
Ega23 © (2005-10-21 14:46) [14]
> а вот, это ценная подсказка. еще раз спасибо.
Не за что.
Страницы: 1 вся ветка
Форум: "Начинающим";
Текущий архив: 2005.11.13;
Скачать: [xml.tar.bz2];
Память: 0.48 MB
Время: 0.041 c