DevOps研发效能
媒体矩阵
开源中国APP
授权协议 GPL
开发语言 C/C++
操作系统 Windows
软件类型 开源软件
开源组织
地区 不详
投 递 者 唐朝和尚
适用人群 未知
收录时间 2012-03-28

软件简介

Console是Windows控制台的增强的实现。受eConsole(http://www.informatik.uni-frankfurt.de/~corion)项目的启发而创建。

Console功能包括:

多选项卡(多标签页)支持

像文本编辑器一样选择文本

设置不同类型的背景(纯色,图形,透明度)

设置字体

各种不同的窗口风格

注:Console不是一个Shell,因此,它没有实现Shell的特性,如命令完成,语法着色,命令行历史等。

Console是你选择的Shell(cmd.exe, 4NT, bash等)的更强大的终端。

=============================================================================

官方版本不支持中文显示和输入,并且窗口最大化

我们可以对其做一些修改来实现中文显示和输入。

1,中文显示

把下面的内容保存为reg文件:

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"="新宋体"

 

2,中文输入(需要修改源代码)

修改ConsoleView.cpp文件:

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);

//添加输入中文功能: end

return TRUE;

}

 

return FALSE;

}

 

3,窗口最大化(需要修改源代码)

修改MainFrame.cpp文件

void MainFrame::SetWindowStyles()

{

    ......

    //dwStyle &= ~WS_MAXIMIZEBOX;   // 这一行注释或删除掉

    ......

}

展开阅读全文

评论

点击加入讨论🔥(1) 发布并加入讨论🔥
暂无内容
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
暂无内容
1 评论
15 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部