CListCtrl and NM_CUSTOMDRAW mean no CreateDragImage?

I'm customizing my own list control and handling the drawing in custom
draw.  But when I use custom draw, I suddenly don't get a drag image
anymore -- created by CreateDragImage.  If I bypass the entire custom
draw code (by returning a CDRF_DODEFAULT immediately) then it comes
back.

How can I handle the CreateDragImage and my custom draw code?

(coding with VC++ .Net on an XP machine)

david
0
david9344 (1)
10/27/2003 8:24:44 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
759 Views

Similar Articles

[PageSpeed] 45

Reply:

Similar Artilces:

CListCtrl Header height change??
CListCtrl Header height change?? Is it possible to change the height of a CListCtrl Header.? Thanks Markus ...

What does "No transport provider was available" mean? OL2000
I get this in a "System Administrator" return message whenever I send mail with an Outlook 2000 profile on my laptop, which has been set up for POP3 mail access via the Internet. I have checked that it uses the LAN for connection and I have also checked that it is possible to ping the server that is entered into the profile settings. The strange thing is that if I use my stationary PC also with Outlook 2000 connected to the same network with a profile for the same server/user with POP3 access it *does* work OK. So what is the reason for the laptop to display this message???? What s...

Problems with CListCtrl
I'm having trouble with a CListCtrl object. I'm trying to automatically set the selected items of the list from my code. I try the following statement: m_List.SetItem (pos, 0, LVIF_STATE, NULL, 0, LVIS_SELECTED, LVIS_SELECTED, 0); The SetItem function returns non-zero, which supposedly means it was successful. However, I don't see any selection showing up. I even called RedrawItem on this list item, but it didn't help either. Anyone know about this? -Eric >I'm having trouble with a CListCtrl object. I'm trying to automatically >set the selected ite...

CTreeCtrl and CListCtrl problem
I use create a single document struct using MFC(explore style).The left of the window is CLeftView class(which inherit CTreeView).The right is CBrowserView which inherit CListView.I want to display the content of a directory in the right(CListview) when user click the item of the ctreectrl. In the LeftViw I add method "void CLeftView::OnClickItem (NMHDR* pNMHDR, LRESULT* pResult)" because I want to know which item be clicked by user. ////////////////Leftview////////////////////// CTreeCtrl& mtree=GetTreeCtrl(); HTREEITEM item=mtree.GetSelectedItem(); data=mtree.GetItemDat...

What does this query error message mean: Cannot open database ".
I get a weird error message when I try to run a make table query, but yet the same query will work as a select query. I know the file isn't currupt, as I've used different versions of the database. The full error message reads: Cannot open database ". It may not be a database that your application recognizes, or the file may be corrupt. Please post the SQL statement for the query. Maybe we can figure out something from it. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "peter" wrote: &...

Lost Outlook email
----------------------------------------------------------------------- A poll associated with this post was created, to vote and see th results, please visit http://www.outlookforum.com/forums/showthread.php?threadid=5370 ----------------------------------------------------------------------- Question: Am I hosed - YE - PROBABL - MAYB - N ----------------------------------------------------------------------- I downloaded my email from the server, got a message that some of th rest of my mail couldn't be retrieved, closed outlook, re-opened it and the messages I had already retrieved ...

CListCtrl and sub item editting
Hi, Is it possible to implement CListCtrl sub item editting without creating a custom ctrl? I am using VS2003. TIA Tony >Is it possible to implement CListCtrl sub item editting without creating a >custom ctrl? Tony , There's no built-in support for this, so no, you have to provide some implementation for this. Have a look on sites such as CodeGuru and CodeProject, they'll have examples. Dave Thanks Dave, I've seen examples, I just wasnt sure if I needed my own ctrl. Regards Tony "David Lowndes" <DavidL@example.invalid> wrote in message news:k...

How to add clistctrl into clistctrl?
How to clistctrl into a clistctrl? For example like adding checkbox , combobox, i want to add clistctrl into a clistctrl ...

CListCtrl::InsertItem strange behaviour?
Hi everyone, I have a dialog with a couple of ListCtrl on it. I'm filling them up with information when the dialog initializes. Therefore i have two loops, one for each ListCtrl, on both loops I use the same function to insert the items: myListCtrl1.InsertItem(0, anyString); --- myListCtrl2.InsertItem(0, anyString); The weird thing is : the first loop InsertItem is always inserting the Item on the first position (InsertItem returns a 0 always); displacing the previous inserted item. BUT, the second loop InsertItem is always inserting the item on the last position (InsertItem retu...

Tooltip in CListCtrl
Hi all I have been trying now for a couple of days to figure out a way to display a tooltip over individual items in a CListCtrl. My control is in Report style, and has two columns where the first contains keys, and the second values. Problem is the keys do not have a lot of room, and I would like a tooltip to give a better description of what the key actually refers to. I found an article on Codeguru describing how this could be done, but I did not work for me - my override of CWnd::OnToolHitTest was never called by the framework as the article stated it would... For all I know this article...

icons on 2nd column of a clistctrl
hi, Is it possible to have icons or bitmaps on all of the columns of a clistctrl, not only the 1st column ? thanks, "behzad" <behzadnn@yahoo.com> wrote in message news:#LE9$vvYDHA.2284@TK2MSFTNGP12.phx.gbl... > hi, > Is it possible to have icons or bitmaps on all of the columns of a > clistctrl, not only the 1st column ? Never tried it personally, but according to the LVM_SETITEM documentation... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/listview/messages/lvm_setitem.asp "In version 4.70 and later, you can se...

CListCtrl questions
Hi, I am developping on Pocket pc and smartphone and I have a few questions about CListCtrl in report mode. First how can I know how many items I can display without having a vertical scrollbar? On smartphone we are using keypad to move, so first time when I press down key, the curent selection doesn't move.It's only the second time I press the key that is starts to move. First I thought it was a focus problem but even with the focus, it still the same. I also tried to select the first line first with a setitemstate but same result.any idea ? Last question is once a clistctrl h...

SetItemHeight in CListCtrl
Is there a way for me to set the height of all the items in a CListCtrl? I am trying to overlay one of the columns in an item with a CComboxBox and the minimum height in the comboBox appears to be greater than the height of the item in the CListCtrl. Brian Westcott wrote: > Is there a way for me to set the height of all the items in a CListCtrl? I > am trying to overlay one of the columns in an item with a CComboxBox and the > minimum height in the comboBox appears to be greater than the height of the > item in the CListCtrl. > > You have to create OWNERDRAW CLi...

CListCtrl
I have used LVS_EX_CHECKBOXES extended style for my CListCtrl. Do Parent Window/Dialog receive any notification message when user set/reset the checkbox. I tried to use NM_CLICK , but checkbox value is changed after this notification is processed. ...

Displaying JPEG images in CListCtrl
Hi All, I am writing an application in which I want to display a set of JPEG images into a CListCtrl. Is there a way of doing this by using just MFC? Awaiting for your reply Thanks & Regards Sachin Bhave > I am writing an application in which I want to display a set of JPEG > images into a CListCtrl. Is there a way of doing this by using just MFC? Try codeguru/codeproject for something like this. Here is one that should get you started: http://www.codeproject.com/listctrl/thumbnailview.asp --- Ajay ...

What doe these Microsoft Equation Symbols mean?
Please view the attached jpg screen capture of these symbols from the equation editor in Word 2010. I am not sure what these symbols mean. Does anyone know? http://lh5.ggpht.com/_4Fz7Um3aXFY/S6gUwOKsx0I/AAAAAAAAAQs/N3ETjyan4Wo/Capture.JPG Also, is there a more appropriate place for this question? Thank you I don't know about the one on the left, but the one on the right looks like a square bracket [ followed by an opening parenthesis ( that is [( -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consult...

Unable to use CListCtrl.FindItem after CListCtrl.SortItems
I have a CListCtrl which I want to sort, but after I sort I can no longer use FindItem because it always returns a failure. Any assistance with this is greatly appreciated. Thanks! >I have a CListCtrl which I want to sort, but after I sort I can no longer >use FindItem because it always returns a failure. Any assistance with this >is greatly appreciated. Show a concise code example of what you're doing then someone may be able to point out what's wrong. Dave -- MVP VC++ FAQ: http://www.mvps.org/vcfaq LVFINDINFO findinfo; findinfo.flags=LVFI_STRING; findinfo.ps...

CListCtrl Item Selection Questions
Hi I want to ask several things about CListCtrl here: 1. How to disable multiple item selection? 2. How to disable the column header click? Since I don't have any sorting facility in my application. Thank you very much. Select the ListCtrl object in resource editor and set the following properties Single Selection True No Sort Header True Cheers Check Abdoul --------------------- "Landon" <Landon@discussions.microsoft.com> wrote in message news:589C8584-BE50-4BA0-AA56-58297A072FC3@microsoft.com... > Hi I want to ask severa...

CListCtrl ?
I was wondering if there is an equivalent statement for the CListCtrl to select a particular? Something like SetCurSel(item number) in a CListBox? What I want is to highlight the insert item and have the list scroll down so that the current item that was inserted is always visible. As it is now the top of the list is always visible. Z.K. You can use SetItemState() and EnsureVisible() to do what you're trying to do. Something like: m_MyList.InsertItem(nItem,_T("New Text For This Item"); m_MyList.SetItemState(nItem, LVIS_SELECTED, LVIS_SELECTED); m_MyL...

Problem with CListCtrl::HitTest
Hi all... I'm programming a Custom Drawn List Control. The problem is when I add a handler for ON_WM_LBUTTONDOWN. This is the code I have in it: void CMyGrid::OnLButtonDown(UINT nFlags, CPoint point) { LVHITTESTINFO ht; ZeroMemory(&ht, sizeof(LVHITTESTINFO)); ht.pt = point; HitTest(&ht); CListCtrl::OnLButtonDown(nFlags, point); } After the call to HitTest, these values are contained in the structure: pt = {x=177 y=179} flags = 1 iItem = -1 iSubitem = 0 regardless I click on an item or not. To know the item and subitem where the click occures, I can use a loop, I think, ...

Creating a CListCtrl
I'm creating a CListCtrl manually to be added to a tabbed window. I have the line: m_listCtrlArtifacts->Create(WS_CHILD|WS_VISIBLE|WS_BORDER|LVS_REPORT, CRect(20,20,200,200), &m_outBar, IDGT_PROJ_LIST_ARTIFACTSLIST); MSDN help page - http://msdn2.microsoft.com/en-us/library/zdff988k.aspx - seems like I have all parameters valid, but the problem is that at runtime this gives me an unhandled exception. Any suggestions? > I'm creating a CListCtrl manually to be added to a tabbed window. I have the > line: > > m_listCtrlArtifacts->Create(WS_CHILD|WS_VISIBLE|...

CListCtrl?
Can anyone tell me how to save the items in a CListCtrl to a file and then to load it when the dialog is opened? Thanks in advance I think this already got answered, but this is a new thread so: I would use CStdioFile and simply write the file out as comma separated values like: "Name","Address","Company" or, alternatively, you could store the items in an object list and serialize it to disk if you don't need the file to be readable by outside programs or people. Then, when you want to reload the list control you read and parse the file and write th...

Hello Experts ! Problem in inserting items in one CListCtrl based on another CLisTCtrl
Hello Experts and ALiR, I have 2 ClistCtrls and both are sublassed CMyListCtrlOne and CMyListCtrlTwo. In the CFromView ,I am initilaizing the column ,width and also add items for CMyListCtrlOne and for the CMyListCtrlTwo I am I am initilaizing the column ,width only. and When I click any item related to CMyListCtrlOne ,in the OnClcik handler I get the row and data. Now I want to add this data in the second list CMyListCtrlTwo Here is the code.....Tell me where I am going wrong. After running this app I get a debug assertion file name:afxcmn.inl line no:142 Thanks in advance Tom In C...

Right clicking on a CListCtrl item
I have a TreeCtl object in a dialog box. I created an OnNMRclick.. override function to capture a right clicks. The problem I can't figure out is how to find the tree item that the user has right clicked on. Here's what I tried: void CRestoreFiles::OnNMRclickXYZ(NMHDR *pNMHDR, LRESULT *pResult) POINT CurPos; TVHITTESTINFO lpht; HTREEITEM RightClickItem; GetCursorPos(&CurPos); lpht.pt = CurPos; RightClickItem = TreeView_HitTest(pNMHDR->hwndFrom,&lpht); ... I figured that GetCursorPos would give me the position of the cursor where I had right clicke...

What does this mean?
In the formula below, what does the asterisk '*' mean? =COUNT(IF((A2:A500="5/27/2005")*(E2:E500="5098"),E2:E500)) Many thanks It serves as an "AND" condition. In the formula, (A2:A500="5/27/2005") and (E2:E500="5098") return arrays of TRUE or FALSE values, each indicating the result of the comparison. So, for example, you'll get two arrays like {TRUE, TRUE, FALSE, .....} and {FALSE, TRUE, TRUE, ....} The multiplication operator * multiplies these two arrays together; each element in the first array is multiplied by the ...