抛弃GdCpp*.dll/pdb历史重新建库。libhv和Sqlite的dll保留
This commit is contained in:
38
staticOnly/KsMFC/CBCGPEditReadOnly.h
Normal file
38
staticOnly/KsMFC/CBCGPEditReadOnly.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
// 只读的Edit,代替Static显示文本,方便设置背景色
|
||||
class CBCGPEditReadOnly
|
||||
: public CBCGPEdit
|
||||
{
|
||||
public:
|
||||
COLORREF defBkColor; // Edit的默认背景色
|
||||
|
||||
// 根据告警基本设置背景色.
|
||||
// 0:正常,1:警告,2:错误
|
||||
void setWarinLevel(uint32_t level) {
|
||||
// 获取当前颜色,相同则不设置
|
||||
auto color = GetColorTheme();
|
||||
switch (level)
|
||||
{
|
||||
case 0:
|
||||
if (color.m_clrBackground != defBkColor) {
|
||||
color.m_clrBackground = defBkColor;
|
||||
SetColorTheme(color);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (color.m_clrBackground != RGB(255, 255, 0)) {
|
||||
color.m_clrBackground = RGB(255, 255, 0);
|
||||
SetColorTheme(color);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (color.m_clrBackground != RGB(255, 0, 0)) {
|
||||
color.m_clrBackground = RGB(255, 0, 0);
|
||||
SetColorTheme(color);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user