📄 ngstatusbarpanetext.h
字号:
/*****************************************************************************
*
* Autor: Joachim Raidl
* Klasse: CNGStatusBarPaneText
* JRRC: %J%
* Beschreibung: This class is completely inline. With their a Pane of the status
* line can be switched temporarly to text. The text remains in the
* Pane visible until the produced CNGStatusBarPaneText object is again destroyed.
* This takes place normally automatically at the end of a block.
* Here it is no matter whether the desired Pane in the text bit-map was
* produced -, number or progress bar mode. Also it is no matter, whether
* the Pane is even actively or disabled, the representation always corresponds
* to the active status.
* Inlines: CNGStatusBarPaneText(), ~CNGStatusBarPaneText(),
* Beispiel: CNGStatusBarPaneText t("Now even is calculated ...");
*
****************************************************************************/
#ifndef __CNGStatusBarPaneText__
#define __CNGStatusBarPaneText__
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "NGStatusBar.h"
class CNGStatusBarPaneText
{
protected:
int index;
public:
CNGStatusBarPaneText(LPCSTR text, int ix = 0)
{
ASSERT(CNGStatusBar::aktBar);
index = ix;
CNGStatusBar::aktBar->SavePane(ix);
CNGStatusBar::aktBar->SetMode(ix, XSB_TEXT | CNGStatusBar::aktBar->GetMode(ix) & XSB_ALIGN);
COLORREF fg = CNGStatusBar::aktBar->GetFgColor(ix);
COLORREF bk = CNGStatusBar::aktBar->GetBkColor(ix);
CNGStatusBar::aktBar->SetFgColor(ix, fg, fg); // Gleiche Fg- und Bk-Farbe f黵
CNGStatusBar::aktBar->SetBkColor(ix, bk, bk); // On- und Off-Modus
CNGStatusBar::aktBar->SetText(ix, text, text); // Same text in both modes
}
~CNGStatusBarPaneText()
{
ASSERT(CNGStatusBar::aktBar);
CNGStatusBar::aktBar->RestorePane(index);
}
};
#endif // __CNGStatusBarPaneText__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -