本文整理汇总了C++中WindowStyle::tab_stop方法的典型用法代码示例。如果您正苦于以下问题:C++ WindowStyle::tab_stop方法的具体用法?C++ WindowStyle::tab_stop怎么用?C++ WindowStyle::tab_stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WindowStyle
的用法示例。
在下文中一共展示了WindowStyle::tab_stop方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: form
int WINAPI
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
#ifdef _WIN32_WCE
LPWSTR lpCmdLine,
#else
LPSTR lpCmdLine2,
#endif
int nCmdShow)
#endif
{
const unsigned screen_width = 640, screen_height = 480;
ScreenGlobalInit screen_init;
Layout::Initialize(screen_width, screen_height);
InitialiseFonts();
DialogLook *dialog_look = new DialogLook();
dialog_look->Initialise(bold_font, normal_font, bold_font, bold_font);
SingleWindow main_window;
main_window.set(_T("STATIC"), _T("RunListControl"),
0, 0, screen_width, screen_height);
main_window.show();
WndForm form(main_window, *dialog_look, 0, 0,
main_window.get_width(), main_window.get_height(),
_T("RunListControl"));
ContainerWindow &client_area = form.GetClientAreaWindow();
WindowStyle style;
style.tab_stop();
WndListFrame list(client_area, *dialog_look, 2, 2,
client_area.get_width() - 4,
client_area.get_height() - 4,
style, normal_font.get_height() + 4);
list.SetPaintItemCallback(PaintItemCallback);
list.SetLength(64);
list.set_focus();
form.ShowModal();
delete dialog_look;
DeinitialiseFonts();
return 0;
}
示例2: bstyle
/**
* Creates a control from the given XMLNode as a child of the given
* parent.
*
* @param form the WndForm object
* @param LookUpTable The parent CallBackTable
* @param node The XMLNode that represents the control
* @param eDialogStyle The parent's dialog style
*/
static Window *
LoadChild(WndForm &form, ContainerWindow &parent, Color background_color,
CallBackTableEntry *LookUpTable,
XMLNode node, const DialogStyle eDialogStyle,
int bottom_most=0)
{
Window *window = NULL;
// Determine name, coordinates, width, height
// and caption of the control
const TCHAR* Name = GetName(node);
const TCHAR* Caption = GetCaption(node);
RECT rc = parent.get_client_rect();
ControlPosition pos = GetPosition(node, rc, bottom_most);
if (!pos.no_scaling)
pos.x = ScaleWidth(pos.x, eDialogStyle);
ControlSize size = GetSize(node, rc, pos);
if (!size.no_scaling)
size.cx = ScaleWidth(size.cx, eDialogStyle);
WindowStyle style;
if (!StringToIntDflt(node.getAttribute(_T("Visible")), 1))
style.hide();
if (StringToIntDflt(node.getAttribute(_T("Border")), 0))
style.border();
bool advanced = _tcschr(Caption, _T('*')) != NULL;
// PropertyControl (WndProperty)
if (_tcscmp(node.getName(), _T("Edit")) == 0) {
WndProperty *W;
int CaptionWidth;
bool ReadOnly;
bool MultiLine;
// Determine the width of the caption field
CaptionWidth = StringToIntDflt(node.getAttribute(_T("CaptionWidth")), 0);
if (Layout::ScaleSupported())
CaptionWidth = Layout::Scale(CaptionWidth);
CaptionWidth = ScaleWidth(CaptionWidth, eDialogStyle);
// Determine whether the control is multiline or readonly
MultiLine = StringToIntDflt(node.getAttribute(_T("MultiLine")), 0);
ReadOnly = StringToIntDflt(node.getAttribute(_T("ReadOnly")), 0);
// Load the event callback properties
WndProperty::DataChangeCallback_t DataNotifyCallback =
(WndProperty::DataChangeCallback_t)
GetCallBack(LookUpTable, node, _T("OnDataNotify"));
WindowControl::OnHelpCallback_t OnHelpCallback =
(WindowControl::OnHelpCallback_t)
GetCallBack(LookUpTable, node, _T("OnHelp"));
// Create the Property Control
style.control_parent();
EditWindowStyle edit_style;
if (ReadOnly)
edit_style.read_only();
else
edit_style.tab_stop();
if (is_embedded() || Layout::scale_1024 < 2048)
/* sunken edge doesn't fit well on the tiny screen of an
embedded device */
edit_style.border();
else
edit_style.sunken_edge();
if (MultiLine) {
edit_style.multiline();
edit_style.vscroll();
}
window = W = new WndProperty(parent, Caption,
pos.x, pos.y, size.cx, size.cy,
CaptionWidth, background_color,
style, edit_style,
DataNotifyCallback);
// Set the fore- and background color
LoadColors(*W, node);
// Set the help function event callback
W->SetOnHelpCallback(OnHelpCallback);
//.........这里部分代码省略.........