Beispiel #1
0
BOOL CControlsDlg::OnInitDialog()
{
	CExtNCW<CExtResizableDialog>::OnInitDialog();

	m_Ctrls.InsertColumn(0, "Control name", 0, 150);
	m_Ctrls.InsertColumn(1, "Key",			0, 150);
	m_Ctrls.InsertColumn(2, "Player",		0, 100);

	RefreshControls();

	CExtBitmap Bitmap;
	Bitmap.LoadBMP_Resource(MAKEINTRESOURCE(IDB_ICONADD));
	m_Add.SetIcon(Bitmap.CreateHICON());

	Bitmap.LoadBMP_Resource(MAKEINTRESOURCE(IDB_ICONEDIT));
	m_Edit.SetIcon(Bitmap.CreateHICON());

	Bitmap.LoadBMP_Resource(MAKEINTRESOURCE(IDB_ICONDELETE));
	m_Remove.SetIcon(Bitmap.CreateHICON());
	
	m_Ctrls.SetExtendedStyle(LVS_EX_FULLROWSELECT);

	// Resizing
	dlgMan.Load(this->m_hWnd, "Software\\Construct\\ControlsDlg");
    dlgAnchor.Init(this->m_hWnd);

	dlgAnchor.Add(IDC_CONTROLSLIST, ANCHOR_TOPLEFT | ANCHOR_BOTTOMRIGHT);
	dlgAnchor.Add(IDC_ADD, ANCHOR_LEFT | ANCHOR_BOTTOM);
	dlgAnchor.Add(IDC_REMOVE, ANCHOR_LEFT | ANCHOR_BOTTOM);
	dlgAnchor.Add(IDC_RENAME, ANCHOR_LEFT | ANCHOR_BOTTOM);
	dlgAnchor.Add(IDOK, ANCHOR_RIGHT | ANCHOR_BOTTOM);

	return TRUE;
}
Beispiel #2
0
CColorPickerButton::CColorPickerButton()
{
    _pFactory = NULL;
    if (g_bitmapHighlight.IsEmpty())
    {
        g_bitmapHighlight.LoadBMP_Resource(MAKEINTRESOURCE(IDB_VPCHIGHLIGHT));
        g_bitmapHighlightX.LoadBMP_Resource(MAKEINTRESOURCE(IDB_VPCHIGHLIGHTX));
    }
}
BOOL CManageVariableDlg::OnInitDialog()
{
	CExtNCW<CExtResizableDialog>::OnInitDialog();

	CExtBitmap Bitmap;
	Bitmap.LoadBMP_Resource(MAKEINTRESOURCE(IDB_ICONADD));
	m_Add.SetIcon(Bitmap.CreateHICON());
	m_Add.SetDrawBorder(FALSE);
	m_Add.SetFlat();

	Bitmap.LoadBMP_Resource(MAKEINTRESOURCE(IDB_ICONDELETE));
	m_Remove.SetIcon(Bitmap.CreateHICON());
	m_Remove.SetDrawBorder(FALSE);
	m_Remove.SetFlat();

	Bitmap.LoadBMP_Resource(MAKEINTRESOURCE(IDB_ICONEDIT));
	m_Edit.SetIcon(Bitmap.CreateHICON());
	m_Edit.SetDrawBorder(FALSE);
	m_Edit.SetFlat();

	Bitmap.LoadBMP_Resource(MAKEINTRESOURCE(IDB_UPARROW));
	m_MoveUp.SetIcon(Bitmap.CreateHICON());
	m_MoveUp.SetDrawBorder(FALSE);
	m_MoveUp.SetFlat();

	Bitmap.LoadBMP_Resource(MAKEINTRESOURCE(IDB_DOWNARROW));
	m_MoveDown.SetIcon(Bitmap.CreateHICON());
	m_MoveDown.SetDrawBorder(FALSE);
	m_MoveDown.SetFlat();

	m_List.InsertColumn(0, "Name", LVCFMT_LEFT, 150);
	m_List.InsertColumn(1, "Type", LVCFMT_LEFT, 50);
	m_List.InsertColumn(2, "Initial Value", LVCFMT_LEFT, 150);

	SetWindowText("Construct : Manage Private Variables");
	
	RefreshVariablesList();

	// Resizing
	dlgMan.Load(this->m_hWnd, "Software\\Construct\\ManageVariableDlg");
    dlgAnchor.Init(this->m_hWnd);

	dlgAnchor.Add(IDC_LIST, ANCHOR_TOPLEFT | ANCHOR_BOTTOMRIGHT);
	dlgAnchor.Add(IDOK, ANCHOR_RIGHT | ANCHOR_BOTTOM);
	dlgAnchor.Add(IDC_ADD, ANCHOR_LEFT | ANCHOR_BOTTOM);
	dlgAnchor.Add(IDC_REMOVE, ANCHOR_LEFT | ANCHOR_BOTTOM);
	dlgAnchor.Add(IDC_RENAME, ANCHOR_LEFT | ANCHOR_BOTTOM);
	dlgAnchor.Add(IDC_MOVEUP, ANCHOR_LEFT | ANCHOR_BOTTOM);
	dlgAnchor.Add(IDC_MOVEDOWN, ANCHOR_LEFT | ANCHOR_BOTTOM);

	m_List.SetExtendedStyle(LVS_EX_FULLROWSELECT);

	return true;
}
BOOL CAddNewTraitDlg::OnInitDialog()
{
	CExtNCW<CExtResizableDialog>::OnInitDialog();

	m_Name.SetWindowText("My Attribute");

	ASSERT(application != NULL);

	m_List.InsertColumn(1, "Attribute name", 0, 197);
	m_List.SetExtendedStyle(LVS_EX_FULLROWSELECT);

	RefreshTraitList();

	CExtBitmap Bitmap;
	Bitmap.LoadBMP_Resource(MAKEINTRESOURCE(IDB_ICONADD));
	m_Add.SetIcon(Bitmap.CreateHICON());
	m_Add.SetTooltipText(AM_ADD);

	Bitmap.LoadBMP_Resource(MAKEINTRESOURCE(IDB_ICONEDIT));
	m_Edit.SetIcon(Bitmap.CreateHICON());
	m_Edit.SetTooltipText(AM_EDIT);

	Bitmap.LoadBMP_Resource(MAKEINTRESOURCE(IDB_ICONDELETE));
	m_Remove.SetIcon(Bitmap.CreateHICON());
	m_Remove.SetTooltipText(AM_REMOVE);

	m_Close.SetWindowTextA(CLOSE);

	// Set dialog title
	CString Title;
	Title.Format("Construct : %s", AM_TITLE);
	SetWindowText(Title);

	// Resizing
	dlgMan.Load(this->m_hWnd, "Software\\Construct\\AttributesMgr");
    dlgAnchor.Init(this->m_hWnd);

	dlgAnchor.Add(IDC_LIST1, ANCHOR_TOPLEFT | ANCHOR_BOTTOMRIGHT);
	dlgAnchor.Add(IDC_NAME, ANCHOR_LEFT | ANCHOR_RIGHT | ANCHOR_BOTTOM);
	dlgAnchor.Add(IDC_ADD, ANCHOR_RIGHT | ANCHOR_BOTTOM);
	dlgAnchor.Add(IDC_REMOVE, ANCHOR_RIGHT | ANCHOR_BOTTOM);
	dlgAnchor.Add(IDC_RENAME, ANCHOR_RIGHT | ANCHOR_BOTTOM);
	dlgAnchor.Add(IDOK, ANCHOR_RIGHT | ANCHOR_BOTTOM);

	return true;
}