drawitem : how to know in witch rows is the item ?

i want to draw my control list items with OnDrawItem :
but how to know in witch rows is the item ?

I don't really understand what mean id and sub id.

 Is ID for the line and subID for the row ?

 If yes, how can i know the subID when the LPDRAWITEMSTRUCT give me only an
ID ?

 thank's for help :)

7/2/2003 8:58:06 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 37

yoshi wrote:

>i want to draw my control list items with OnDrawItem :
>but how to know in witch rows is the item ?
>I don't really understand what mean id and sub id.
> Is ID for the line and subID for the row ?
> If yes, how can i know the subID when the LPDRAWITEMSTRUCT give me only an
>ID ?
> thank's for help :)

You're talking about the Windows listview control, which MFC wraps with
CListCtrl, right? As opposed to the Windows listbox, which MFC wraps with
CListBox. If so, you need to look into the NM_CUSTOMDRAW message and the

Doug Harrison
Microsoft MVP - Visual C++
dsh (2498)
7/2/2003 9:22:11 PM

Similar Artilces:

eConnect PM Schema distribution item
Whenever I use eConnect PM distribution on my invoices, I see that the two default distrbution account are always present ; namely Pay on the credit side Purchase on the debit side This is despite the fact I'm explicitly entering in the distribution item of the Schema my own debiting and crediting accounts. so the result is I can see my distributing account along with these two. Kindly advice on how I can ensure via eConnect that the Purchases Invoices distribution list I can only see the distribution accounts I specify in the eConnect XML ...

New items with purchase order integration
I'm running a daily integration to bring purchase orders into GP using Integration Manager. The source is a text file. It works very well. The problem I have is with new items. When there is an item in the source file that does not exist in Great Plains, I would like the integration to fail or skip the line item. Currently, it brings the item into the Purchase Order as a non inventory item. The document will show the item number and the cost but no item description. Where can I change the behavior for this? Unfortunately, with the users that put non-inventory items on POs Wh...

Purge deleted items from shared mailbox
How can I purge the folder "deleted items" from a shared mailbox? The RM menu item is greyed out. Environment: Outlook 2003/Exchange 2003. What permission do you have on the deleted folder? can you delete them if you open the folder and select all, Del? -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips by email: dailytips-subscribe-request@lists.outlooktips.net Outlook Tips: http://www.outlook-tips.net/ Outlook &...

knowing who gains/looses the focus
What I like to have is some kind of generic way to let a window (not necessarily a MDI child window, but more likely some sub-window) know that one of its (in)direct child controls has received (or lost) the focus. I know that there is the WM_PARENTNOTIFY message which notifies the parents (ancestors) when the user clicked on a child control. I would like the same thing for the gaining/loosing of the focus. So basically this is the situation: Window A subwindow A1 (wants to be notified of focus gain/loose of all subcontrols) subwindow A1_1 control A...

Verzonden berichten namens wil ik niet in mijn eigen 'Send Items'
Ik heb een persoonlijke en een groepsmailbox in mijn outlook(2000). Als ik nu een bericht verzend namens de groepsmailbox komt dit bericht in mijn persoonlijke "Send Items' terecht. Je raad het al, ik wil graag dat dit in de "Send Items" van de groepsmailbox komt. Heeft iemand enig idee hoe??? W2000 Outlook 2000 Exchange 5.5 Bedankt, Peter Hoi Peter, Er wordt hier voornamelijk Engels gesproken om een zo breed mogelijk publiek aan te spreken. Voor jou probleem is niet direct een oplossing. Je kan wel een Wizard Regel zetten die een kopie in een andere map plaatst bij...

Obsolete / inactive items available to sales / inventory processin
Hi all, Does anyone know of a way to disallow obsolete/inactive items from being available for selection on sales orders? Thanks, -- Jim Bourque Two steps: first, in Setup->Sales->Sales Order Processing->Options, uncheck the option to allow sale of discontinued items. Second, mark those items Discontinued in the Item Card. -- Richard L. Whaley Author / Consultant / MVP Documentation for Software Users For help learning and better using Dynamics GP,... check out our books at http://www.AccoladePublications.com "Jim B" wrote: > Hi all, > > Does anyo...

Delete Rows that do not contain
I want to create a macro that will run through 10,000 plus rows and quickly delete all rows if Col A does not contain the text of T75TA. Any help you can provide is greatly appreciated, thank you. This should do the trick Sub DeleteRows() Dim findstring As String lastrow = Range("A15000").End(xlUp).Row findstring = "T75TA" For A = lastrow To 1 Step -1 If InStr(CStr(Cells(A, 1)), findstring) < 1 Then Cells(A, 1).EntireRow.Delete Next A End Sub -- If this helps, please remember to click yes. "SITCFanTN" wrote: > I want...

Help with auto height of rows
Hello, I've got Excel 2002. Spreadsheet has over 3400 rows and 6 columns. No merged cells. All fonts are Arial size 10. The first 1809 rows are set to a height of '15.00 (20 pixels)' and the remaining rows are set to '12.75 (17 pixels)'. I've tried selecting all rows and then double clicking on a divider bar to get them all to adjust to auto height, but they stay at the heights listed. I want them all to be at the 12.75 (17 pixels) height when you do the auto height adjustment. Why won't this work on this spreadsheet? Thanks. Mark Nevermind - I fig...

Exchange 2007 Resource Mailboxes
Hi, I have setup Exchange 2007 Resource Mailboxes as I have a number of meeting rooms that all users should be able to book. I have since found that if user a) books a meeting and user b) attempts to delete it - he/she can. I don't seem to be able to prevent them, and would appreciate some help. Regards Nick ...

Highlightin a row
Is there any way to automatically highlight a row with color in a large spreadsheet when you are entering data to know which row and cell you are in. *I need this hightlighting to move with the tab and enter key when I move to a different row/cell. Thanks -- Kim Hi try: http://www.cpearson.com/excel/RowLiner.htm Note: This kind of event procedure will disbable the UNDO functionality -- Regards Frank Kabel Frankfurt, Germany "Kim" <Kim@discussions.microsoft.com> schrieb im Newsbeitrag news:6DDFCD53-4341-4097-BCA1-F9E7831AF848@microsoft.com... > Is there any way to au...

Getting row indexes on Range
(I refer to C# code, but answers in VB are welcome) I have a Range in Excel, which includes several cells (the cells the user selected in the Excel sheet). The range might include the following cells A2, B7, G4. This means that the cells might not be connected. If I look at myRange.Cells.Count, it will return 3. If I look at myRange.Row, it will return 2 (if A2 was the first selected row by the user). Now, I need to get the row numbers of all selected rows, so in the above range, I need an int[] of {2, 7, 4}. But I can't see any solution to go through the Cells and get t...

Increasing # of rows in excel sheet
Hi all.. I usually import data from other programs such as SAP into excel and face the problem of excel running out of Rows.. is there a way that I can increase the total number of rows in my worksheet or any other solution possible to my problem. Thanks Rehan Hi no. 65536 rows is the maximum "Rehan" wrote: > Hi all.. > > I usually import data from other programs such as SAP > into excel and face the problem of excel running out of > Rows.. is there a way that I can increase the total > number of rows in my worksheet or any other solution > possibl...

I need the items to have grades
In any business, there are items of different quality, different origin, different level of concentration etc. For example, Tea powder of 3 qualities: High, Medium, low or Tea made in different countries: India, Malasia, China. In the above cases, the item code has to be same because it is basically the same item, but there should be a way to identify them separately. The best way I have seen, to manage this requirement is to have a 'Grade' Column with the Item code. There should be a Grade Master in the Cards Menu of Inventory Module, where the user can create the Grade Type...

Messages not saved in Sent Items Folder
Outlook 2003. Some messages are not being saved to the Sent Items Folder even though it is checked in the options. Does not matter whether is a reply, forward or a new email. It is seemingly random with most messages being saved correctly to the Sent Items Folder. Any Ideas? Thanks, Hugo I have a similar problem, along the lines of the below: When i type email and attempt to send when not connected (due to temporary connectivity issues and when unable to connect), the mail is saved in Outbox. When next connected, the mail is sent *but* the mail is not saved in sent items folder. Sending wh...

Home Page Content Item: Important Dates (repost)
I asked this question 3 days ago and have received no replies so I'm repeating it. Perhaps the subject name I used: "Important Dates" was too short or sounded like spam. In any case my experience on this board is that even if no one has a solution, someone usually responds saying that he can't reproduce the problem, or that it doesn't work for him either, or that the poster misunderstands what this function is supposed to do. Not having received any response at all, I beg your indulgence with this repost: ***** Money 2006. No Passport. XP Home SP2. P4 3.0 GHz. 1G...

Adding a calculated ROW to a pivot table
Does anybody know how to add a calculated ROW to a pivot table? I have a pivot table that is returning totals at the bottom, as it should, but I *also* need it to return that total as a percentage of grand total, directly beneath the total. I've always done this free-form in the cells below a pivot table before, but the size of this pivot is dynamic so that's not an option. Also--I'm using the pivot in Access, not Excel directly. Anybody have any tips? Thanks! ...

Form creates unwanted rows in table
I've created an asset database which keeps track of computers, laptops etc. There is one company which has many departments and every department has many rooms. (surprise, surprise) There are four tables: tables Department and Asset and two "middle" tables DepartmentRoom and AssetRoom. The table structures are as follows: DEPARTMENT id name dep_type dep_num etc... ASSET id name a_type ip_num vendorID serial_num etc... DEPARTMENTROOM id name depID (foreign key to department) ASSETROOM id assetID (foreign key to asset) roomID (foreign key to depa...

Row height different after transfer to another PC
I have created one standard format in excel file for colleagues to use it. My problem now one of my colleague PC the row height is different cause my standard format useless. Pls help why this thing happen.TQ ...

Inserted rows, now need Counta function
Hi I've got a data dump. I've figured out how to insert a blank row after a change in name in column A and insert "Total" - so... bill.... bill.... bill Total - bob.... bob.... bob.... bob Total - What I need in column C next to total is to insert the COUNTA function for each person. Any ideas? cheers You say your code inserts a blank row after a change in name and inserts "Total", but your example doesn't show this. Can you post the code you are using to do your "insert"? It will probably be easier to handle the ...

Can you keep flagged items from being autoarchived?
I would like to be able to let my autoarchive run but for it not to take flagged items to the archive. I keep having to pull them back into the current mail file. Is there something I can set to accomplish this? Hit Alt-Enter while you've got one of these items highlighted then set the option to not AutoArchive the item "dstuart101" <dstuart101@discussions.microsoft.com> wrote in message news:272808E3-27B8-4E34-9A85-4070E91C5FEB@microsoft.com... >I would like to be able to let my autoarchive run but for it not to take > flagged items to the archive. I keep ha...

Getting rid of blank rows withouth deleting them
Hi, i have a list that looks like this 22 43 22 41 ... I need the list to be together 22 43 22 41 ... However i can't use a macro or something to delete the entire ro because other worksheets are related to the cells, so when i delte th row, the #ref thing apears, somebody know a formula or something tha can help me? Thanks a lo -- sams ----------------------------------------------------------------------- samsg's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1624 View this thread: http://www.excelforum.com/showthread.php?threadid=27725 You could fi...

Suppliers with Top Items List
Can anyone let me know how to show suppliers on Top Item List? I badly need this. I tried my way but not successful. -- Many Thanks Install the RMS Toolkit trial download you requested and check off Custom Reports/Templates during installation. Now run Manager, Reports, Custom, Top Items Report. This report includes Suppliers, Dept, Category, and Sub-Descriptions as columns and filter options. There are over 100 free reports and templates included with our RMS Toolkit trial. Visit: www.digitalretailer.com/trial Greg Digital Retail Solutions www.digitalretailer.com/RMSaddins (v1.x and ...

Menu in Word behaving oddly; items (like the entire contents of the Tools menu) disappearing...
Hey, I'd be oh-so-grateful if anyone has any idea how I could address this problem. I'm quite mystified. I'm running MS Word for X on my Mac (OS 10.4.3), and lately some odd things have begun happening. At first I was just working around them, but I've decided live my computer life too much that way (ignoring problems and hoping they go away), so thought I should look into this before it gets out of control. Items have been disappearing from the Word menu bar. That is, for instance, after I had used the "Symbols" option under the "Insert" menu one day, it di...

Can't open this item. The end date you entered occurs before the start date.
Hi, Everytime I open Outlook 2000 I get a calender pop-up. When I Dismiss it I get a message such as the above and the next time I open Outlook it appears again. I can't see it in the Calender unless I change the view to "By category". I can't delete it or change the date in this view. I just keep getting the above message (see subject line). I tried /cleanreminders and the MS article about Daylight savings but neither work. How do I get rid of this message? I do have a Pocket PC and probably the error occured during a Sync (i have different time zones). ...

Tab sequence on Item Maintenance screen
When creating new items on the Item Maintenance screen and tabbing through the fields. The 3rd tab takes you to the Generic Description field, which users may then enter. The next tab takes you to the Class ID field, if you select a Class ID for the item and update the item with information from the class the Generic Description you entered is over-written. While I agree with this functionality, the suggestion is that the tab sequence on the screen should be changed so that when tabbing through the fields you are prompted to select the Class ID first so the Generic Description (and a...