Not able to remove the indentation in the list control after removing the imagelist

Hi,

Anyone can help me. In my application once I remove the imagelist from
the list control, indentation or space exists in the list control. I
tried with setting iImage and iIndent members of LVITEM structure to
-1. But no luck. 

Thanks in Advance,

Balu.

0
9/14/2006 4:22:22 AM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies
512 Views

Similar Articles

[PageSpeed] 14

You could try calling Detach() for the image list in the CListCtrl.  For 
example:

CListCtrl *pMyList;

// Added image list using SetImageList()

pMyList->GetImageList()->Detach();

http://msdn2.microsoft.com/en-us/library/b75edw6k.aspx

Tom

"balu" <balakrishnakk@gmail.com> wrote in message 
news:1158207742.071489.280820@e3g2000cwe.googlegroups.com...
> Hi,
>
> Anyone can help me. In my application once I remove the imagelist from
> the list control, indentation or space exists in the list control. I
> tried with setting iImage and iIndent members of LVITEM structure to
> -1. But no luck.
>
> Thanks in Advance,
>
> Balu.
> 


0
tserface (3861)
9/14/2006 2:57:48 PM
Hi ,

Thanks for the reply. I tried with what you suggested. But still i am
not able to remove the indentation.

Regards,

Balu.

Tom Serface wrote:
> You could try calling Detach() for the image list in the CListCtrl.  For
> example:
>
> CListCtrl *pMyList;
>
> // Added image list using SetImageList()
>
> pMyList->GetImageList()->Detach();
>
> http://msdn2.microsoft.com/en-us/library/b75edw6k.aspx
>
> Tom
>
> "balu" <balakrishnakk@gmail.com> wrote in message
> news:1158207742.071489.280820@e3g2000cwe.googlegroups.com...
> > Hi,
> >
> > Anyone can help me. In my application once I remove the imagelist from
> > the list control, indentation or space exists in the list control. I
> > tried with setting iImage and iIndent members of LVITEM structure to
> > -1. But no luck.
> >
> > Thanks in Advance,
> >
> > Balu.
> >

0
9/15/2006 12:44:29 PM
Hi ,

Thanks for the reply. I tried with what you suggested. But still i am
not able to remove the indentation.

Regards,

Balu.

Tom Serface wrote:
> You could try calling Detach() for the image list in the CListCtrl.  For
> example:
>
> CListCtrl *pMyList;
>
> // Added image list using SetImageList()
>
> pMyList->GetImageList()->Detach();
>
> http://msdn2.microsoft.com/en-us/library/b75edw6k.aspx
>
> Tom
>
> "balu" <balakrishnakk@gmail.com> wrote in message
> news:1158207742.071489.280820@e3g2000cwe.googlegroups.com...
> > Hi,
> >
> > Anyone can help me. In my application once I remove the imagelist from
> > the list control, indentation or space exists in the list control. I
> > tried with setting iImage and iIndent members of LVITEM structure to
> > -1. But no luck.
> >
> > Thanks in Advance,
> >
> > Balu.
> >

0
9/15/2006 12:45:27 PM
I'll take a wild swing at it: What if you replace the imagelist with and 
empty one with a zero image width and height? Apologies in advance.
-- 
Jeff Partch [VC++ MVP]

"balu" <balakrishnakk@gmail.com> wrote in message 
news:1158324327.773721.188290@p79g2000cwp.googlegroups.com...
> Hi ,
>
> Thanks for the reply. I tried with what you suggested. But still i am
> not able to remove the indentation.
>
> Regards,
>
> Balu.
>
> Tom Serface wrote:
>> You could try calling Detach() for the image list in the CListCtrl.  For
>> example:
>>
>> CListCtrl *pMyList;
>>
>> // Added image list using SetImageList()
>>
>> pMyList->GetImageList()->Detach();
>>
>> http://msdn2.microsoft.com/en-us/library/b75edw6k.aspx
>>
>> Tom
>>
>> "balu" <balakrishnakk@gmail.com> wrote in message
>> news:1158207742.071489.280820@e3g2000cwe.googlegroups.com...
>> > Hi,
>> >
>> > Anyone can help me. In my application once I remove the imagelist from
>> > the list control, indentation or space exists in the list control. I
>> > tried with setting iImage and iIndent members of LVITEM structure to
>> > -1. But no luck.
>> >
>> > Thanks in Advance,
>> >
>> > Balu.
>> >
> 


0
jeffp (1711)
9/15/2006 1:40:59 PM
Reply:

Similar Artilces:

Do MFC ActiveX Controls have dual interfaces?
Do MFC ActiveX Controls have dual interfaces? Kurt ...

Data Validation using List (But needs unique list in drop down lis
Hi all, In sheet 1, column A is my title name while column B is person name. Sheet 1 is my database where i do data entry in this. In sheet 2, contains my query page. In cell A5, i uses data validation - list, on this cell. Say in sheet 1 : column A column B XXXXXXX Mr A YYYYYYYY Mr A ZZZZZZZZ Mr A AAAAAAA Mr B WWWWW Mr C DDDDDDD Mr C But In sheet 2, cell A5, I saw in the drop down list as follows: Mr A Mr A Mr A Mr B Mr C Mr C But i want to see this in cell A5 instead (Unique name that is) : Mr A Mr B Mr C ...

Remove AD
Dear all, What is the best way to remove AD services from an existing Exchange 2003 server? Thanks. You shouldn't. If Exchange is installed on a Domain Controller, it should not be demoted to a member server. You should install another Exchange server and move mailboxes, replicater public folders, et al. Then remove Exchange from the old server. Now you can demote it to member server. Install Exchange again and move stuff back. -- Bharat Suneja MCSE, MCT www.zenprise.com blog: www.suneja.com/blog ----------------------------------- "KA Kueh" <kka@ksm.com.my> w...

Master/content pages: prob with passing a control to JS
Hi, my code: .... <script type="text/javascript"> var myfilter = myJSfunction(document.myform.ListBox1); </script> </form> When compiling the web page, because of the master/content, the Listbox1 control gets a different name/id apparantly. So how can I pass my listbox on as an argument of my JS procedure? thx for helping, J "Jokke" <Jokke007007@hotmail.com> wrote in message news:7839C9C3-037F-4550-B5BC-E6BA75D93A99@microsoft.com... > When compiling the web page, because of the master/content, the L...

Address and e-mail contact list
I do not want the e-mail address of sender automatically added to my contact list How do I suppress No clues here so no help forthcoming. Want assistance? Help us help you. Give your version of Outlook. If Express, post in an Express group - this is not one of them. If you are using the Web interface, look under Internet Explorer as it is a part of IE, not Office. --� 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. A...

Macro to remove text
Could one of the resident macro experts kindly help me to do this please. There is text in column D of a worksheet. I want to remove anything that is in brackets, including the brackets. So this: A B C D -- -- --------------- ------------------------------------------- 1 P Andrews Sisters Boogie Woogie (1941 version) 2 Q Artie Shaw (1941) Concerto For Clarinet (Parts 1 & 2) 3 R Artie Shaw Dancing In The Dark 4 S Artie Shaw Frenesi becomes this: 1 P Andrews Sisters Boogie Woogie 2 Q Artie Shaw Concerto For Clarinet 3 R Artie Shaw ...

Which Controls to Build a Parent/Child Web Form
Hi there, I'm quite new to asp.net, but know exactly how to do this using classic ASP, but would like some pointers for aspnet2. I've got data being returned from an SP which looks like this: HeaderItem ChildItem A A1 A A2 A A3 B B1 etc I want to display the data like this A - This is the header record A1 A2 A3 B - Header 2 B1 etc. In classic ASP I'd write out my header row html when HeaderItem changes value and then write the Child Rows. As I've on...

how do i add all my suggested contacts to my contacts list?
How do i add all of my suggested contacts to my plain old contact list? Are you asking about a beta? http://www.microsoft.com/office/2010/en/faqs/default.aspx -- Russ Valentine "Teagan" <Teagan@discussions.microsoft.com> wrote in message news:7812B8CF-1713-48FD-AA3D-0F27BFCF8597@microsoft.com... > How do i add all of my suggested contacts to my plain old contact list? CTRL+A to select all of them then just drag and drop... -- -Ben- Ben M. Schorr, MVP Roland Schorr & Tower http://www.rolandschorr.com http://www.officeforlawyers.com/outlook.htm Aut...

Distribution Lists #30
Hi All, Wasn't sure which would be the best group to post this in......... We seem to be having some issues with people viewing distribution list members. The members are not hidden and if I remove the persons permissions and reapply them it seems to rectify the problem for a little while. I don't know if it is coincidence or not but most of the people having a problem seem to be listed as the manager of the DL. I have looked and followed the article about setting the permissions in security rather than on the managed by option but this doesn't seem to make a difference. T...

Changing font size in data validation drop-down lists
In Excel 2003, I created the value list on a separate worksheet and labled the range so I could use it in the data validation wizard on a different worksheet. The list is working fine; however, the font size in the drop-down list is too small to comfortably read. So far, I have tried: Making the font in the list larger. Formatting larger font size in the active cell with the drop-down button And, creating the list on the same worksheet. All three remedies have not increased the size of the font in the drop-down list. Suggestions are welcome. Great Optimism, Dutch Driver There is n...

Could very much use a Field List
I apologize if this is out there already, but it seems that at least a few field names changed from 1.2 to 1.3. Although I had downloaded a field list before, from here, I cannot even find that original post, let alone any more recent that might contain the correct field names. I need to do some custom SQL and would prefer not to reinvent the wheel. Thanks in advance very much to anyone who could help. Bud Izen Salem Oregon Do you have MS Access? Make a new project and attach to the database as your data source. You will be able to see all the tables and the field names. It has been ...

List details in another sheet
Hi, I have a sheet "Data" with transactions by customer. Column A has the Customer ID. In another sheet called "By Customer", the user selects from a drop down a Customer ID, and clicks a button. What I want for this button is to run a macro to get in a 3rd sheet, "Transactions", columns B, C, D and E from the Data sheet, for the selected customer ID. Is that possible? Can somebody help? Thanks, Cecilia Use VLOOKUP http://www.ozgrid.com/Excel/excel-vlookup-formula.htm -- Regards Dave Hawley www.ozgrid.com "Chechu" <cecichi9@hotma...

List number of permutations for text nums
I've got 4 digit text nums in A1 down In B1 down, I would like to list the corresponding number of permutations, eg: 7777 1 1777 4 0044 6 2477 12 1234 24 Game for any formula, udf or other vba solution Thanks for insights Sub permutations() Dim I As Integer, J As Integer, Rng As Integer Rng =3D Cells(Rows.Count, "B").End(xlUp).Row J =3D 1 Range("A1").Select Do Until ActiveCell.Value =3D "" For I =3D 1 To Rng Cells(J, "D").Value =3D "'" & ActiveCell & Cells(I, &qu...

List of kernel mode compatible functions
Hi, Is there a list of kernel mode compatible C/C++ functions (preferably for WDK 7600)? Thanks, Jan Wouldn't that be the WDK Help file? Thomas F. Divine "Jan M" <jan_m@jerseymail.co.uk> wrote in message news:e7fhXcanKHA.1548@TK2MSFTNGP02.phx.gbl... > Hi, > > Is there a list of kernel mode compatible C/C++ functions (preferably for > WDK 7600)? > > Thanks, > > Jan > Your right of course. I just didnt look hard enough. Jan ...

Runtime Control Addition
Hello everybody, I was searching the net for any resource that helps me on the subject of Adding Controls at runtime into a MFC application. I also wanted to handle the messages as well. Please help me on the subject with any tips or resources you know. Thank you so much. Shervin Hello Shervin, > Hello everybody, > > I was searching the net for any resource that helps me on the subject > of > Adding Controls at runtime into a MFC application. I also wanted to > handle > the messages as well. > Please help me on the subject with any tips or resources you know. >...

List Box no displaying added choices
I have several drop-down list boxes in a few forms that I am having trouble with. When I originally set up the database, I created the tables and entered a few items to be included in the drop down list in the lookup section of the table (design view). I then created the forms and inserted those fields. I have since added several new choices to the drop-down list of the table, and those new selections are available in the Table, but they are not available in the Form. The only items available in the drop down list on the Form are those choices that were originally there when I set up the fo...

Button Control Event: question
I have a small dialog that prints data it queries from a server to a listbox when a user presses a start button. What I'd like to do is to have the data continually print after the button is pressed until the user presses a stop button. So, I guess I would need to initiate some kind of continuous loop for the data querying/printing, but I'm unsure how to get the stop button to break the loop. If this even the best solution. Does anyone have any ideas of how I could accomplish this, or perhaps a better design idea? Thanks, Marcus Marcus wrote: > I have a small dialog that prints d...

when i am in the window to choose a folder to export none are list
I want to export my contacts to an excel file. When I am in the window to choose a folder to export, there are no folders to click on. What version of Outlook are you using? Does anything show in that pane of the Import/Export Wizard? "outlook export files" <outlook export files@discussions.microsoft.com> wrote in message news:17414043-FCB0-4C02-8ABF-C5288395157F@microsoft.com... >I want to export my contacts to an excel file. When I am in the window to > choose a folder to export, there are no folders to click on. ...

Import contacts from Public Folder into Address List
Hi, we had an Address List that mysteriously disappeared. I have been able to restore its contents into a Public Folder of the same name as it was published as such. Now I have a Public Folder full on contacts but I need to move them back to the Address List which has been recreated but is now empty. Does amyone know how I may go about this? Thanks Simon Sorry, we are running Exchange 2003 Standard. Thanks "Simon" wrote: > Hi, > we had an Address List that mysteriously disappeared. I have been able to > restore its contents into a Public Folder of the same name as i...

Removing gray shading in protected forms (drop down box)
Hello- I am creating some contract templates for my company's sales force using Word 2003. I am using the forms toolbar to insert checkboxes and drop down boxes from which to select deliverable specifications. The problem is that when a user selects an option from the drop down box, the gray shading remains. I know the sales teams HATE the gray shading because they don't think it looks very good when sending to customers. Is there a way to disable the shading when an option is selected? Thanks. You can remove form field shading altogether using the corresponding b...

Contacts List Closes Outlook
A user in our company recent found that when using the Contacts, as soon as he scrolls down the program locks up and closes without warning or any dialog box. Any Ideas? ...

Hyperlink in my Dialog control
I want my text in a dialog control to behave like a hyperlink in a web page. Is it possible and how(VC 6.0) Thanks I. Lesher http://www.codeproject.com/miscctrl/hyperlink.asp Here are some examples: http://www.codeguru.com/staticctrl/HyperlinkStatic.html http://www.codeproject.com/staticctrl/cmyhyperlink.asp http://msdn.microsoft.com/msdnmag/issues/01/01/c/default.aspx (look for CStaticLink) -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "Lesher" <Lesher@triplebit.com> wrote in message news:uRDIoju#DHA.808@TK2MSFTNGP12.phx.gbl... | I want my text in a dialog contr...

Delete drop down list
I see instructions for creating drop down lists, but not for deleting them. I have a list that is no longer useful and would like to delete it from the worksheet (To clarify: I am talking about removing the list from the list of list names that appears when using the F3 key) Thank you -- MZ Select the range. From menu Data>Validation>Select 'Any value' OR If you dont have data in those cells from menu Edit>Clear>All -- Jacob "MZ" wrote: > I see instructions for creating drop down lists, but not for deleting them. I > have a l...

cursor control in cells
Can anyone help please? For some reason i am no longer able to scroll across a cell by moving through teh arrow keys. The whole sheet moves instead. Can anyone tell me what I ahve done to lose this control please? Many thanx DAT Hi Dave You have probably inadvertently pressed the Skulk key. Press it again to take Scroll Lock off and you should be OK. -- Regards Roger Govier "Dave T" <datucker@ntlworld.com> wrote in message news:J8sUh.378$V7.132@newsfe7-gui.ntli.net... > Can anyone help please? > For some reason i am no longer able to scroll across a cell by ...

remove carriage return in multiple cells
Hello, I have an excel sheet with lots of data. Unfortunately lots of cells contain carriage returns. Is there a way to remove the carriage returns in those cells (more returns in a cell possible)? Thanks, Andy > Andy Select your range, then CTRL+H. In Find What, type 0010 (number keypad) while holding down ALT. Click Replace All. HTH, Andy Try running this macro: Sub RemoveCRLF() Cells.Replace Chr(10), "" Cells.Replace Chr(13), "" End Sub Afterward you may want to turn off Wrap Text (under Format, Cells, Alignment) for the affected cells. -- Jim...