How to add checkboxes selectively on listview control #2

It seems SetExtendedStyle (LVS_EX_CHECKBOXES  |LVS_EX_ONECLICKACTIVATE
 );

adds checkboxes to EVERY row, but I just want to have it every other
row. How to do this?

Thanks.

Jiac
0
poohc1234 (10)
3/1/2004 3:31:47 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
487 Views

Similar Articles

[PageSpeed] 41

You can remove the checkboxes on the row you don't want with the CListCtrl function
SetItemState(lRowNumer,0,LVIS_STATEIMAGEMASK);

lRowNumer is the rownumbe


0
anonymous (74722)
3/1/2004 4:26:12 PM
Hi,

This is what I did:
..SetItemState (0,0,LVIS_STATEIMAGEMASK);

I wanted to remove the first row for testing, but it still shows.
Please help. I put this after I insert the item. Does it matter where
and how many times I call SetExtendedStyle (LVS_EX_CHECKBOXES 
|LVS_EX_ONECLICKACTIVATE) ?

Thanks for your help.
0
poohc1234 (10)
3/2/2004 5:43:54 PM
Hi, yes you need to call SetExtendedStyle (LVS_EX_CHECKBOXES
|LVS_EX_ONECLICKACTIVATE) first thing

But I found a problem if you click on the position in the listbox where the Checkbox should be, the hidden apears anyway. The way I found around this is to use the SetItemState (0,0,LVIS_STATEIMAGEMASK)
inside the OnItemClick function

BEGIN_MESSAGE_MAP(CMyClassDlg, CDialog
	ON_NOTIFY(LVN_ITEMCHANGED, IDC_CTRL, OnItemclickNmeaSent
END_MESSAGE_MAP(

void CMyClassDlg::OnItemclickList(NMHDR *pNMHDR, LRESULT *pResult

	LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR)
	m_MyCtrl.SetItemState(0,0,LVIS_STATEIMAGEMASK);
	// TODO: Add your control notification handler code her
	*pResult = 0


0
anonymous (74722)
3/3/2004 9:11:07 AM
Reply:

Similar Artilces:

Script #2
I am using exchange server for a company based calendar, and POP3 email. Exchange keeps setting itself as the default account, and when my user try to send email, the emails will return to them saying unable to send mail. There is supposed to be script that you can disable to stop this from happening. Does any one know how to do this? On Wed, 5 Oct 2005 06:01:04 -0700, "Rkd2398" <Rkd2398@discussions.microsoft.com> wrote: >I am using exchange server for a company based calendar, and POP3 email. >Exchange keeps setting itself as the default account, and when my user ...

A CString question #2
Hi to all, Given the following: CString sTheString = "Hello world"; void UseTheString(CString s) { ... } Where UseTheString() is a function that takes a string as an argument. My questions are the following: 1. Is it rather better to use the below version of the function? If yes, why? void UseTheString(LPCTSTR s) { ... } 2. When can I substitute a CString with a LPCTSTR and vice versa? Thanks a lot, Geo Geo wrote: > Hi to all, > > Given the following: > > CString sTheString = "Hello world"; > void UseTheString(CString s) &...

Junk E-mail filter problems in Outlook 2003 #2
The Junk E-mail Options - Safe Senders tab states "E-mail from addresses or domain names on your Safe Senders List will never be treated as junk e-mail. In that list I have (for example) nytdirect@nytimes.com which is the from address for a daily DealBook summary to which I have subscribed. Yet, in an unpredictable pattern, email from this address lands in my Junk E-mail folder. Each time, I click on the "Not Junk" toolbar button and am then informed in a "Mark as Not Junk" dialog box that "This message will be moved back into the Inbox Folder." I then leave...

How to launch report from add-in?
Hi all, I am trying to launch a report from POS addin(RMS). but it is giving an error related to the storng name of the assembly. Can anyone please tell me how I can use the native crystal report engine that is there with POS. so that I need not embed my own crystal report dll. Any other suggestion would help. thanks Hi, The company that made some addins for me and use some printing from the addin, added the software: Crystal Reports for .NET Framework 2.0 (x86) After installing CRRedist2005_x86.msi into my system I can use their reports. Koit Lahesoo "KSS" <KSS@dis...

Sumproduct and the darn dates! #2
Great - it worked! Thank you. : -- Krelle ----------------------------------------------------------------------- Kreller's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1163 View this thread: http://www.excelforum.com/showthread.php?threadid=27044 glad it helped -- Don Guillett SalesAid Software donaldb@281.com "Kreller" <Kreller.1edlop@excelforum-nospam.com> wrote in message news:Kreller.1edlop@excelforum-nospam.com... > > Great - it worked! Thank you. :) > > > -- > Kreller > -----------------------------------------...

CRM 1.2 & 3 on the sae server
Is it possible to install a CRM 3 on the same server (and not to upgrade) where the 1.2 CRM is already installed? I dont believe you can do that, unless you are using server virtualization. "David Massard" wrote: > Is it possible to install a CRM 3 on the same server (and not to upgrade) > where the 1.2 CRM is already installed? Both versions use the same registry hive, so they can not run on the same machine. -- Matt Parks MVP - Microsoft CRM "chad.buser@ncsi.cc" <chadbuserncsicc@discussions.microsoft.com> wrote in message news:885DC6E8-3226-4D1F-9...

Data analysis by 2-dimensional data table + database
Hello, in an old Excel-manual (possibly way back to version 3) by Microsoft there was an excellent example of a 2-dimensional datatable (in German: Mehrfachoperation) with input variables based on database results. Now I would need to apply this technique, but my old manual is lost, and I can't figure out by heart exactly how this was done. Does somebody still have an old manual from which to draw the model, or can let me know the deatils of the trick? Thank you in advance. Kind regards, H.G. Lamy H., I think that you are talking about a cross-tab table....

Web Integration #2
Is anyone using a web integration solution with more than one site from the same database other than the Kosmos solution? Bill Hobby Central On Oct 26, 12:25=A0pm, Hobby Central <HobbyCent...@discussions.microsoft.com> wrote: > Is anyone using a web integration solution with more than one site from t= he > same database other than the Kosmos solution? > > Bill > Hobby Central We have 7 or 8 plus e-commerce sites using one database on the Nitrosell platform. Nitrosell ties in real time with your inventory, and as you add additional web stores you add additional columns...

Sorting problem #2
Dear all, I have a list of integers from A1 to A10. If I would like to store the absolute address of the third cell counted from the top in column A containing "1" in B1, what formula should I use? For example, if the data from A1 to A10 are 3, 1, 1, 2, 1, 2, 2, 2, 1, 3, I want B1 stores "$A$5" as A5 is the third cell containing "1". Thanks in advance. Best Regards, Chris Chris, One way Add a column B with the cell names i.e a1,a2,a3,a4,a5,etc Enter in C1 ...........=B3 do a sort on A column after selecting a1:b10 Use the undo button, enter ne...

Followup Flag Reminder #2
Hello, I have issues using 'Flag Reminder' feature. I have setup rules wizard to move messages to different folders. Now if I flag a message that has been moved to a different folder, I don't get any reminders, though I am getting reminders if the flagged message is in the Inbox itself. Has anyone faced this problem? How do I resolve this? Thanks, Ravi Reminders will only fire from the Inbox, Calendar, Contacts, and Tasks folders in the default mail store. You'd need a 3rd party add-in to make them work in other folders. See www.slovaktech.com for a couple of add-ins...

Add Ship-To Address to PO?
Hello, Great Plains 8.0 with Purchase Order Processing (just upgraded from 6.0/APOP). We would like the ability to print the shipping address stored on the order header, not the address stored by line item. There will NEVER be a time when we will have multiple ship-to addresses on the same PO. I'm certainly not about to manually add a ship-to address to each line of a 1500 line purchase order. Since the data is stored on the PO header, and we can type it in, I don't understand why it won't print out. The ship-to section is just blank, or prints the address for site ID ...

Only 2000 characters in CRM 1.2?
HI, I have using MS CRM 1.2 and we seem to be limited in the notes section for Phone calls and letters to 2000 characters which we find VERY limiting. Is there any way around this at all? CHeers, Paul Yeah...upgrade! EnigmaPaul@gmail.com schreef: > HI, > > I have using MS CRM 1.2 and we seem to be limited in the notes section > for Phone calls and letters to 2000 characters which we find VERY > limiting. > > Is there any way around this at all? > > CHeers, > > Paul ...

Listbox Control Array?
How can I make a control array or group or something where I can have two groups of ten list boxes on a form that have the same names but different index numbers for referencing? You build the collections yourself: '********************* Option Explicit Dim SomeLists As New Collection Dim OtherLists As New Collection Private Sub UserForm_Initialize() SomeLists.Add Me.ListBox1 SomeLists.Add Me.ListBox2 SomeLists.Add Me.ListBox3 OtherLists.Add Me.ListBox4 OtherLists.Add Me.ListBox5 OtherLists.Add Me.ListBox6 End Sub Private Sub CommandButton1_Click() Dim i As Long For i = 1 To 3 ...

Excel book #2
Witch is the best excel book? marquetta.kayes@booomail.com Depends upon where you start from, and what you want to achieve. Check out John Walkenbach's Excel 2003 Bible as a start. -- HTH RP (remove nothere from the email address if mailing direct) "marquetta kayes" <marquetta.kayes@livepharm.com> wrote in message news:1a5c7$42e4a746$d99c5301$8690@allthenewsgroups.com... > Witch is the best excel book? > > marquetta.kayes@booomail.com Considering you can get it delivered to your inbox, free, you might want to try MrExcel's new book. http://www...

Cash Sales Entry #2
How to do a cash sales entry? You mean a cash-basis accounting type of entry or a sales transaction where you are receiving cash (as opposed to check or credit card)? New User wrote: > How to do a cash sales entry? ...

Need to add Section Letters after page numbers in my footers
I need to add a section (i.e. SB) after the page number in my footer so it will show up in my TOC. How do I do that? There is no way to do exactly what you want in Word. The best you can do is insert the numbering from Word's heading styles (see http://word.mvps.org/faqs/numbering/chapternumber.htm) or from SEQ fields (see the "Adding chapter numbering" section of the article at http://sbarnhill.mvps.org/WordFAQs/TOCTips.htm). -- Stefan Blom Microsoft Word MVP "Barbados56" <Barbados56@discussions.microsoft.com> wrote in message news:657...

MS POS 2.0 install in Spanish
Hi Everyone, I want to install MS POS 2.0 in Spanish. Has anyone accomplished this? Thanks, Patricia Hi Patricia.... You have to contact Mr Louis Piedra in Scansource technologies. They are the latin american partners of Microsoft RMS. I understand that they have already the files needed to run RMS 2.0 in spanish. "Patricia" wrote: > Hi Everyone, > > I want to install MS POS 2.0 in Spanish. Has anyone accomplished this? > Thanks, > > Patricia ...

Cannot delete a public folder #2
Hello, I have a public folder under all public folders that I cannot delete. When I try to delete it in Outlook is says "Some items could not be deleted. They were either moved or already deleted, or access was denied." When I try to delete the folder from ESM it asks me if if I'm sure, I click yes and then get prompted for authentication. I have tried both the domain adminstrators account and the account I use to administer the domain and Exchange. It just keeps prompting me for a user name and password until finally it says access denied. I've gone through just abou...

customise timeline
Hi there, I need to set up a customised timeline with a "day 0" - it's to do a month end timetable for an accounting function. Day 0 would be the last day of the month and is the reference point day -3, -2, -1, 0, 1, 2, 3 4 etc Do you know how I can set this up? At the moment it goes from day 1 to day -1 and I need a day 0 in between. Thanks Thanks, Hi robbo, Are you trying to customize the Gantt chart timeline? If so, I'm sorry, the answer is no. I hope this helps. Let us know how you get along. Julie Project MVP Visit http://project.mv...

Unable to open excel file #2
Hi. I have problem openning an excel file from windows explorer or from my desktop. However, when I open the excel program and open a file manually(File-Open----) everything works fine. I get an error message that the file could not be located. I noticed that it adds .xls to every word separated by space. For example: My file is in C:/Shared/Folder/test.xls, it tries to open: C:/Shared.xls then Folder.xls then test.xls Please help. Thanks. --- Message posted from http://www.ExcelForum.com/ Hi! I think the steps below will solve this problem: 1. Exit Excel 2. From the Startmenu, cli...

Want to add lot numbers
We have changed our paperwork flow, so now I have the manufacturing lot codes available when I invoice my customer. Is there a way I can attach the lot code to the particular line of an invoice in GP 9.0? Thanks, Phil ------=_NextPart_0001_81876982 Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Phil, Thank you for your question today. Can you tell me where in Great Plains you see these codes? I'm not familiar with your terminology so if you tell me where you see them I'll be able to determine if they are something that can be put on the SOP invoice. Angela...

Add line to horizontal bar chart
I've made a bar chart with horizontal bars (the Y axis running from left to right as you look at the screen). I would like to convers my second series from a bar to a line, but whatyever I do Excel seems to create it on a secondary Y axis that is vertical. When I go into 'format data series' it won't let me plot it on the primary axis as the whole thing is greyed out. Can anybody help me? I'm working in Excel 97 by the way. Hi, Have a look at these examples. http://www.andypope.info/charts/averageline.htm Cheers Andy Hrafn wrote: > I've made a bar chart ...

How to add sender email automatically in Outlook 2002
Please tell me how to send setup for all my sender email address can automatically put into my address book, for example like outlook express you can do that pretty easy. Right click on the senders address, select add to contacts. This is the only way in Outook 2002 and later. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, Erick asked: | Please tell me how to send ...

How to delete/update controls and related codes?
Hello all, I am using VS 2005 to generate a MFC application. I am wondering after I generating an application using Unicode, how can I delete it without regenerating the application? Also, if I use recourse editor to add some controls and class wizard to add variables to connect these controls, how can I delete or update them completely? If I delete a button from the resource editor, I have to delete some related codes elsewhere. I also found that class wizard will change variables into grey (do not allow to change). What should I do? Thanks in advance. Zhidian Du You just have to...

Invest in our children #2
INVESTMENT OPPORTUNITY! Fork It Over! a Ground Floor Unique Dimension & Concept In the Children's Entertainment Market... For More information http://www.kidseyeview.us ...