本文整理汇总了C++中SetExtendedStyle函数的典型用法代码示例。如果您正苦于以下问题:C++ SetExtendedStyle函数的具体用法?C++ SetExtendedStyle怎么用?C++ SetExtendedStyle使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetExtendedStyle函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetExtendedStyle
void CListCtrl_Sortable::PreSubclassWindow()
{
CListCtrl::PreSubclassWindow();
// Focus retangle is not painted properly without double-buffering
#if (_WIN32_WINNT >= 0x501)
SetExtendedStyle(LVS_EX_DOUBLEBUFFER | GetExtendedStyle());
#endif
SetExtendedStyle(GetExtendedStyle() | LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP);
EnableWindowTheme(GetSafeHwnd(), L"Explorer", NULL);
//m_hDC = ::GetDC(m_hWnd);
}
示例2: SetPrefsKey
void CDownloadClientsCtrl::Init()
{
SetPrefsKey(_T("DownloadClientsCtrl"));
SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP);
InsertColumn(0, GetResString(IDS_QL_USERNAME), LVCFMT_LEFT, DFLT_CLIENTNAME_COL_WIDTH);
InsertColumn(1, GetResString(IDS_CD_CSOFT), LVCFMT_LEFT, DFLT_CLIENTSOFT_COL_WIDTH);
InsertColumn(2, GetResString(IDS_FILE), LVCFMT_LEFT, DFLT_FILENAME_COL_WIDTH);
InsertColumn(3, GetResString(IDS_DL_SPEED), LVCFMT_RIGHT, DFLT_DATARATE_COL_WIDTH);
InsertColumn(4, GetResString(IDS_AVAILABLEPARTS), LVCFMT_LEFT, DFLT_PARTSTATUS_COL_WIDTH);
InsertColumn(5, GetResString(IDS_CL_TRANSFDOWN), LVCFMT_RIGHT, DFLT_SIZE_COL_WIDTH);
InsertColumn(6, GetResString(IDS_CL_TRANSFUP), LVCFMT_RIGHT, DFLT_SIZE_COL_WIDTH);
InsertColumn(7, GetResString(IDS_META_SRCTYPE), LVCFMT_LEFT, 100);
SetAllIcons();
Localize();
LoadSettings();
//Xman client percentage
CFont* pFont = GetFont();
LOGFONT lfFont = {0};
pFont->GetLogFont(&lfFont);
lfFont.lfHeight = 11;
m_fontBoldSmaller.CreateFontIndirect(&lfFont);
//Xman end
SetSortArrow();
SortItems(SortProc, GetSortItem() + (GetSortAscending() ? 0 : 100));
}
示例3: SetExtendedStyle
void CKadSearchListCtrl::Init()
{
SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP);
/*
InsertColumn(colNum, GetResString(IDS_NUMBER) ,LVCFMT_LEFT,50);
InsertColumn(colKey, GetResString(IDS_KEY) ,LVCFMT_LEFT,50);
InsertColumn(colType, GetResString(IDS_TYPE) ,LVCFMT_LEFT,100);
InsertColumn(colName, GetResString(IDS_SW_NAME) ,LVCFMT_LEFT,100);
InsertColumn(colStop, GetResString(IDS_STATUS),LVCFMT_LEFT,100);
InsertColumn(colLoad, GetResString(IDS_THELOAD) ,LVCFMT_LEFT,100);
InsertColumn(colPacketsSent, GetResString(IDS_PACKSENT) ,LVCFMT_LEFT,100);
InsertColumn(colResponses, GetResString(IDS_RESPONSES) ,LVCFMT_LEFT, 100);
*/
InsertColumn(colNum, _T("Number") ,LVCFMT_LEFT,50);
InsertColumn(colKey, _T("Key") ,LVCFMT_LEFT,80);
InsertColumn(colType, _T("Type") ,LVCFMT_LEFT,80);
InsertColumn(colName, _T("Name") ,LVCFMT_LEFT,50);
InsertColumn(colStop, _T("Status"),LVCFMT_LEFT,60);
InsertColumn(colLoad, _T("Load") ,LVCFMT_LEFT,50);
InsertColumn(colPacketsSent, _T("Packets Sent") ,LVCFMT_LEFT,30);
InsertColumn(colResponses, _T("Responses") ,LVCFMT_LEFT, 30);
// SetAllIcons();
Localize();
LoadSettings();
SetSortArrow();
SortItems(SortProc, MAKELONG(GetSortItem(), (GetSortAscending()? 0 : 0x0001)));
}
示例4: SetImageList
BOOL MyListCtrl::init()
{
//Create Image list.
m_ImageListThumb.DeleteImageList();
m_IconWidth=2;
m_IconHeight=27;
m_ImageListThumb.Create(m_IconWidth, m_IconHeight, ILC_COLOR24, 0, 1);
SetImageList(&m_ImageListThumb, LVSIL_SMALL);
m_ShowIcons=FALSE;
Arrange(LVSCW_AUTOSIZE);
//LVSCW_AUTOSIZE
FreeListItems();
// For the resize problem......
m_iNumberOfColumns=2;
m_iColumnWidthArray[0]=60;
m_iColumnWidthArray[1]=40;
m_iColumnWidthArray[2]=110;
m_iColumnWidthArray[3]=100;
InsertColumn(0,"Name",LVCFMT_LEFT,m_iColumnWidthArray[0]);
InsertColumn(1,"Address",LVCFMT_LEFT,m_iColumnWidthArray[1]);
// nice flat list-
SetExtendedStyle(LVS_EX_GRIDLINES | LVS_EX_FLATSB |
LVS_EX_FULLROWSELECT );
//
// Setting the header INFO
//
// Loading header images..
m_HeaderImages.DeleteImageList();
m_HeaderImages.Create(IDB_HEADER, 9*2, 1, RGB(255,255,255));
CHeaderCtrl* pHeader=GetHeaderCtrl();
if(pHeader)
{
pHeader->SetImageList(&m_HeaderImages);
for (int i=0; i < pHeader->GetItemCount(); i++)
{
SetHeaderIcon(i,-1);
}
SetBkColor(RGB(255,255,255));
SetTextBkColor(RGB(255,255,255));
SetTextColor(RGB(0,0,0));
SetHeaderIcon(0,0);
m_iCurrentSortColumn=0;
}
ResizeColumns();
return TRUE;
}
示例5: SetBkColor
void CIOSFileList::Init(CIOSDirectoryTree *iosDirectoryTree)
{
SetBkColor(RGB(255,255,255));
SetExtendedStyle(GetExtendedStyle()|LVS_EX_FULLROWSELECT);
CRect rect;
GetClientRect(rect);
int width = (int)(rect.Width() * 0.15);
InsertColumn(0, _T("名称"), LVCFMT_LEFT, rect.Width() - width * 4);
InsertColumn(1, _T("类型"), LVCFMT_LEFT, width);
InsertColumn(2, _T("大小"), LVCFMT_RIGHT, width);
InsertColumn(3, _T("块大小"), LVCFMT_RIGHT, width);
InsertColumn(4, _T("链接数"), LVCFMT_LEFT, width);
m_imageList.Create(16,16,ILC_COLOR8 | ILC_MASK,2,2);
m_imageList.SetBkColor(RGB(255,255,255));
CBitmap bitmap[2];
bitmap[0].LoadBitmap(IDB_FOLDER);
m_imageList.Add(&bitmap[0], RGB(255,255,255));
bitmap[1].LoadBitmap(IDB_SYMBOL_LINK);
m_imageList.Add(&bitmap[1], RGB(255,255,255));
SetImageList(&m_imageList, LVSIL_SMALL);
m_indexList = iosDirectoryTree;
}
示例6: Win32Exception
/// <summary>Initialises control and populates</summary>
/// <param name="lpCreateStruct">The create structure.</param>
/// <returns></returns>
int SuggestionList::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
try
{
if (__super::OnCreate(lpCreateStruct) == -1)
throw Win32Exception(HERE, L"Unable to create base ListView");
// Display items using a single column. Custom Draw handles the column illusion
InsertColumn(0, L"text");
SetColumnWidth(0, lpCreateStruct->cx);
SetExtendedStyle(LVS_EX_FULLROWSELECT);
// Populate
PopulateContent();
// Ensure we have content
if (Content.size() == 0)
throw AlgorithmException(HERE, L"Unable to create list of zero suggestions");
// Display contents
SetItemCountEx(Content.size());
SetItemState(0, LVIS_SELECTED, LVIS_SELECTED);
// Shrink to fit
ShrinkToFit();
OnVisibleItemsChanged();
return 0;
}
catch (ExceptionBase& e)
{
Console.Log(HERE, e);
return -1;
}
}
示例7: SetExtendedStyle
void CGridListCtrl::PreSubclassWindow()
{
CListCtrl::PreSubclassWindow();
// Remove grid lines as this class adds them
SetExtendedStyle(GetExtendedStyle() & (~LVS_EX_GRIDLINES));
}
示例8: ModifyStyle
int CArgumentsTableCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CListCtrl::OnCreate(lpCreateStruct) == -1)
return -1;
ModifyStyle(0,LVS_REPORT | LVS_EDITLABELS | LVS_NOSORTHEADER | LVS_SINGLESEL);
ModifyStyleEx(0,WS_EX_STATICEDGE);
SetExtendedStyle(GetExtendedStyle()|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
CRect rcClient;
GetClientRect(&rcClient);
InsertColumn(0,"Type",LVCFMT_LEFT,rcClient.Width()/2);
InsertColumn(1,"Value",LVCFMT_LEFT,rcClient.Width()/2);
int nRow = 0;
if(m_pArgs!=NULL) {
int nCount = m_pArgs->GetCount();
POSITION nIdx = m_pArgs->GetHeadPosition();
while(nIdx!=NULL) {
CArgument* pArg = m_pArgs->GetNext(nIdx);
InsertItem(nRow,pArg->GetType());
SetItemText(nRow,1,pArg->GetName());
nRow++;
}
}
InsertItem(nRow,CString(""));
SetItemText(nRow,1,CString(""));
return 0;
}
示例9: SetExtendedStyle
void CGitProgressList::Init()
{
SetExtendedStyle (LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER);
DeleteAllItems();
int c = ((CHeaderCtrl*)(GetDlgItem(0)))->GetItemCount()-1;
while (c>=0)
DeleteColumn(c--);
CString temp;
temp.LoadString(IDS_PROGRS_ACTION);
InsertColumn(0, temp);
temp.LoadString(IDS_PROGRS_PATH);
InsertColumn(1, temp);
m_pThread = AfxBeginThread(ProgressThreadEntry, this, THREAD_PRIORITY_NORMAL,0,CREATE_SUSPENDED);
if (m_pThread==NULL)
{
ReportError(CString(MAKEINTRESOURCE(IDS_ERR_THREADSTARTFAILED)));
}
else
{
m_pThread->m_bAutoDelete = FALSE;
m_pThread->ResumeThread();
}
// Call this early so that the column headings aren't hidden before any
// text gets added.
ResizeColumns();
SetTimer(VISIBLETIMER, 300, NULL);
}
示例10: GetExtendedStyle
void CMyListCtrl::OnBeginDrag(LPNMHDR pnmhdr,LRESULT*)
{
CPoint ptItem,ptAction,ptImage;
NM_LISTVIEW *pnmListView = (NM_LISTVIEW *)pnmhdr;
m_oldDNDStyle = GetExtendedStyle();
if(m_oldDNDStyle != 0)SetExtendedStyle(0);
ASSERT(!m_bDragging);
m_bDragging = TRUE;
m_iItemDrag = pnmListView->iItem;
ptAction = pnmListView->ptAction;
GetItemPosition(m_iItemDrag,&ptItem);
GetOrigin(&m_ptOrigin);
ASSERT(m_pImageListDrag == NULL);
m_pImageListDrag = CreateDragImage(m_iItemDrag,&ptImage);
m_sizeDelta = ptAction - ptImage;
m_ptHotSpot = ptAction - ptItem + m_ptOrigin;
m_pImageListDrag->DragShowNolock(TRUE);
m_pImageListDrag->SetDragCursorImage(0,CPoint(0,0));
m_pImageListDrag->BeginDrag(0,CPoint(0,0));
ptAction -=m_sizeDelta;
m_pImageListDrag->DragEnter(this,ptAction);
m_pImageListDrag->DragMove(ptAction);
m_iItemDrop = -1;
SetCapture();
}
示例11: SetExtendedStyle
//控件绑定
void CSkinListCtrl::PreSubclassWindow()
{
__super::PreSubclassWindow();
m_SkinHeadCtrl.SubclassWindow(GetHeaderCtrl()->GetSafeHwnd());
SetExtendedStyle(LIST_STYTE);
return;
}
示例12: rc
BOOL CDownloads_Deleted::Create(CWnd *pParent)
{
CRect rc (0, 0, 0, 0);
if (FALSE == CListCtrlEx::Create (LVS_REPORT|LVS_OWNERDRAWFIXED|LVS_SHOWSELALWAYS,
rc, pParent, 0x5A9))
return FALSE;
SetExtendedStyle (LVS_EX_FULLROWSELECT|LVS_EX_HEADERDRAGDROP|LVS_EX_INFOTIP);
m_images.Create (16, 17, ILC_COLOR24 | ILC_MASK, 7, 1);
CBitmap bmp;
bmp.Attach (SBMP (IDB_DOWNLOADSTASKS));
m_images.Add (&bmp, RGB (255, 0, 255));
SetImageList (&m_images, LVSIL_SMALL);
m_selimages.Create (16, 17, ILC_COLOR24 | ILC_MASK, 7, 1);
CBitmap bmp2;
bmp2.Attach (SBMP (IDB_DOWNLOADSTASKS_SEL));
m_selimages.Add (&bmp2, RGB (255, 0, 255));
SetSelectedImages (&m_selimages);
InsertColumn (0, "", LVCFMT_LEFT, 200, 0);
InsertColumn (1, "", LVCFMT_LEFT, 50, 0);
InsertColumn (2, "", LVCFMT_LEFT, 100, 0);
InsertColumn (3, "", LVCFMT_LEFT, 58, 0);
InsertColumn (4, "", LVCFMT_LEFT, 200, 0);
ReadState ("DownloadsDeleted");
return TRUE;
}
示例13: SetExtendedStyle
void CHistoryCombo::SetStylesAndImageList()
{
SetExtendedStyle(CBES_EX_PATHWORDBREAKPROC|CBES_EX_CASESENSITIVE, CBES_EX_PATHWORDBREAKPROC|CBES_EX_CASESENSITIVE);
#ifdef HISTORYCOMBO_WITH_SYSIMAGELIST
SetImageList(&SYS_IMAGE_LIST());
#endif
}
示例14: rc
BOOL CWndLog::Create(CWnd *pParent)
{
CRect rc (0, 0, 50, 50);
if (FALSE == CListCtrl::Create (LVS_REPORT|LVS_NOSORTHEADER|LVS_SHOWSELALWAYS|LVS_OWNERDRAWFIXED, rc, pParent, 0x76329))
return FALSE;
SetExtendedStyle (LVS_EX_FULLROWSELECT|LVS_EX_HEADERDRAGDROP);
m_images.Create (16, 15, ILC_COLOR24 | ILC_MASK, 6, 1);
CBitmap bmp;
bmp.Attach (SBMP (IDB_LOGSTATES));
m_images.Add (&bmp, RGB (255, 0, 255));
SetImageList (&m_images, LVSIL_SMALL);
InsertColumn (0, "Time", LVCFMT_LEFT, 80, 0);
InsertColumn (1, "Date", LVCFMT_LEFT, 100, 0);
InsertColumn (2, "Information", LVCFMT_LEFT, 400, 0);
ShowWindow (SW_SHOW);
return TRUE;
}
示例15: DeleteAllButtons
BOOL CDropDownButton::Init(bool bSingleDropDownBtn, bool bWholeDropDown)
{
DeleteAllButtons();
m_bSingleDropDownBtn = bSingleDropDownBtn;
// If a toolbar control was created indirectly via a dialog resource one can not
// add any buttons without setting an image list before. (?)
// So, for this to work, we have to attach an image list to the toolbar control!
// The image list can be empty, and it does not need to be used at all, but it has
// to be attached.
CImageList* piml = GetImageList();
if (piml == NULL || piml->m_hImageList == NULL)
{
CImageList iml;
iml.Create(16, 16, ILC_COLOR, 0, 0);
SetImageList(&iml);
iml.Detach();
}
if (m_bSingleDropDownBtn)
{
TBBUTTON atb[1] = {0};
atb[0].iBitmap = -1;
atb[0].idCommand = GetWindowLong(m_hWnd, GWL_ID);
atb[0].fsState = TBSTATE_ENABLED;
atb[0].fsStyle = m_bSingleDropDownBtn ? (bWholeDropDown ? BTNS_WHOLEDROPDOWN : BTNS_DROPDOWN) : BTNS_BUTTON;
atb[0].iString = -1;
VERIFY( AddButtons(1, atb) );
ResizeToMaxWidth();
SetExtendedStyle(TBSTYLE_EX_DRAWDDARROWS);
}
return TRUE;
}