Search Results

Search found 16 results on 1 pages for 'clistctrl'.

Page 1/1 | 1 

  • C++/MFC: Handling multiple CListCtrl's headers HDN_ITEMCLICK events

    - by raph.amiard
    I'm coding an MFC application in which i have a dialog box with multiple CListCtrls in report view. I want one of them to be sortable. So i handled the HDM_ITEMCLICK event, and everything works just fine .. Except that if i click on the headers of another CListCtrl, it does sort the OTHER CListCtrl, which does look kind of dumb. This is apparently due to the fact that headers have an ID of 0, which make the entry in the message map look like this : ON_NOTIFY(HDN_ITEMCLICK, 0, &Ccreationprogramme::OnHdnItemclickList5) But since all the headers have an id of zero, apparently every header of my dialog sends the message. Is there an easy way around this problem ?

    Read the article

  • How do I prevent flickering on CListCtrl?

    - by Sorin Sbarnea
    I'm using a CListCtrl/CListView report view (LVS_REPORT) in virtual mode (LVS_OWNERDATA) with LVS_EX_DOUBLEBUFFER enabled and I encounter ugly flickering. Double buffer have a real effect but it doesn't stop all flickering (without it very slow). I'm not looking for switching to other controls that would require a high amount of rework (like ObjectListView) How does the flickering behaves: * on column resize - the background is first clean using lightgray and after this is displayed the text (background is white) * on mouse scroll (animated) - for a very short time there is lightgray-bar displayed in the area where new lines are to be displayed. It looks like it does clean the background using the default window background color (lightgray) for the area where it has to redraw. How do I solve the flickering problem?

    Read the article

  • Auto Resizing in a ClistCtrl

    - by Isuru
    Hi, Is there a way to resize the listcontrol automatically? Usually when the item gets too long the back end disappears from view and the user manually has to resize the width of the column. Is there anyway to do this by the code? Thank You!!

    Read the article

  • Coupling an MFC CListCtrl and CTreeCtrl to get a view of the whole tree, not just one node at a time

    - by omatai
    Consider Windows Explorer (or regedit or similar). To the left side, there is a tree view, and to the right, a list view. In all cases I know of, the contents of the right view reflect the attributes of the selected node from the left pane. This is all well and good... but just not what I want. The nodes of the tree I want to display have a very few attributes (2-3) associated with each node - a reasonable amount to display horizontally as a row in a table. Rather than waste all that list view space on a single node with very few properties, I would like to have my list view display a table of the whole tree's properties (as the part of the tree currently expanded). So the nth line in the left view (tree) will correspond directly to the nth line in the right view (list/table), and I will get a decent overview of the properties of my tree. Does anyone know of code that does this? I am guessing that slaving a CListCtrl to a CTreeCtrl would be the way to go, and somehow overriding the vertical scrolling functions so that they are locked together. I'm just not sure that it is possible to lock the scrolls together like this... among other things! All advice gratefully welcomed :-)

    Read the article

  • Is it possible to edit data in place using CListCtrl - if not, can anyone suggest an alternative con

    - by shan23
    I'm designing a MFC app in which I'd like to have a grid with 2 coloumns : both editable in which the user will input data and the app will get notified about it. The number of rows can be increased/decreased by the user as he wants - What would be the ideal MFC control to use for this kind of requirement ? This is my first time designing a MFC app , so dont mind if it sounds too noobish :)

    Read the article

  • Something preventing default (explorer-style) CListCtrl jump to line behaviour

    - by andywebsdale
    I'm maintaining an MFC/COM/ATL 45-odd project solution originally written with VS6. I'm now using VS2008. I'm looking at a list control(vanilla CListCtrl) which doesn't behave as we think it should. Normally in an MFC list control you can press a key, (Q say) & selection will jump down to the 1st line beginning with 'Q' (like windows explorer). Does anyone have an idea as to why this might not happen? The styles/Extended styles are set the same as another control in the same project, which DOES work OK. Do I have to send my own message, or is there a flag, etc. that controls that functionality or what? Normally Google would supply the answer, but I haven't been able to frame my query correctly to come up with the relevant info this time. Here's the line from the .rc file for the CListCtrl that doesn't jump to a line on keypress: CONTROL "List1",IDC_BAL_LIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,0,73,493,230 And here's a line from the same .rc file showing a list control that does do that: CONTROL "List1",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,1,38,501,219 As you can see, there's no obvious difference to the properties, so what program code would affect it?

    Read the article

  • capture delete key in CListCtrl and do soem processing

    - by user333422
    Hi, I have a class which inherits from CListCtrl class, say class list. I have another class dlg, which inherits from CDialog. Class dlg contains an instance of class list. I have got a delete button in class dlg, on which I delete the selected item in listCtrl and do lots of other processing. I want the same functionality on delete key. I added OnKeyDown() fn is my class list, where I can capture VK_DELETE key. But my problem is that, how do I do otehr processing that I need to do in dialog class. All that processing is dlg class based not list class based. I have many such dlg classes with different data and in every dlg class processing is different. I tried capturing VK_DELETE in dialog class, but it doesn't capture it if focus is on list class. I am totally stuck and have no idea, how to do this. Please give me some idea how i can do this. Thanks, SG

    Read the article

  • Problem with OnMeasureItem()

    - by Isuru
    Hi, I used OnMeasureItem() in my MFC ListControl to increase the height of the rows, and added WM_ON_MEASUREITEM() message in the Map. THe code I used is as follows: void CListCtrlTestDlg::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct) { if( nIDCtl == IDC_LIST1 )//IDC_LIST1 is my ListControl ID { lpMeasureItemStruct->itemHeight += 20; } } It doesn't Work. Any suggestion what the problem is??? Thank You!!!!

    Read the article

  • What is the best way to make a schedule in MFC

    - by Vanwaril
    I have a list of items that are each associated with a start and end time and date. What I want to do is, given a time and date range, display only the items that fall within that window, even partially. What I'm doing is creating a CListCtrl with all the items in it and the CListCtrl is sorted by start time by default. But given a time range, I don't know how to search for the first item that is within the range. Another problem with the list control is it displays as a list, whereas it would be nice if there was a control that could also show things that are concurrent side by side. I'm doing this within a dialog application.

    Read the article

  • MFC/WIN32: mouse hover highlight in listctrl

    - by Mordachai
    The ListView control of Windows Explorer gives a highlight to whatever item is under the mouse, without affecting the current selection. This helps enormously with relating what item a given tooltip applies to within a listview - especially in report mode. However, I am currently unable to find any APIs that would give my MFC application's CListCtrl that same behavior. Extended styles only have LVS_EX_TRACKSELECT, which actually alters the current selection (yuck!). Does anyone know how to provide a standard CListCtrl (or whatever that actually sits on top of) the mouse-hot-tracking capability? I found some articles on how to provide per cell and per row tooltip text, but its hard to tell what the tooltips relate to without something highlighting...

    Read the article

  • Scaling a CBitmap - what am I doing wrong?

    - by Smashery
    I've written the following code, which attempts to take a 32x32 bitmap (loaded through MFC's Resource system) and turn it into a 16x16 bitmap, so they can be used as the big and small CImageLists for a CListCtrl. However, when I open the CListCtrl, all the icons are black (in both small and large view). Before I started playing with resizing, everything worked perfectly in Large View. What am I doing wrong? // Create the CImageLists if (!m_imageListL.Create(32,32,ILC_COLOR24, 1, 1)) { throw std::exception("Failed to create CImageList"); } if (!m_imageListS.Create(16,16,ILC_COLOR24, 1, 1)) { throw std::exception("Failed to create CImageList"); } // Fill the CImageLists with items loaded from ResourceIDs int i = 0; for (std::vector<UINT>::iterator it = vec.begin(); it != vec.end(); it++, i++) { CBitmap* bmpBig = new CBitmap(); bmpBig->LoadBitmap(*it); CDC bigDC; bigDC.CreateCompatibleDC(m_itemList.GetDC()); bigDC.SelectObject(bmpBig); CBitmap* bmpSmall = new CBitmap(); bmpSmall->CreateBitmap(16, 16, 1, 24, 0); CDC smallDC; smallDC.CreateCompatibleDC(&bigDC); smallDC.SelectObject(bmpSmall); smallDC.StretchBlt(0, 0, 32, 32, &bigDC, 0, 0, 16, 16, SRCCOPY); m_imageListL.Add(bmpBig, RGB(0,0,0)); m_imageListS.Add(bmpSmall, RGB(0,0,0)); } m_itemList.SetImageList(&m_imageListS, LVSIL_SMALL); m_itemList.SetImageList(&m_imageListL, LVSIL_NORMAL);

    Read the article

  • What color to use in owner-draw Windows List Control background?

    - by Mark Ransom
    I have an owner-drawn list control in my Windows program. I use CListCtrl::GetBkColor to get the background color, and for a selected item I use GetSysColor(COLOR_HIGHLIGHT). This matches what Windows uses for non owner drawn list controls, except for the case where the control doesn't have focus - then the background is replaced with gray. Does Windows use one of the GetSysColor constants for the selected but unfocused background? If so, which one?

    Read the article

1