Console 介绍
Console是Windows控制台的增强的实现。受eConsole(http://www.informatik.uni-
frankfurt.de/~corion)项目的启发而创建。
像文本编辑器一样选择文本
设置不同类型的背景(纯色,图形,透明度)
设置字体
各种不同的窗口风格
注:Console不是一个Shell,因此,它没有实现Shell的特性,如命令完成,语法着色,命令行历史等。
Console是你选择的Shell(cmd.exe, 4NT, bash等)的更强大的终端。
=============================================================================
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console\Console2 command window]
“CodePage”=dword:000003a8
“ScreenBufferSize”=dword:01f40050
“WindowPosition”=dword:00ee0127
“FontSize”=dword:000e0000
“FontFamily”=dword:00000036
“FontWeight”=dword:00000190
“FaceName”=”新宋体”
BOOL ConsoleView::PreTranslateMessage(MSG* pMsg)
{
if ((pMsg->message == WM_KEYDOWN) ||
(pMsg->message == WM_KEYUP) ||
(pMsg->message == WM_SYSKEYDOWN) ||
(pMsg->message == WM_SYSKEYUP))
{
// Avoid calling ::TranslateMessage for WM_KEYDOWN, WM_KEYUP,
// WM_SYSKEYDOWN and WM_SYSKEYUP (except for wParam == VK_PACKET,
// which is sent by sendinput when pasting text).
///
// This prevents WM_CHAR and WM_SYSCHAR messages, enabling stuff like
// handling ‘dead’ characters input and passing all keys to console.
if (pMsg->wParam == VK_PACKET) return FALSE;
//::dispatchMessage(pMsg); // 原代码中的内容
//添加输入中文功能: begin (参考自http://download.csdn.net/detail/zhangj7851/2513105)
::TranslateMessage(pMsg);
if(!::PeekMessage(pMsg, NULL, 0, 0, PM_norEMOVE))
::dispatchMessage(pMsg);
return TRUE;
}
return FALSE;
}
void MainFrame::SetwindowStyles()
{
......
//dwStyle &= ~WS_MAXIMIZEBox; // 这一行注释或删除掉
......
}