nachdem CDW mir vor kurzem so nett geholfen hat, meinen Assembler Programmen den Windows XP Stil zu verleihen
Wie kann ich das in die Schriftart ändern, die unter Windows XP alle normalen Buttons haben? (Ich glaube, die heißt Tahoma)
ph4nt0m
Moderatoren: crack, Krüsty, Marwin
Code: Alles auswählen
Einstellungen DIALOGEX 0, 0, 257, 75
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW
CAPTION "Sucheinstellungen"
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Übernehmen",ID_EINSTELLUNGEN_OK,188,39,68,17,
BS_MULTILINE | BS_FLAT,WS_EX_DLGMODALFRAME
usw...
Syntax
FONT pointsize, "typeface"
Parameters
pointsize
Specifies the size, in points, of the font.
typeface
Specifies the name of the typeface. This name must be identical to the name defined in the [FONTS] section of WIN.INI. This parameter must be enclosed in double quotes (").
Example
The following example demonstrates the use of the FONT statement:
FONT 12, "MS Shell Dlg"
Code: Alles auswählen
#define IDM_HELLO 1
#define IDM_CLEAR 2
#define IDM_GETTEXT 3
#define IDM_EXIT 4
FirstMenu MENU
{
POPUP "&Test Controls"
{
MENUITEM "Say Hello",IDM_HELLO
MENUITEM "Clear Edit Box",IDM_CLEAR
MENUITEM "Get Text", IDM_GETTEXT
MENUITEM SEPARATOR
MENUITEM "E&xit",IDM_EXIT
}
}Code: Alles auswählen
invoke CreateWindowEx,NULL, ADDR ButtonClassName,ADDR ButtonText,\
WS_CHILD or WS_VISIBLE or BS_DEFPUSHBUTTON,\
75,70,140,25,hWnd,ButtonID,hInstance,NULLCode: Alles auswählen
include \masm32\include\gdi32.inc
includelib \masm32\lib\gdi32.libCode: Alles auswählen
invoke CreateWindowEx,NULL, ADDR ButtonClassName,ADDR ButtonText,\
WS_CHILD or WS_VISIBLE or BS_DEFPUSHBUTTON,\
75,70,140,25,hWnd,ButtonID,hInstance,NULL
mov hwndButton,eax
.data
Font db "Verdana",0
.code
invoke CreateFont,12,6,0,0,FW_NORMAL,FALSE,FALSE,FALSE,ANSI_CHARSET,OUT_DEVICE_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,FF_DONTCARE,addr Font
invoke SendMessage,hwndButton,WM_SETFONT,eax ,TRUE