1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
#define _WIN32_WINNT 0x0502
#define _WIN32_IE 0x0600
#define _WINVER 0x0502
#define ISOLATION_AWARE_ENABLED 1
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
// Visual Styles are enabled
....
HFONT DeafultFont = CreateFont(-11,0,0,0,FW_NORMAL,false,false,false,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,FF_DONTCARE,"Microsoft Sans Serif");
// DeafultFont
.....
case WM_CREATE: {
hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "",
WS_CHILD | WS_VISIBLE,
5, 200, 100, 20, hwnd, (HMENU)22, GetModuleHandle(NULL), NULL);
SendMessage(hEdit ,WM_SETFONT,(WPARAM)DeafultFont ,MAKELPARAM(true,0));
//Creating the control
...
case WM_GETDLGCODE:
{
if(wParam == VK_RETURN)
{
return 0; // Pass Enter key on to EDIT control
}
// Escape and Tab still used for dialog navigation
return DLGC_WANTARROWS|DLGC_WANTCHARS;
break;
}
//Sending the WM_GETDLGCODE message
...
|