CListCtrl's GridLine question

hi,everyone.
My Application want use CListView to show Data with Grid style.
So I create ,and put the CListCtl's style as follow:
cs.style |= LVS_REPORT
  | LVS_EX_GRIDLINES;
..
But the Grid line don't show .
why? In fact, as this example so many in internet ,but I can't resolve this 
problem.
Anyone get me out.
Thank you in advance!


0
sxbluesky (7)
10/21/2005 9:32:55 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
838 Views

Similar Articles

[PageSpeed] 0

    LVS_EX_GRIDLINES is an extended style. Try the following in your view's
OnInitialUpdate() function.

    void CYourListView::OnInitialUpdate()
    {
             CListView::OnInitialUpdate();

             CListCtrl& listCtrl = GetListCtrl();
             listCtrl.SetExtendedStyle( LVS_EX_GRIDLINES );
    }

-- 
Cheers
Check Abdoul
-----------------



"sxbluesky" <sxbluesky@sohu.com> wrote in message
news:u4Q5tJi1FHA.4032@TK2MSFTNGP15.phx.gbl...
> hi,everyone.
> My Application want use CListView to show Data with Grid style.
> So I create ,and put the CListCtl's style as follow:
> cs.style |= LVS_REPORT
>   | LVS_EX_GRIDLINES;
> .
> But the Grid line don't show .
> why? In fact, as this example so many in internet ,but I can't resolve
this
> problem.
> Anyone get me out.
> Thank you in advance!
>
>


0
CheckAbdoul
10/21/2005 2:09:27 PM
Thank you very much!
This tip is very usefull.

"CheckAbdoul" <checkabdoul at mvps dot org> wrote in message 
news:uIiRTkk1FHA.3060@TK2MSFTNGP10.phx.gbl...
>    LVS_EX_GRIDLINES is an extended style. Try the following in your view's
> OnInitialUpdate() function.
>
>    void CYourListView::OnInitialUpdate()
>    {
>             CListView::OnInitialUpdate();
>
>             CListCtrl& listCtrl = GetListCtrl();
>             listCtrl.SetExtendedStyle( LVS_EX_GRIDLINES );
>    }
>
> -- 
> Cheers
> Check Abdoul
> -----------------
>
>
>
> "sxbluesky" <sxbluesky@sohu.com> wrote in message
> news:u4Q5tJi1FHA.4032@TK2MSFTNGP15.phx.gbl...
>> hi,everyone.
>> My Application want use CListView to show Data with Grid style.
>> So I create ,and put the CListCtl's style as follow:
>> cs.style |= LVS_REPORT
>>   | LVS_EX_GRIDLINES;
>> .
>> But the Grid line don't show .
>> why? In fact, as this example so many in internet ,but I can't resolve
> this
>> problem.
>> Anyone get me out.
>> Thank you in advance!
>>
>>
>
> 


0
sxbluesky (7)
10/24/2005 5:31:57 AM
Reply:

Similar Artilces:

Text Question
Hello All, Using Excel XP. Is it possible to have certain letters in a text string be moved to a colum of their own? For example I have several rows of text: A ---------------------- 1 FH 2 XH 3 FHT 4 XT 5 FT What I want to do is to move the individual letters in each row into its own colum, an F would always go into its own column, X would go into its own column, H would got into his own column and T would go into its own column. The sequence of letters into their own column will alaways be in this order: F-X-H-T. Every row may have some o...

Resource dll question...
Hi there, I'm separating my project out into the main code and a resource dll. I've now got it so that when I build the debug solution it will build the following. MainExe - Debug ResourceDll - Debug French I intend to bundle all the languages into a single resourcedll, and build separate dlls from there depending on the build configuration ( E.g. MainExeFRA.dll) When I add another project config (E.g. Debug German) building the Debug solution will only build the existing Debug French. What I would like is that when I select to build the debug solution, it will build... Ma...

Excel 2007 chart gridline color using vba
Hello, i want to apply a themecolor to a chart gridline using vba. I can apply normal colors (RGB, index) but not the theme color. Any idea? thx. berg Hi, Here are the various ways fo changing the colour. With ActiveChart With .Axes(xlValue, xlPrimary) If .HasMajorGridlines Then With .MajorGridlines .Border.ColorIndex = 5 'set color to blue .Border.Color = RGB(0, 255, 0) ' green .Format.Line.ForeColor.ObjectThemeColor = msoThemeColorAccent2 End With En...

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

relates to previous question regarding memberships cards and intia
Hi,before i start my next question i would just liek to say thanks to everyone who replied to my earlier quetions it is much appreciated,the next question i have is related to the question regarding the membership cards i wanted to create.I made the query as told and it works great! Left([FirstName],1) but how do i get the query to run when opening the report to display the bales ?? thanks On Wed, 16 Jan 2008 11:49:03 -0800, newuser <newuser@discussions.microsoft.com> wrote: >Hi,before i start my next question i would just liek to say thanks to >everyone who replied ...

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...

Office 2010 Buying Question Assistance Needed
I've been looking through the MS Office 2010 web site to try to determine what my new small company would require, but I can't find the information I need. We for sure would need Office Pro Plus, but other than that I'm not sure. We want to run it on our own server. We will initially have 3-5 people using it and perhaps more later on. Would we need to purchase site licensing? Unfortunately, our programmers are MS haters (I'm not) and I can't get any assistance from them on this, but I have power of the pen. I would appreciate any assistance I can get. Th...

Mail merge question
This is a multi-part message in MIME format. ------=_NextPart_000_0009_01C81A17.BAB51A20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I've been reading about mail merge, setting up postcards, etc. I remember doing this when I did the tutorials in Publisher 2000, but = still not sure about it (I've never had to actually use it, but have a = few ideas about using it for postcards for people I have made flyers = for) What is the best program to make the mailing list in? I now have 2007 = and have Word (I know enough about to...

RS 2008 Charts Question
I am using RS2005 moving to RS2008 shortly. My question is: in RS2008 if you build a bar graph chart, can you click on one of the bars and display the data that makes up that bar? I know you can do this in Report Builder but is this funcionality available outside of Report Builder? ...

newfish's question:HOW TO make a sniffer using winsocket in vc++6.0 ?
Hey all, I need a sample about sniffer .any one could help me? please...~~ What do you mean by "a sniffer"? I have an idea what this kind of program does so perhaps it's more appropriate to ask what you are trying to sniff? Tom "feizx" <feizx@126.com> wrote in message news:uve3p3xjHHA.1776@TK2MSFTNGP05.phx.gbl... > Hey all, > I need a sample about sniffer .any one could help me? please...~~ > WireShark (formerly known as Ethereal) is an open source packet sniffer. Start there. joe On Sat, 5 May 2007 22:01:41 +0800, "feizx" <...

Follow up to Calculated Field question .....
The syntax worked fine for that. Now I'm wondering two more things ... In one of the tables I have multiple identical room numbers that I need to combine in this calculated field to determine a price for each room. Plus, I also need to determine a number for income generated based upon the number of days the romm is rented. Can you point me in the right direction? Thanks ...

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...

Permissions and Roles question
This may be a Reporting services question, sorry if wrong NG. I created a number of roles in Active Directory to limit access to reports in the Management Portal for Job X. Initially, I created a role for each report and then added groups to those roles. After getting this all set, I determined that it would probably be a better idea to set up more general report roles that could encompass groups of reports rather than individual reports. I deleted most of the original roles I created and created new roles to serve this new structure. Now, when I hit AD for a list of groups to se...

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 ...

PST on Network Question
We have Exchange 2003. We have a lot of users (school district staff and students), so we have strict limits on the mailbox size. For many years we have been telling users to save their messages to their PST files (which is on their network drive). Now we've come across some documentation that suggests that is a BAD idea. What do others use for managing mail and keeping the size of the mailbox low? Where do you store messages/attachments? How easy is it for the non-technical users? Thanks for any and all suggestions. -- Lauri Bellingham Public Schools Application Support &...

Questions
how do i change from microsft exchange to pop3 in outlook 2007. The program wont stay open to use the tool menu. it tells me its not connected and closes out the window. "krzatchok" <krzatchok@discussions.microsoft.com> wrote in message news:1749B22A-69E3-430A-9032-CD73005440E2@microsoft.com... > how do i change from microsft exchange to pop3 in outlook 2007. The program > wont stay open to use the tool menu. it tells me its not connected and > closes > out the window. Use the Mail applet in Control Panel. -- Brian Tillman [MVP-Outlook] ...

CTE question
I just started using CTEs and I thought that it was really just a restatement of a derived table: with MyCTE(x) as ( select x='hello' ) select x from MyCTE Could be rewritten as a derived table: select x from ( select x = 'hello' ) a But then looking at this one: with MyCTE(x) as ( select top 10 x = id from sysobjects ) select x, maxx = (select max(x) from MyCTE), pct = 100.0 * x / (select sum(x) from MyCTE) from MyCTE I can't restate like so: select x, maxx = (select max(x) from MyCTE), pct = 100.0 * x / (select...

IIF statement question
How do I write an IIF statement if I want to exclude rows where there are dates. There are 3 date fields. If one of the date fields is Not Blank then do not print report. If all fields are Null then print report. Would a simple "IsNull" in each field in my query suffice? Seems to me it would take less time to test "Would a simple "IsNull" in each field in my query suffice?" than to post a question. If you can't test this on your own, reply back. -- Duane Hookom Microsoft Access MVP "TotallyConfused" wrote: > How do I write an IIF st...

Chart Question #3
is it possible to create a chart, skipping columns or rows I need to creat a chart using data from every other column and another using data from about every 5th row Any help appreciated David Hopper I'm open to correction on this, but I believe the best way to do this (assuming you don't want to delete the in between data, and resort the columns somehow) would be to create a macro that copies the data you want into the right format (probably on another sheet) and make the chart from there. Something along the lines of: sub MyCopy() dim NewSheet as worksheet dim OldSheet as w...

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...

simple question
Hello! Assume I have this class Person below. My question is if it's any point to have like in my example this row randomNumberGenerator = new Random(); in the c-tor I mean it will be just the same if I remove the c-tor and change this row private Random randomNumberGenerator; to this row private Random randomNumberGenerator = new Random(); My second question is if it's good programming to move statement from a c-tor if I don't pass any argument and place them as instance variable like I did above. class Person { private Random randomNumberGenerator; ...

Gridline format
I would like for the gridlines to appear in front of the columns in a chart. Hi, The gridlines will not come infront of the columns. You can work around this by creating your own gridlines. This page has examples of adding a line to a chart which you can adapt to do multiple lines. Also contains links to further resources. http://www.andypope.info/charts/averageline.htm Cheers Andy m@dvn wrote: > I would like for the gridlines to appear in front of the columns in a chart. -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info ...

Install a new back end Exchange 2003 server question?
I now have an Exchange 2003 front end server installed. I did so by upgrading their old 2000 front end server to 2003 then installing a new front end 2003 on new hardware. The domainprep and forestprep were obviously already run. The backend server is Exchange 2000 and we want to get implment a new Exchange 2003 server to take the place of the back end 2000 server. I wasn't sure if I can just install the new 2003 server and move the mailboxes from the 2000 server or not. I forget... I figured since the schema had already been extended and the front end server (s) are Exchange 2003 t...

Report Desin Question
I am trying to make a report. I have created two different headers and footers, the first header displays all of our headings, the second header displays the the second level headings. I then have a footer then shows sums of all the values. For some of the headings there are no values, so nothing shows up in the footer, as expected. problem is, it leaves a big space, the size of the footer. How can I get this set, to show no spaces when there are no results? On Tue, 26 Feb 2008 13:52:28 -0700, "James" <fake@email.com> wrote: >I am trying to make a report. >I ...