Форум: "WinAPI";
Текущий архив: 2002.11.18;
Скачать: [xml.tar.bz2];
Вниз
Отключение масштабирования диалога Найти похожие ветки
← →
Ученик (2002-10-08 08:31) [0]Диалог создается через WinAPI (шаблон диалога в ресурсе), можно ли отключить масштабирование диалога при установке в системе больших шрифтов (аналог TForm.Scaled=False), на диалоге есть картинка и при изменении размера шрифта "беда".
← →
Ученик (2002-10-08 10:05) [1]Может кто-нибудь "реабилитирует" Visual C++ :-), как создается немасштабируемый диалог ?
← →
Игорь Шевченко (2002-10-08 10:49) [2]Не надо отключать масштабирование. Надо картинку менять. У Рихтера где-то был описан симпатичный класс, который занимается корректным масштабированием для разных шрифтов. Есть волшебная функция GetDialogBaseUnits, которая возвращает размер единицы диалога (ведь все размеры в ресурсе задаются именно в этих baseUnits), зная ее, можно картинку смаштабировать в нужных пределах.
С уважением,
← →
Ученик (2002-10-08 10:54) [3]Игорь Шевченко © (08.10.02 10:49)
Спасибо, но, извиняюсь, оставляю вопрос открытым.
← →
Игорь Шевченко (2002-10-08 11:12) [4]Может, это поможет ?
"If the dialog box template has the DS_SETFONT style, however, the base units are the average width and height, in pixels, of the characters in the font given by the template. "
← →
Ученик (2002-10-08 11:22) [5]Может я неправильно понял, но
In the Microsoft Windows graphical environment, an application can affect the appearance of a dialog box by specifying the DS_SETFONT style bit. DS_SETFONT is available only when the application creates a dialog box dynamically from a memory-resident dialog box template using the CreateDialogIndirect, CreateDialogIndirectParam, DialogBoxIndirect, or DialogBoxIndirectParam function. The second parameter to each of these functions is the handle to a global memory object that contains a DLGTEMPLATE dialog box template data structure. The dwStyle (first) member of the DLGTEMPLATE structure contains style information for the dialog box.
← →
Игорь Шевченко (2002-10-08 11:32) [6]DS_SETFONT Indicates that the header of the dialog box template contains additional data specifying the font to use for text in the client area and controls of the dialog box. The font data begins on the WORD boundary that follows the title array. It specifies a 16-bit point size value and a Unicode font name string. If possible, the system creates a font according to the specified values. Then the system passes the handle of the font to the dialog box and to each control by sending them the WM_SETFONT message. If this style is not specified, the dialog box template does not include the font data.
В общем, не хватает моих знаний :-)
Лучше по инету поискать.
С уважением,
Страницы: 1 вся ветка
Форум: "WinAPI";
Текущий архив: 2002.11.18;
Скачать: [xml.tar.bz2];
Память: 0.45 MB
Время: 0.007 c