Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "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.009 c
1-59111
Part
2002-11-07 15:20
2002.11.18
Еще один простой вопрос!!


1-59197
siliks330
2002-11-09 09:27
2002.11.18
Как сделать текст.редактор, для работы с очень большими текстами?


1-59250
c@n
2002-11-07 04:00
2002.11.18
Хочется красивый интерфейс


1-59102
PETR2002
2002-11-07 23:05
2002.11.18
sendkeys


3-59069
Андрусь
2002-10-21 21:43
2002.11.18
Быстрый поиск в ораклиной базе...





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский