How to know if a CListCtrl item is selected or not?

I use Visual C++ 4.2 Professional. I use the CListCtrl to display all data. 

I don't create the CListCtrl dynamically but from design form where I drag 
it onto the form.

When user click a button, it will get the selected items and get the item 
data pointer. 

So I must check if the item has been selected or not. 

How to find out if the item has been selected or not when I click the button?

Thank you very much.
0
landon (165)
5/13/2008 1:34:00 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
477 Views

Similar Articles

[PageSpeed] 21

>So I must check if the item has been selected or not. 
>How to find out if the item has been selected or not when I click the button?

Use GetNextItem to find items that have LVNI_SELECTED.

Dave
0
davidl7375 (2060)
5/13/2008 8:40:00 AM
Reply:

Similar Artilces:

Publisher poster page selection
I just made a poster that requires (12 sheets) 11"/8.5" paper. I messed up and I had to reprint a certain part of it. Luckily it was on the last row of tiles and I could print from the last page starting off. After reprinting I had to cancel the print to make it stop printing because I am just completely draining my ink and it's not worth reprint the whole thing. I cut it off a tile early and so I had to go and repint again cutting it off after the 8th tile. On my second reprint my printer stopped using the cyan pigmant and was just magenta and yellows for the 8th and 9th ...

Budget Items Monthly Only?
I had a previous version of Money in which I could I could set up budget Items as weekly , bi-weekly, quarterly -whatever. How do I do this with plus deluxe? Thanks RobVG "RobVG" <twistwrister@yahoo.com> wrote in message = news:ca7f1dbd-a953-4846-8280-5e11dc163263@q24g2000prf.googlegroups.com...= >I had a previous version of Money in which I could I could set up > budget Items as weekly , bi-weekly, quarterly -whatever. >=20 > How do I do this with plus deluxe? You can do that but Money converts it to a pro-rata monthly amount in = most views. However, in the ...

short-cut menu for items in Folder pane of
How do I change the presentation order of items in the Start menu? Somehow, Explorer is at the bottom of the list on one of my computers, and I want it in the same place on all my computers. Rightclick the Start button and select Explore and rearrange to suit your method of working. You may also have to do Explore All Users as well. ....Alan -- Alan Edwards, MS MVP Windows - Internet Explorer http://dts-l.com/index.htm On Wed, 26 May 2010 21:49:02 -0700, in microsoft.public.windowsxp.basics, "Margaret Bartley" <may04_NOTTHIS@mindspring.com> wrote: ...

How to make Outlook 2003 select the oldest message in its inbox folder?
Hello! Is there a way to let Outlook 2003 select the oldest e-mail in the inbox folder? It seems like my Outlook likes to pick the newest one in the list/index. Thank you in advance. -- Phillip Pi Senior Software Quality Assurance Analyst ISP/Symantec Online Services and Norton SystemWorks (PC) Symantec Corporation www.symantec.com ----------------------------------------------------- Email: phillip_pi@symantec.comSYMC (remove SYMC to reply by e-mail) ----------------------------------------------------- Please do NOT e-mail me for technical support. DISCLAIMER: The views expressed in th...

How to set up pivot to show name of series item in bar chart
I have data on 30 issues. Each issue has multiple characteristics, e.g., magnitude, frequency, cost-to-fix, root cause, etc. I want the issues stacked in a bar chart to depict: 1) Issues by magnitude -with an ID for each issue ( I can get the hover to show the ID/name and other data. I want only the ID/name and want it fixed in the chart, not on hover only. I tried TM's hover macro, and though I had trouble installing it, it doesn't seeem to give me what I want. ) 2) Issues by magnitue by frequency - same story, I want to see the issue no. in the printed bar chart. Any advice wou...

Moving selective data from one sheet to anouther
Hi, I would like to move a range of data within a row from one sheet to anouther sheet automatically when the data in a cell within the range that would be moved, is greater than zero. Is there a formula that will do this? One non-array formulas play which "yields" the desired output .. Assume source table is in Sheet1, cols A to D, data from row2 down, where the key col is col D (the " greater than zero " criteria) Use an empty col to the right, say col E Put in E2: =IF(D2="","",IF(D2>0,ROW(),"")) Copy E2 down to say, E100 to cover the ...

HELP! I KNOW U KNOW HOW TO DO THIS....
i was told there is a way to make certain letters equal numbers. EX. BREADNMILK is 1234567890 / B=1 R=2 and so on. This is so each product has a digit code for the price. EX. EDB = $3.51. I don't know how to do that but my boss said it's possible....THANK-YOU! I have an idea, but I'm not sure I understand what you really want, so I hate to waste the time to produce it. Could you give a few more examples? What are you doing with the data once you figure out a way to make this work? Why BREADNMILK? Is that just an example? You'll use just one word? You're trying to obscu...

XPATH 1.0 select a certain set of attributes and concat them.
I have a the following xml node. <doc tag1="a" tag2="b" tag3="c" docTag1="d" docTag2="e"/> I would like to output "abc" I have the following XPATH2.0 so far //doc/@*[name()[starts-with(.,'tag')]] which returns a node list. Note that docTag* are ignored and there could be any number of tag*. I managed to get a solution from microsoft.public.xml for concatinating these using string-join function string-join(//doc/@*[starts-with(local-name(), 'tag')], '') however, can something similar be done in XPATH ...

It's Conditional Formatting, Jim, but not as we know it...
Hi, Is there any way of producing the same as a conditional format on a cell (ie. chenge fill and font colours according to a calculated value) but for more than three (four, if you count the default) values? TIA Dave An example '----------------------------------------------------------------- Private Sub Worksheet_Change(ByVal Target As Range) '----------------------------------------------------------------- Const WS_RANGE As String = "H1:H10" '<=== change to suit On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Targe...

Junk E-mail no longer moves to Deleted Items
I installed a small spam filter program that gave me a new toolbar. However, it did not appear to work, and after installing, the mail marked as 'Junk' or 'Adult Content' is no longer moved directly to the Deleted Items folder. Any ideas on how to correct this? Thanks Andy ...

Limit the data selection based on two fields?
Hello, I have a data entry form where user input the data. Within the data fields, I have field call Item, Side, sequence field where any combination of these 3 fields are unique. What I would like to achieve on the sequence field is limit the selected based on selection of Item and Side. This is to prevent user from inputting wrong values on that field. Any help is appreciated. Example fields: Item Side Sequence 11A1300-1 1st side 50 11A1300-1 1st side 100 11A1300-1 1st side 200 11A1300-1 1st side 400 11A1300-1 1st side ...

OWA jumping mouse
I have two computers on my network that are having an interesting issue. When they are creating a message and typing away in the body of the message, randomly when they hit a key, any key, they system will act as if the mouse was clicked. If the mouse is over the send button, it would have sent the email. If the mouse was over the start button, the start menu would have come up. Where ever the mouse was left at, it will act as if it was clicked. It is very random but often. This only happens in OWA, not in outlook or any other place. Both systems are running XP pro SP2 with IE 6 SP2. ...

Need to eliminate deleted items from a drop down list
I have a drop down list in one form based on a query from a table. In another form I give the user the ability to delete records from this table, followed by a requery of the drop down list in code. When the user returns to the first form and drops the list down the deleted row still appears as "#deleted". Is there a way to prevent the deleted records from appearing in the list? Bill You should requery the combo box after deleting the records. -- Duane Hookom Microsoft Access MVP If I have helped you, please help me by donating to UCP http://www.access.hookom.net/UCP...

mails deleted automatically from Deleted items folder after reading
I am using Microsoft Outlook 2000. When I delete a message it goes to deleted items folder. When I read and close a message from Deleted items folder it gets deleted automatically immediately after closing it. I could not keep that messages in Deleted items folder. Can any one help ? Thanks, -Anand.S. Check your view settings on that folder to make sure you aren't filtering anything.... Anand wrote: > I am using Microsoft Outlook 2000. When I delete a message > it goes to deleted items folder. When I read and close a > message from Deleted items folder it gets deleted >...

Not able to select range of cells with mouse.
I am working with Excel 2007 and when I try to select a range of cells, nothing happens. The lovely blue shading is not visible. I first notice this when I tried to select non-adjacent ranges. When I pressed CTRL, then clicked a cell with my mouse, a box appeared inside the cell and that was it. Has anyone seen this before and how do I correct this? Thanks, jen jen If you continue to press CTRL and select other cells, you will see that it's only the last cell selected that doesn't shade (although perhaps not blue). George Gee "jen" <jen@discussions.microsoft...

Text Missing From Ribbon Items
Four some reason today when I'm in a form's design view and multi-select items, the Position tab is missing the text that were associated with it's items. For instance the Equal Horizontal and Equal vertical, among other text is missing now, only the icons is present. The text was present this morning. Any ideas on this? James ...

Do You Know???
Hi... Where to get personal / business loan? How to settle your debt? Where to invest? Monthly Profit 20%? One time investment only? Setup your own business & growing income? The Beneficiary Bank is Barclays Bank? Just only need USD1070 for Financial Freedom? 300% Profit,10%Commission,5% Bonus,1% Revenue & 0.01% Daily Profit Payout!! ---------------------------------------------------------------------------= =AD=AD----- Get me online at : E-Mail /Yahoo Messenger,my ID : sallehes[at]yahoo.com Change [at] to @ If you never take the chance, you will never have the chances. >From O...

Do you know this?
I gonna to purchase Joyfax Server. Do you have any idea about it? 'Joyfax - Fax Server, Fax software, Windows Fax Server, Network Fax Solution, Free Fax Viewer, Fax Broadcasting software' (http://www.joyfax.com) -- lenny66 Posted via http://www.vistaheads.com In article <lenny66.4cslw5@no-mx.forums.vistaheads.com>, lenny66.4cslw5 @no-mx.forums.vistaheads.com says... > What exactly would you imagine yourself seeing subject "Do you know this?" People usually ignore topics with unclear subjects. -- Poutnik The best depends on how the be...

How can I use my Access list to email selective groups?
How can I use my Access list to email selective groups without using my Outlook Address Book? I am using Access 2003. On Wed, 12 Dec 2007 12:59:01 -0800, ChellBelle wrote: > How can I use my Access list to email selective groups without using my > Outlook Address Book? I am using Access 2003. Download the Email2K sample database from http://www.datastrat.com/DataStrat2.html -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail ...

CListView scrolls to first selected item.
Hello, I have a CListView control on a simple frame with multi-select turned on. When I select an item in the list, and then scroll down with the scroll bar so that the selection highlight scrolls out of my view, and then press the Shift key so that I may select multiple items, the view scrolls automatically upward to the first selected item. Consequently, I am forced to select smaller numbers of items. In fact, I tried this with other keys too, and they all produce the same behaviour, except for the SpaceBar. Is there a way to turn this automatic scrolling off? I am using: MS Visual Studio...

Does any know how to add more columns in the NCAA Excel Tracker?
trying to add more columns in the NCAA Tournament Tracker but it won't keep the formulas correct. Any help Just what exactly is the/a "NCAA Tournament Tracker"? -- Regards, RD -------------------------------------------------------------------- Please keep all correspondence within the Group, so all may benefit ! -------------------------------------------------------------------- "NCAA Tourney Commissioner" <NCAA Tourney Commissioner@discussions.microsoft.com> wrote in message news:8020B969-D6D4-4857-96E4-3475D1F75DA6@microsoft.com... trying to add more ...

Selection lost with VBA
[Sorry for the other message w/o the subject.] I have an Excel 2000 sheet with a CommandButton. I wrote a line of VBA which move the CommandButton in the row of the selected cell (when I change the row, the button is always visible). When I select a cell for copy and then I change the row, Excel lost the selection and I can't past the cell. Any suggestion? Thanks Cristiano What is your code? HTH Bob "Cristiano" <cristiano.pi@NSquipo.it> wrote in message news:4b524742@news.x-privat.org... > [Sorry for the other message w/o the subject.] ...

Items on Signature reciept
Hello, I am actually trying to find out how to get the itemized list on the signature reciept as well as the customers reciept. Right now i have to print an extra copy and staple it to the signed reciept. If there is a way to make it all print out the items the custmer bought on the reciept that they are signing. Also, at the end of the day when i settle my edc batch i would like to print out a report on the epson reciept printer instead of on a regular sized paper. Is there another way to settle the edc batch without going to the manager because i do not want any of my employees h...

Intellipoint 7 mouse driver has no cursor selection?
I love Microsoft's Intellipoint driver except for the fact it seems to have no cursor selection. Mine is too small. Is there any way of fixing this without downloading 3rd party cursors? (Mouse Properties, Pointers, Scheme....nothing there.) "dfsf" <dfsf@nowhere.com> wrote in message news:op.vaxdfxy3p9a91v@----------.wp.shawcable.net... >I love Microsoft's Intellipoint driver except for the fact it seems to >have no cursor selection. Mine is too small. Is there any way of fixing >this without downloading 3rd party cursors? (Mouse Prope...

do you know??
hi I have a problem I had made a programm deal with database I had created it manually by microsoft access. I want the programm make the database automatically when it run on every computer?? second did every computer run this programm have microsoft access ??? goodbye thank you ??? 1. You should just ship the mdb file with your program. 2. you don't need to have access installed on all the computers just the odbc/ado drivers for access. AliR. "mohaz" <mohaz14@yahoo.com> wrote in message news:1187291340.459954.57930@k79g2000hse.googlegroups.com... > hi >...