当前位置: 首页>>代码示例>>C++>>正文


C++ ListView_SetExtendedListViewStyleEx函数代码示例

本文整理汇总了C++中ListView_SetExtendedListViewStyleEx函数的典型用法代码示例。如果您正苦于以下问题:C++ ListView_SetExtendedListViewStyleEx函数的具体用法?C++ ListView_SetExtendedListViewStyleEx怎么用?C++ ListView_SetExtendedListViewStyleEx使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ListView_SetExtendedListViewStyleEx函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CreateDialog

void FileTransfer::CreateFileTransferDialog()
{
  m_hwndFileTransfer = CreateDialog(m_pApp->m_instance,
                                    MAKEINTRESOURCE(IDD_FILETRANSFER_DLG),
                                    NULL, (DLGPROC)FileTransferDlgProc);

  VNCviewerApp32 *pApp = (VNCviewerApp32 *)(m_clientconn->m_pApp);
  pApp->AddModelessDialog(m_hwndFileTransfer);

  ShowWindow(m_hwndFileTransfer, SW_SHOW);
  UpdateWindow(m_hwndFileTransfer);
  SetWindowLongPtr(m_hwndFileTransfer, GWLP_USERDATA, (LONG_PTR) this);

  m_hwndFTProgress = GetDlgItem(m_hwndFileTransfer, IDC_FTPROGRESS);
  m_hwndFTClientList = GetDlgItem(m_hwndFileTransfer, IDC_FTCLIENTLIST);
  m_hwndFTServerList = GetDlgItem(m_hwndFileTransfer, IDC_FTSERVERLIST);
  m_hwndFTClientPath = GetDlgItem(m_hwndFileTransfer, IDC_CLIENTPATH);
  m_hwndFTServerPath = GetDlgItem(m_hwndFileTransfer, IDC_SERVERPATH);
  m_hwndFTStatus = GetDlgItem(m_hwndFileTransfer, IDC_FTSTATUS);

  ListView_SetExtendedListViewStyleEx(m_hwndFTClientList, LVS_EX_FULLROWSELECT,
                                      LVS_EX_FULLROWSELECT);
  ListView_SetExtendedListViewStyleEx(m_hwndFTServerList, LVS_EX_FULLROWSELECT,
                                      LVS_EX_FULLROWSELECT);

  HANDLE hIcon = LoadImage(m_pApp->m_instance, MAKEINTRESOURCE(IDI_FILEUP),
                           IMAGE_ICON, 16, 16, LR_SHARED);
  SendMessage(GetDlgItem(m_hwndFileTransfer, IDC_CLIENTUP), BM_SETIMAGE,
                         (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
  SendMessage(GetDlgItem(m_hwndFileTransfer, IDC_SERVERUP), BM_SETIMAGE,
                         (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
  DestroyIcon((HICON)hIcon);
  hIcon = LoadImage(m_pApp->m_instance, MAKEINTRESOURCE(IDI_FILERELOAD),
                    IMAGE_ICON, 16, 16, LR_SHARED);
  SendMessage(GetDlgItem(m_hwndFileTransfer, IDC_CLIENTRELOAD), BM_SETIMAGE,
                         (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
  SendMessage(GetDlgItem(m_hwndFileTransfer, IDC_SERVERRELOAD), BM_SETIMAGE,
                         (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
  DestroyIcon((HICON)hIcon);

  RECT Rect;
  GetClientRect(m_hwndFTClientList, &Rect);
  int xwidth = (int)(0.7 * Rect.right);
  int xwidth_ = (int)(0.25 * Rect.right);

  FTInsertColumn(m_hwndFTClientList, "Name", 0, xwidth);
  FTInsertColumn(m_hwndFTClientList, "Size", 1, xwidth_);
  FTInsertColumn(m_hwndFTServerList, "Name", 0, xwidth);
  FTInsertColumn(m_hwndFTServerList, "Size", 1, xwidth_);

  ShowClientItems(m_ClientPathTmp);
  SendFileListRequestMessage(m_ServerPathTmp, 0);
}
开发者ID:TurboVNC,项目名称:turbovnc,代码行数:53,代码来源:FileTransfer.cpp

示例2: sizeof

CSListView::CSListView(HWND hwnd, CSWindow* parent)
{
	m_handle = hwnd;
	m_parent = parent;

	LVGROUP lg = { 0 };
	lg.cbSize = sizeof(LVGROUP);
	lg.mask = LVGF_HEADER | LVGF_GROUPID;

	lg.pszHeader = TranslateT("Favorites");
	lg.iGroupId = 0;
	ListView_InsertGroup(m_handle, -1, &lg);

	lg.pszHeader = TranslateT("Regular statuses");
	lg.iGroupId = 1;
	ListView_InsertGroup(m_handle, -1, &lg);
	ListView_EnableGroupView(m_handle, TRUE);

	LVCOLUMN lvc = { 0 };
	lvc.mask = LVCF_TEXT | LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM;
	lvc.fmt = LVCFMT_LEFT;
	lvc.cx = 0x00;
	lvc.pszText = TEXT("");
	lvc.cx = 0x16;
	SendMessage(m_handle, LVM_INSERTCOLUMN, 0, (LPARAM)&lvc);
	lvc.pszText = TranslateT("Title");
	lvc.cx = 0x64;
	SendMessage(m_handle, LVM_INSERTCOLUMN, 1, (LPARAM)&lvc);
	lvc.pszText = TranslateT("Message");
	lvc.cx = 0xa8;
	SendMessage(m_handle, LVM_INSERTCOLUMN, 2, (LPARAM)&lvc);

	ListView_SetExtendedListViewStyleEx(m_handle, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_HEADERDRAGDROP | LVS_EX_INFOTIP);
	ListView_SetImageList(m_handle, m_parent->m_icons, LVSIL_SMALL);
}
开发者ID:tweimer,项目名称:miranda-ng,代码行数:35,代码来源:cslist.cpp

示例3: InsertColumn

void CTDLFindResultsListCtrl::PreSubclassWindow()
{
	CEnListCtrl::PreSubclassWindow();

	// setup up result list
	InsertColumn(0, CEnString(IDS_FT_TASK), LVCFMT_LEFT, 250);
	InsertColumn(1, CEnString(IDS_FT_WHATMATCHED), LVCFMT_LEFT, 150);
	InsertColumn(2, CEnString(IDS_FT_PATH), LVCFMT_LEFT, 100);

	ListView_SetExtendedListViewStyleEx(*this, LVS_EX_ONECLICKACTIVATE, LVS_EX_ONECLICKACTIVATE);
	ListView_SetExtendedListViewStyleEx(*this, LVS_EX_UNDERLINEHOT, LVS_EX_UNDERLINEHOT);
	ListView_SetExtendedListViewStyleEx(*this, LVS_EX_LABELTIP, LVS_EX_LABELTIP);
	ListView_SetExtendedListViewStyleEx(*this, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);

	RefreshUserPreferences();
}
开发者ID:Fox-Heracles,项目名称:TodoList,代码行数:16,代码来源:tdlfindresultslistctrl.cpp

示例4: InitFmgrList

//////////////////////////////////////////////////////////////////////////
//初始化ListControl
//////////////////////////////////////////////////////////////////////////
BOOL InitFmgrList(HWND hList)
{
	//全局IDC_LIST1
	hFmgrList = hList;
	LVCOLUMN lvCol;
	char *szColumn[]= {"文件类型", "文件名称"};
	int width[]= {100,290};

	ZeroMemory(&lvCol, sizeof(LVCOLUMN));

	lvCol.mask= LVCF_TEXT | LVCF_SUBITEM | LVCF_WIDTH | LVCF_FMT;
	lvCol.fmt= LVCFMT_LEFT;
	ListView_SetExtendedListViewStyleEx(hList,0 , LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_HEADERDRAGDROP);

	for(int i=0; i<2; i++ )
	{
		lvCol.iSubItem= i;
		lvCol.cx= width[i];
		lvCol.pszText= szColumn[i];

		ListView_InsertColumn(hList, i, &lvCol);
	}

	return TRUE;
}
开发者ID:drupalhunter,项目名称:HackCollect,代码行数:28,代码来源:FileMgr.cpp

示例5: ListView_SetExtendedListViewStyleEx

void TcodecsPage::initLV(const char_t *IthirdCol)
{
    hlv=GetDlgItem(m_hwnd,IDC_LV_INCODECS);
    ListView_SetExtendedListViewStyleEx(hlv,LVS_EX_FULLROWSELECT|LVS_EX_INFOTIP|LVS_EX_GRIDLINES,LVS_EX_FULLROWSELECT|LVS_EX_INFOTIP|LVS_EX_GRIDLINES);
    int ncol=0;
    ListView_AddCol(hlv,ncol,cfgGet(IDFF_lvCodecsWidth0),_(IDC_LV_INCODECS,_l("Format" )),false);
    ListView_AddCol(hlv,ncol,cfgGet(IDFF_lvCodecsWidth1),_(IDC_LV_INCODECS,_l("Decoder")),false);
    ListView_AddCol(hlv,ncol,cfgGet(IDFF_lvCodecsWidth2),_(IDC_LV_INCODECS,thirdCol=IthirdCol?IthirdCol:_l("Details")),false);

    hcbx=GetDlgItem(m_hwnd,IDC_CBX_INCODECS);

    formats.clear();
    fillCodecs();

    ListView_SetItemCount(hlv,formats.size());

    curitem=cfgGet(IDFF_lvCodecsSelected);
    lvSetSelItem(IDC_LV_INCODECS,curitem);
    ListView_EnsureVisible(hlv,curitem,FALSE);
    options2dlg(curitem);

    if (setHints!=-1) {
        enableHints(!!setHints);
    }
}
开发者ID:JERUKA9,项目名称:ffdshow-tryouts,代码行数:25,代码来源:Ccodecs.cpp

示例6: ListView_SetExtendedListViewStyleEx

void CDlgProcessSequence::setupListCtrl()
{
	ListView_SetExtendedListViewStyleEx(m_processListCtrl.m_hWnd, LVS_EX_CHECKBOXES, LVS_EX_CHECKBOXES);

	LV_COLUMN lv;
	lv.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH;
	lv.fmt = LVCFMT_LEFT;
	lv.cx = 180;
	lv.pszText = "Processor";
	ASSERTX( -1 != m_processListCtrl.InsertColumn(0, &lv));

	lv.cx = 60;
	lv.pszText = "Input";
	ASSERTX( -1 != m_processListCtrl.InsertColumn(1, &lv));

	lv.cx = 180;
	lv.pszText = "Output";
	ASSERTX( -1 != m_processListCtrl.InsertColumn(2, &lv));

	m_iconList.Create(GetSystemMetrics(SM_CXSMICON),
			GetSystemMetrics(SM_CYSMICON), TRUE, 1, 2); // this last param is a mystery

	HICON hiconItem;        // icon for list view items
	hiconItem = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_Process));
	m_iconList.Add(hiconItem);
	DeleteObject(hiconItem);

	m_processListCtrl.SetImageList( &m_iconList, LVSIL_SMALL);

	populateListCtrl();
}
开发者ID:StephenMcConnel,项目名称:CarlaLegacy,代码行数:31,代码来源:dlgprocesssequence.cpp

示例7: ListView_SetExtendedListViewStyleEx

BOOL StatusServices::OnInitDialog()
{
	CDialogEx::OnInitDialog();

	// TODO:  Add extra initialization here
	m_resizeHelper.Init(m_hWnd);

	CString m_strTmp;
	m_strTmp.LoadString(IDS_SERVICES);
	m_servicesTable.InsertColumn(0, m_strTmp, LVCFMT_CENTER, CQUICKLIST_WIDTH_DEFAULT*2);

	m_strTmp.LoadString(IDS_STATUS);
	m_servicesTable.InsertColumn(1, m_strTmp, LVCFMT_CENTER, CQUICKLIST_WIDTH_DEFAULT-50);

	m_strTmp.LoadString(IDS_PID);
	m_servicesTable.InsertColumn(2, m_strTmp, LVCFMT_CENTER, CQUICKLIST_WIDTH_DEFAULT-50);

	m_strTmp.LoadString(IDS_MEMORY);
	m_servicesTable.InsertColumn(3, m_strTmp, LVCFMT_CENTER, CQUICKLIST_WIDTH_DEFAULT-50);

	m_servicesTable.SetSendMgsId(WM_QUICKLIST_SERVICES);
	m_servicesTable.SetItemCount(0);

	ListView_SetExtendedListViewStyleEx(m_servicesTable.m_hWnd, LVS_EX_GRIDLINES, LVS_EX_GRIDLINES);

	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:eslinux,项目名称:Windows,代码行数:28,代码来源:StatusServices.cpp

示例8: GridLines

inline void CListView::GridLines(bool bOn)
{
	DWORD dwMask  = LVS_EX_GRIDLINES;
	DWORD dwStyle = (bOn) ? dwMask : 0;

	(void)ListView_SetExtendedListViewStyleEx(m_hWnd, dwMask, dwStyle);
}
开发者ID:chrisoldwood,项目名称:WCL,代码行数:7,代码来源:ListView.hpp

示例9: FullRowSelect

inline void CListView::FullRowSelect(bool bOn)
{
	DWORD dwMask  = LVS_EX_FULLROWSELECT;
	DWORD dwStyle = (bOn) ? dwMask : 0;

	(void)ListView_SetExtendedListViewStyleEx(m_hWnd, dwMask, dwStyle);
}
开发者ID:chrisoldwood,项目名称:WCL,代码行数:7,代码来源:ListView.hpp

示例10: CheckBoxes

inline void CListView::CheckBoxes(bool bOn)
{
	DWORD dwMask  = LVS_EX_CHECKBOXES;
	DWORD dwStyle = (bOn) ? dwMask : 0;

	(void)ListView_SetExtendedListViewStyleEx(m_hWnd, dwMask, dwStyle);
}
开发者ID:chrisoldwood,项目名称:WCL,代码行数:7,代码来源:ListView.hpp

示例11: InitListViewColumns

void InitListViewColumns( HWND hListView, const LISTVIEW_COLUMN * Cols, int numColumns, long style )
{
	HKEY	hKey;
	DWORD	valLength;
	TCHAR	colName[32];
	RECT	rc;

	// Get window sizes
	rc.left = -1;
	rc.top = -1;
	RegCreateKey(HKEY_CURRENT_USER, _T("Software\\Sysinternals\\ShareEnum"), &hKey );
	valLength = sizeof(DWORD);
	RegQueryValueEx( hKey, _T("x"), NULL, NULL, (LPBYTE) &rc.left,
			&valLength );
	RegQueryValueEx( hKey, _T("y"), NULL, NULL, (LPBYTE) &rc.top,
			&valLength );
	RegQueryValueEx( hKey, _T("w"), NULL, NULL, (LPBYTE) &rc.right,
			&valLength );
	RegQueryValueEx( hKey, _T("h"), NULL, NULL, (LPBYTE) &rc.bottom,
			&valLength );
	if( rc.left != -1 && rc.top != -1 ) 
		MoveWindow( GetParent( hListView), rc.left, rc.top, rc.right, rc.bottom, TRUE );

	// Set listview styles
	ListView_SetExtendedListViewStyleEx( hListView, style, style );

	// Create columns
	for ( int i = 0; i < numColumns; ++i )  {
		LVCOLUMN	col = { 0 };
		col.mask	= LVCF_TEXT | LVCF_WIDTH;
		col.pszText	= (TCHAR *)Cols[i].Title;
		col.cx		= Cols[i].Width;

		_stprintf( colName, _T("Column%d"), i );

		DWORD val = -1;
		valLength = sizeof(DWORD);
		RegQueryValueEx( hKey,colName, NULL, NULL, (LPBYTE) &val, &valLength );
		if ( val < 600 )
			col.cx = val;
		ListView_InsertColumn( hListView, i, &col );
	}
	RegCloseKey( hKey );

	HINSTANCE hInstance = GetModuleHandle(NULL);
	// Create image list (order corresponds to LISTVIEW_IMG_* enumeration)
	HIMAGELIST	hImageList	= ImageList_Create( GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLORDDB, 10, 30 );
	UINT		loadFlags	= LR_DEFAULTCOLOR | LR_LOADTRANSPARENT | LR_SHARED;

	ImageList_SetBkColor( hImageList, GetSysColor(COLOR_WINDOW) );
	ImageList_AddIcon( hImageList, (HICON) LoadImage( hInstance, MAKEINTRESOURCE(IDI_FILE),			IMAGE_ICON, 16, 16, loadFlags));
	ImageList_SetBkColor( hImageList, GetSysColor(COLOR_BTNFACE) );
	ImageList_AddIcon( hImageList, (HICON) LoadImage( hInstance, MAKEINTRESOURCE(IDI_DOWNARROW),	IMAGE_ICON, 16, 16, loadFlags ) );
	ImageList_AddIcon( hImageList, (HICON) LoadImage( hInstance, MAKEINTRESOURCE(IDI_UPARROW),		IMAGE_ICON, 16, 16, loadFlags ) );
	ImageList_SetBkColor( hImageList, GetSysColor(COLOR_WINDOW) );
	ImageList_AddIcon( hImageList, (HICON) LoadImage( hInstance, MAKEINTRESOURCE(IDI_FILEGOOD),		IMAGE_ICON, 16, 16, loadFlags ) );
	ImageList_AddIcon( hImageList, (HICON) LoadImage( hInstance, MAKEINTRESOURCE(IDI_FILEBAD),		IMAGE_ICON, 16, 16, loadFlags ) );

	ListView_SetImageList( hListView, hImageList, LVSIL_SMALL );
}
开发者ID:caidongyun,项目名称:libs,代码行数:60,代码来源:ListView.cpp

示例12: ListView_SetExtendedListViewStyleEx

void CGldEditorView::OnInitialUpdate()
{
	CListView::OnInitialUpdate();

	ListView_SetExtendedListViewStyleEx(GetListCtrl().m_hWnd,
		LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES ,
		LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES  );
}
开发者ID:GridOPTICS,项目名称:FNCS-gridlab-d,代码行数:8,代码来源:GldEditorView.cpp

示例13: private_InitListView

static VOID CALLBACK
private_InitListView(HWND hListView) {
	INT			  iCount;
	LVCOLUMN	lvColumn;

    for ( iCount = 0; iCount < sizeof(g_ListViewColumn)/sizeof(g_ListViewColumn[0]); ++iCount ) {
	    ZeroMemory( &lvColumn, sizeof(lvColumn) );
	    lvColumn.mask = g_ListViewColumn[iCount].iMask;
	    lvColumn.iSubItem = g_ListViewColumn[iCount].iId;
	    lvColumn.pszText = g_ListViewColumn[iCount].lpName;
	    lvColumn.cx = g_ListViewColumn[iCount].iWidth;
	    lvColumn.fmt = LVCFMT_CENTER;
	    ListView_InsertColumn( hListView, iCount, &lvColumn );
    }
    ListView_SetExtendedListViewStyleEx( hListView, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT );
    ListView_SetExtendedListViewStyleEx( hListView, LVS_EX_GRIDLINES, LVS_EX_GRIDLINES );
    ListView_SetExtendedListViewStyleEx( hListView, LVS_EX_SINGLEROW, LVS_EX_SINGLEROW );
}
开发者ID:Pastor,项目名称:fileinfo,代码行数:18,代码来源:file_stream_info.c

示例14: Create

void CMyListCtrl::CreateControl( int iID,CWnd* pParent )
{
	Create(WS_CHILD|WS_VISIBLE|WS_VSCROLL|LVS_SHOWSELALWAYS|LVS_REPORT|LVS_OWNERDRAWFIXED,CRect(0,0,0,0),pParent,iID);
	ListView_SetExtendedListViewStyleEx ( m_hWnd,LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT );

	m_tooltip.m_pClientWnd = this->GetParent();//AfxGetMainWindow();
	m_tooltip.m_hParent	 = m_hWnd;
	m_tooltip.CreateEx(WS_EX_TOOLWINDOW|WS_EX_TOPMOST,TOOLTIPS_CLASS,"",TTS_ALWAYSTIP,CRect(0,0,0,0),NULL,0);	
	m_tooltip.m_clrBK = RGB(255, 255, 225);
}
开发者ID:2Dou,项目名称:PlayBox,代码行数:10,代码来源:MyListCtrl.cpp

示例15: InitInstance

BOOL InitInstance(HANDLE hInstance, int nCmdShow)
{
	g_hInst = (HINSTANCE)hInstance;
	
	INITCOMMONCONTROLSEX	icex;

	icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
	icex.dwICC = ICC_LISTVIEW_CLASSES | ICC_BAR_CLASSES | ICC_INTERNET_CLASSES | ICC_TAB_CLASSES;

	InitCommonControlsEx(&icex);

    g_hMainWnd = CreateWindowEx(0, _T("VirtualClient"), _T("미르의 전설 2 - 가상 클라이언트"), 
							WS_OVERLAPPEDWINDOW|WS_VISIBLE,
							CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,                 
							NULL, NULL, (HINSTANCE)hInstance, NULL);

	RECT rcMainWnd;

	GetClientRect(g_hMainWnd, &rcMainWnd);

    g_hLogMsgWnd = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, "", 
							WS_CHILD|WS_VISIBLE|WS_BORDER|LVS_REPORT|LVS_EDITLABELS,
							0, 0, (rcMainWnd.right - rcMainWnd.left), 
							(rcMainWnd.bottom - rcMainWnd.top),
							g_hMainWnd, NULL, (HINSTANCE)hInstance, NULL);

	ListView_SetExtendedListViewStyleEx(g_hLogMsgWnd, 0, LVS_EX_FULLROWSELECT);

	LV_COLUMN	lvc;
	TCHAR		szText[64];

	lvc.mask	= LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
	lvc.fmt		= LVCFMT_LEFT;
	lvc.cx		= 150;
	lvc.pszText	= szText;

	for (int i = 0; i < 3; i++)
	{
		lvc.iSubItem	= i;
		lvc.pszText		= szLvsLable[i];
		
		ListView_InsertColumn(g_hLogMsgWnd, i, &lvc);
	}

	ShowWindow(g_hMainWnd, SW_SHOW);
	UpdateWindow(g_hMainWnd);

	if (WSAStartup(MAKEWORD(2, 2), &g_wsd) != 0)
		return (FALSE);

	ConnectServer(g_sock, &g_addr, _IDM_SOCKMSG, g_szServerIP, 0, 7000, FD_CONNECT|FD_READ|FD_CLOSE);

	return TRUE;
}
开发者ID:KaSt,项目名称:LegendOfMir3_Src,代码行数:54,代码来源:VirtualClient.cpp


注:本文中的ListView_SetExtendedListViewStyleEx函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。