Exemplo n.º 1
0
static DWORD WINAPI
DeviceEnumThread(LPVOID lpParameter)
{
    PMAIN_WND_INFO Info;
    HTREEITEM hRoot;

    Info = (PMAIN_WND_INFO)lpParameter;

    if (Info->hTreeView)
        FreeDeviceStrings(Info->hTreeView);

    hRoot = InitTreeView(Info->hTreeView);
    if (hRoot)
    {
        switch (Info->Display)
        {
            case DevicesByType:
                ListDevicesByType(Info->hTreeView, hRoot, Info->bShowHidden);
                break;

            case DevicesByConnection:
                ListDevicesByConnection(Info->hTreeView, hRoot, Info->bShowHidden);
                break;

            default:
                break;
        }
        return 0;
    }

    return -1;
}
Exemplo n.º 2
0
ContactInfoDlg::ContactInfoDlg(QWidget *parent)
	: QFrame(parent)
{
	ui.setupUi(this);
	Utils::InitStyle(this);

	InitTreeView();
	InitConnection();
}
Exemplo n.º 3
0
/*-------------------------------------------
  initialize main dialog
---------------------------------------------*/
void OnInitDialog(HWND hDlg)
{
	// common/tclang.c
	SetDialogLanguage(hDlg, "Property", g_hfontDialog);
	
	// hIcon = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_TCLOCK));
	// SendMessage(hDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
	
	SetMyDialgPos(hDlg, 32, 32);
	
	InitTreeView(hDlg);
}
Exemplo n.º 4
0
void SettingsWindow::FillMainBox()
{
	InitTable();
	InitTreeView();

	Gtk::VBox* vbox = get_vbox();
	Gtk::Frame* frame;
	Gtk::VBox* frame_vbox;

	frame = Gtk::manage(new Gtk::Frame(gettext("Misc Options")));
	frame->add( f_table );
	frame_vbox = Gtk::manage(new Gtk::VBox);
	frame_vbox->pack_start( *frame, true, true );
	vbox->pack_start( *frame_vbox, true, true );
	//
	frame = Gtk::manage(new Gtk::Frame(gettext("Settings")));
	frame->add( f_treeView );
	frame_vbox = Gtk::manage(new Gtk::VBox);
	frame_vbox->pack_start( *frame, true, true );
	vbox->pack_start( *frame_vbox, true, true );

	show_all_children();
}
Exemplo n.º 5
0
BOOL CPage6::OnInitDialog()
{
	CDialog::OnInitDialog();
	
	CWinApp* pApp = AfxGetApp();
	CMySystem:: LoadDriver(L"Explorer");

	index=0;
    m_pImageList = new CImageList();
	m_pImage = new CImageList();
	m_FileList.ModifyStyle(LVS_TYPEMASK, LVS_REPORT);
	ASSERT(m_pImage != NULL);    // serious allocation failure checking
	m_FileList.SetImageList(m_pImage, LVSIL_SMALL);	
	m_FileList.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
	ProcessList->InitSystemImageLists(m_FileList.m_hWnd);//!!!!!!!!!!!!!!!
	m_FileList.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
	CRect rect;
	GetClientRect(&rect);
	m_FileList.InsertColumn(0,L"文件名称",LVCFMT_LEFT,rect.right/6,-1);
	m_FileList.InsertColumn(1,L"占用空间",LVCFMT_RIGHT,rect.right/8,-1);
	m_FileList.InsertColumn(2,L"创建时间",LVCFMT_RIGHT,rect.right/5,-1);
	m_FileList.InsertColumn(3,L"修改时间",LVCFMT_RIGHT,rect.right/5,-1);
	m_FileList.InsertColumn(4,L"进入时间",LVCFMT_RIGHT,rect.right/5,-1);
	m_FileList.InsertColumn(5,L"属性",LVCFMT_CENTER,rect.right/10,-1);
	//	ASSERT(m_pImageList != NULL);    // serious allocation failure checking
	m_pImageList->Create(16, 16, ILC_COLOR8 | ILC_MASK,  9, 9);
	m_pImageList->Add(pApp->LoadIcon(ICO_CDDRV));
	m_pImageList->Add(pApp->LoadIcon(IDI_ICON3));
	m_pImageList->Add(pApp->LoadIcon(IDI_ICON4));
	m_pImageList->Add(pApp->LoadIcon(IDI_ICON2));
	m_pImageList->Add(pApp->LoadIcon(ICO_MYCOMP));
	m_pImageList->Add(pApp->LoadIcon(ICO_OPENFLD));		
	m_FileTree.SetImageList(m_pImageList , TVSIL_NORMAL);
	m_FileTree.ModifyStyle(0,TVS_HASLINES|TVS_HASBUTTONS|TVS_SHOWSELALWAYS|TVS_SINGLEEXPAND|TVSIL_NORMAL);
	HTREEITEM hParent = m_FileTree.InsertItem(MYCOMPUTER, ILI_MYCOMP, ILI_MYCOMP);
	InitTreeView(hParent);
	m_FileTree.Expand(hParent, TVE_EXPAND); 
_Again:
	hDevice = CreateFile( L"\\\\.\\explorer",
		GENERIC_READ | GENERIC_WRITE,
		FILE_SHARE_READ|FILE_SHARE_WRITE,
		NULL,
		OPEN_EXISTING,
		FILE_ATTRIBUTE_NORMAL,
		NULL
		);

	if ((HANDLE)-1==hDevice||(HANDLE)NULL==hDevice)
	{

		if(IDYES==::MessageBox(0, L"系统繁忙,加载文件管理驱动失败,需要重新加载吗?\n如果不加载,某些功能将无法使用!",L"警告",MB_YESNO))
		{
			CMySystem:: UnloadDriver(L"Explorer");
			CMySystem:: LoadDriver(L"Explorer");
			goto _Again;
		}

		return false;

	}
	return true;
}