INT_PTR CAddBookmarkDialog::OnInitDialog()
{
	SetDialogIcon();

	SetDlgItemText(m_hDlg,IDC_BOOKMARK_NAME,m_Bookmark.GetName().c_str());
	SetDlgItemText(m_hDlg,IDC_BOOKMARK_LOCATION,m_Bookmark.GetLocation().c_str());

	if(m_Bookmark.GetName().size() == 0 ||
		m_Bookmark.GetLocation().size() == 0)
	{
		EnableWindow(GetDlgItem(m_hDlg,IDOK),FALSE);
	}

	HWND hTreeView = GetDlgItem(m_hDlg,IDC_BOOKMARK_TREEVIEW);

	m_pBookmarkTreeView = new CBookmarkTreeView(hTreeView,GetInstance(),&m_AllBookmarks,
		m_pabdps->m_guidSelected,m_pabdps->m_setExpansion);

	HWND hEditName = GetDlgItem(m_hDlg,IDC_BOOKMARK_NAME);
	SendMessage(hEditName,EM_SETSEL,0,-1);
	SetFocus(hEditName);

	CBookmarkItemNotifier::GetInstance().AddObserver(this);

	m_pabdps->RestoreDialogPosition(m_hDlg,true);

	return 0;
}
Exemple #2
0
static int OnInitDialog(HWND hDlg, LPARAM lParam)
{
    TFlagDialogData * pData = (TFlagDialogData *)lParam;

    // Configure the dialog
    SetDialogData(hDlg, lParam);
    SetDialogIcon(hDlg, IDI_FILE_TEST);

    // Remember the dialog handle
    pData->hDlg = hDlg;

    // Is the dialog pre-arranged?
    if(pData->IsPreArranged)
    {
        CreateDialogLayout_PreArranged(pData);
    }
    else
    {
        CreateDialogLayout_Empty(pData);
    }

    // Clear the dialog flags
    pData->dwFlags = 0;
    return TRUE;
}
static void OnInitDialog(HWND hDlg, LPARAM lParam)
{
    TDialogData * pData = (TDialogData *)lParam;
    TAnchors * pAnchors;
    HWND hWndChild;

    // Initialize dialog data
    SetDialogIcon(hDlg, IDI_FILE_TEST);
    pData->hDlg = hDlg;
    SetDialogData(hDlg, pData);

    // Configure the anchors
    pData->pAnchors = pAnchors = new TAnchors();
    if(pAnchors != NULL)
    {
        pAnchors->AddAnchor(hDlg, IDC_FILE_DATA, akAll);
        pAnchors->AddAnchor(hDlg, IDC_INFORMATION, akLeft | akRight | akBottom);
        pAnchors->AddAnchor(hDlg, IDOK, akRight | akBottom);
    }

    // Configure the data viewer
    hWndChild = GetDlgItem(hDlg, IDC_FILE_DATA);
    if(hWndChild != NULL)
    {
        DataEditor_SetDataFormat(hWndChild, PtrPlatformSpecific, 0x10);
        DataEditor_SetData(hWndChild, (ULONGLONG)pData->BaseAddress, pData->pbFileData, pData->cbFileData);
    }
}
INT_PTR CManageBookmarksDialog::OnInitDialog()
{
	/* TODO: Enable drag and drop for listview and treeview. */
	SetDialogIcon();
	SetupSearchField();
	SetupToolbar();
	SetupTreeView();
	SetupListView();

	CBookmarkItemNotifier::GetInstance().AddObserver(this);

	UpdateToolbarState();

	SetFocus(GetDlgItem(m_hDlg,IDC_MANAGEBOOKMARKS_LISTVIEW));

	return 0;
}
Exemple #5
0
static int OnInitDialog(HWND hDlg, LPARAM lParam)
{
    PFILE_FULL_EA_INFORMATION * ppEaItem = (PFILE_FULL_EA_INFORMATION *)lParam;
    PFILE_FULL_EA_INFORMATION pEaItem = *ppEaItem;
    HWND hWndChild;

    // Configure the dialog
    SetWindowLongPtr(hDlg, DWLP_USER, lParam);
    SetDialogIcon(hDlg, IDI_FILE_TEST);
    CenterWindowToParent(hDlg);

    // Set the dialog title to "Insert" or to "Edit"
    SetWindowTextRc(hDlg, pEaItem ? IDS_EDIT_EA_TITLE : IDS_INSERT_EA_TITLE);

    // Set the name and value limit
    hWndChild = GetDlgItem(hDlg, IDC_DATA_NAME);
    if(hWndChild != NULL)
        Edit_LimitText(hWndChild, (BYTE)-1);

    // Fill the dialog
    nChangingEdit++;
    CheckDlgButton(hDlg, IDC_RADIO1, BST_CHECKED);
    if(pEaItem != NULL)
    {
        if(hWndChild != NULL)
            SetWindowTextA(hWndChild, pEaItem->EaName);

        SetDlgItemCText(hDlg,
                        IDC_DATA_VALUE_TEXT,
                (LPBYTE)pEaItem->EaName + pEaItem->EaNameLength + 1,
                        pEaItem->EaValueLength);

        SetDlgItemBin(hDlg,
                      IDC_DATA_VALUE_BIN,
              (LPBYTE)pEaItem->EaName + pEaItem->EaNameLength + 1,
                      pEaItem->EaValueLength);
    }
    UpdateDialog(hDlg);
    nChangingEdit--;

    return TRUE;
}
Exemple #6
0
static int OnInitDialog(HWND hDlg, LPARAM /* lParam */)
{
    TCHAR szMyName[MAX_PATH + 1];
    HWND hWndChild;

    // Set the dialog icon
    SetDialogIcon(hDlg, IDI_FILE_TEST);

    // Parse all child windows
    // If there is IDC_VERSION static text, supply the 4-digit version from resources
    hWndChild = GetDlgItem(hDlg, IDC_FILETEST_WEB);
    if(hWndChild != NULL)
        InitURLButton(hDlg, IDC_FILETEST_WEB, FALSE);

    // If there is IDC_VERSION static text, supply the 4-digit version from resources
    hWndChild = GetDlgItem(hDlg, IDC_VERSION);
    if(hWndChild != NULL)
    {
        GetModuleFileName(NULL, szMyName, MAX_PATH);
        SetWindowModuleVersion(hWndChild, szMyName);
    }

    return TRUE;
}