an odd problem about listctrl

the following codes:
 m_cListCtrl.SetFocus();
 m_cListCtrl.SetItemState(1, LVIS_SELECTED, LVIS_SELECTED | LVIS_FOCUSED);
 m_cListCtrl.EnsureVisible(1, TRUE);

works in a button handle function
but doesn't function OnInitDialog();

i wanna make one of the items in my listctrl hilighted when dialog shows.

thanx for help.
best regards,
kywoo


0
kywoo1 (10)
8/17/2003 12:08:55 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
819 Views

Similar Articles

[PageSpeed] 46

it's done,
thanks

kywoo
"Jeff Partch" <jeffp@mvps.org> д����Ϣ
news:OICm#tLZDHA.652@TK2MSFTNGP10.phx.gbl...
> "kywoo" <kywoo@vip.sina.com> wrote in message
> news:%23TKwUhLZDHA.4020@tk2msftngp13.phx.gbl...
> > the following codes:
> >  m_cListCtrl.SetFocus();
> >  m_cListCtrl.SetItemState(1, LVIS_SELECTED, LVIS_SELECTED |
> LVIS_FOCUSED);
> >  m_cListCtrl.EnsureVisible(1, TRUE);
> >
> > works in a button handle function
> > but doesn't function OnInitDialog();
> >
> > i wanna make one of the items in my listctrl hilighted when dialog
> shows.
>
> Don't hate me for asking, but do you remember to return FALSE from
> OnInitDialog?
> -- 
> Jeff Partch [VC++ MVP]
>
>


0
kywoo1 (10)
8/17/2003 12:53:48 PM
Reply:

Similar Artilces:

backup problem
Hi I had installed backup for office 2003, I had been backing up to a removable disk. I had removed the disk and kept getting messages that was unable to back up to removable disk, even though I have turned off all automatic backup options. I have since removed back up "feature" but still get the 4 or 5 steps stating unable to find disk etc, any ideas how to get rid of this wonderful microsoft feature. thanks tim If by removed you mean 'uninstalled' then it would appear the uninstall wasnt successfull. In OL ensure backup is not selected within Addins "Tim&...

Odd date format
In Column A I need to format a date, without dashes or slashes, in this way: yymmdd In Column B I need Excel to recognize it as a date, in that order and convert it to a regular date such as: mm/dd/yy Is there any way of doing this? It's driving me crazy. Surely there has to be a way. TIA! Cindy Cindy Hi Cindy, Can be done, but a lot simpler is to do it the other way around: Enter the date in Column A as mm/dd/yy In column B: =A1, Format>Cells>Custom, in the Type box, enter yymmdd If you really need it otherwise: post again! -- Kind Regards, Niek Otten Microsoft MVP -...

Decimal translation problem
Someone asked me the following question. Any suggestions? ------------------- Another problem is in scenarios with figures with a decimal, in English this is a '.' (point) and in other languages, like dutch, it is a ',' (comma). When I send a model to someone using the other decimal-seperater, the model produces lots of errors (because a number becomes text). I think that Excel should change this automatically. I don't know where to report these 'bugs', do you? And if so, you probably never get an answer from Redmond. ------------------- -- Have a great day,...

xsd.exe bug or odd xsd file
I was given a couple of XSD files so that I could generate a client that targeted a SOAP/RPC web service. One of the XSDs includes a definition of an element that is a sequence of row elements, which in turn is defined as a sequence of column elements. The CS class file generated defines the sequence of row elements "rows as column() ()" rather than "row() As row". This seems to give trouble to XmlSerializer. With XmlSerializerPreCompiler I was able to narrow the problem down and guess at the problem. I made the change that I indicated above because this seems...

Formula Bar Problem
I have just reinstalled Office XP 2002 version. I have installed SP3. In Excel when I click on view Formula Bar the spreadsheet disappears and leaves a clear screen though all the toolbars etc still show. Click again so the formula bar is unselected and the spreadsheet comes back. It looks as though the formula bar is very large with the font x00 points! But I still cannot get into the spreadsheet. I don't really want to go through reinstalling Excel - any ideas? Richard ...

Problems attaching files
Please help! I have had problems attaching files. I get an error saying when I try to attach files...the error window says the resource is full and to close some programs even when I have none running. Please help! ...

Retrieve email problem: "The operation failed"
When I click on Send/Receive in my Outlook 2002 to try to retrieve new emails, an error window pops up immediately which states: "The operation failed." I reinstalled Outlook 2002. No help. I tried the repair function. No help. I use Windows XP. Any suggestions would be appreciated. Before I reinstalled Outlook 2002, the program occasionally would not load at all. When I did a Control/Alt/Delete, I received an error message that stated that the problem was caused by a conflict between Outlook 2002 and WinFaxPro. I don't even have WinFaxPro installed on this computer. HH ...

MONEY BACKUP PROBLEMS
Hi everyone. I can't get Money to restore a backup I made onto a USB drive. I did this before I got a new computer and now I have Money 2005 loaded on the new drive it won't open the files. Now I'm really stuck. MSN tech help have been next to useless on this. Does anyone have any ideas PLease.........................! I suspect this is because you haven't downloaded the M2005 patch. Check your version in Help > About. It should end in 1105. If it doesn't you need to open the sample.mny file or create a new file and do an online update to download the patch. -- R...

faq CArray member function Add problem
Hi, Headcke! I define some classes as fellows: CMyPoint { .... CMyPoint(const long &xx, const long &yy); CMyPoint(const CMyPoint &cmpt); CMyPoint(const CPoint &cpt); CMyPoint& operator = (const CMyPoint &assmypt); CMyPoint& operator = (const CPoint &asspt); .... }; CSegment { .... CList<CMyPoint,CMyPoint> m_PointList; .... CSegment& operator = (const CSegment& asssignsegmet); .... }; But when I use them CArray<CSegment,CSegment> tmpmyarray; CSegment tmpsegment; tmpsegment.m_PointList.RemoveAll(); tmpsegment.m_nIndex=0; tmp...

Intelligent Message Filter behaves very odd
I have the IMF that comes with Exchange 2003 sp2 installed and working very well, (I never had IMF v1 installed ) the only issue I have is when I set up my custom thresholds and actions under "Gateway blocking configuration" they are changed by it self to defaults the next day and I have to be change them back to my desire settings everyday. Does someone know how to fix this? or is there any registry key or setting in AD where to set this up? I've read the IMF guide but I found nothing about this. I have 2 exchange back-end servers and 1 front-end server, I also have tried ...

Namespace problems
Hi; I am creating an XmlDocument (.net 2.0) and then saving it. I need the final xml file to look as follows (SpreadsheetML schema - I have no control over it): <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:ss="schemas-microsoft-com:office:spreadsheet"> <CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> <WindwardReports dt:dt="string">Version: 4.0.12</Wi...

POP3 Problem
After being able to do this successfully for years, for some reason I am now having trouble downloading my Yahoo email into Outlook. Can anyone help? What version of Outlook do you have? Do you get any error messages? -- Jeff Stephenson Outlook Development This posting is provided "AS IS" with no warranties, and confers no rights "Phil" <anonymous@discussions.microsoft.com> wrote in message news:032401c3d16f$5dcda880$a101280a@phx.gbl... > After being able to do this successfully for years, for > some reason I am now having trouble downloading my Yahoo &...

Repost Exchange update problem
I have tried to upgrade exch2k3 sp1 to sp2, but the update fails with "the file pcproxy.dll is in use, and setup cannot identify the app or srvc. setup cannot continue" I have stopped all nonessential services (av, h/w monitor, etc) but the error still appears. Does anyone know what pcproxy.dll is, and any apps/srvcs that may call it? Any clues/ideas/suggestions? Please. -- ----------------------------------------------------------------------------------------------------------------------- This message has been checked for all known viruses. The information contained in th...

Stock Count Problem
Hi everyone I have the following case while entering the stock count:- When Count was started the snapshot (as of 20/06/2009)of the inventory is as follows:- Item ABC Captured Qty 51 Lot Numer 44 Captured qty is 50 Lot Numer 44 Captured qty is 1 On hand 51 Allocated zero While the count process was going on we sold that 51 qty on 22/06/2009 After entering the counted qty for the same in this way:- Counted Quantity 51 Variance ZERO Clicked Serila/Lt button and entered Counted qty for lot 44 is 50 Counted qty for lot 44 is 1 When i click OK i get the following meassge :- The varaince qua...

Problem with outlook
I have a problem opening opening outlook. It has been sending e-mails but keeping them in the Outbox. I've just tried to delete some sent items but it crashed. When I open Outlook now it says "Outlook could not open the file containing the folders used to send and receive e-mail messages, create appointments, and open the address book. Please select from the options below. Create a new personal folders file or open an existing personal fodlers file" Does anyone know how to open it properly so I can access all my normal e-mails? ...

Where is the problem in this simple form
I have a table with 5 fields. One of those is a Yes/No Field. This is my problem field I can open the table fine and see the Check box and check/uncheck the records just fine. I have a query that is also based on this table. I can open the query and check/uncheck this yes/no field just fine as well. I have a simple form that pops up and is based on the above query. All of the fields on this form were dragged from the Field List Button containing available fields from the query. But the check box field is greyed out when I go to Form View . . . and if I try to check on this record, I...

Microsoft Money has encountered a problem and needs to close #2
I'm using Money 2000 Deluxe, Canadian version on a Dell Laptop running XP. It was running fine, but I now can't load up my money file because the above error appears. Here's more info: AppName: msmoney.exe AppVer: 8.0.14.1001 ModName: taxutil.dll ModVer: 8.0.14.1001 Offset: 0000206f Any advice? Have a look at http://money.mvps.org/faq/errors.aspx -- Regards Bob Peel, Microsoft MVP - Money For UK tips & fixes see http://support.microsoft.com/default.aspx?scid=fh;EN-GB;mny. For wishes or suggestions see http://register.microsoft.com/mswish/suggestion.asp or for UK wishe...

Formula problem
Hi, After several attempts, it fails to show the correct result for the following formula Extract of vba code Cells(s, 3).Formula = "=SUM(" & Range(Cells(s, 3).Offset(-1, 0), _ Cells(s, 3).End(xlUp)).Address(False, False) & ")" & "- SUMIF(C[-2],""CF Total"",C)" Any idea ? thanks in advance Regards Len Check the formula on the worksheet to see if it is correct. I think your code could of been producing a formula which would cause a circular calculation. It depends on the data in the worksheet. ...

Odd Issue
Exchange 2003 on native 2003 AD. I am really baffled. I have a distribution group called school admin. It has 2 users in it, Jodi and Mark. When someone (anyone) makes a calander event and adds School Admin to the attendies, Jodi gets the request, Mark does not. Here's the wierd part. Beth and Robyn, are not on the DL, are not connected to that school. Beth get the invitation and whoever sent the invite gets a NDR about Robyn. I have deleted the DL and recreated it. I have looked at Jodi and Marks deligation and it's clean. Where else can I look? Thanks, Fred That ...

Inventory price problems
A recent problem has ben found with inventory pricing. When a retail price is changed, all items in all departments are changed to the same price. When viewing the prices in inventory list, they are correct. Opening the properties window shows a different price. Oh - your issue reminds me of the really wicked pricing issue in 1.3.1003. This issue effects both HQ and SO. When you look at your item list - you see different pricing, but if you open an item, modify (or maybe not even modify) pricing, then OPK to save and open the next item, the next item will pick up the prior's price...

Registry problem
I recently had to reinstall xp and always change the registry so that the number lock is always on as below. I find now since the reinstall the registry won't keep the changes for HKEY_USERS, does anyone have a suggestion? thanks HKEY_USERS\.DEFAULT\Control Panel\Keyboard >InitialKeyboardIndicators = 0 > >HKEY_CURRENT_USER\Control Panel\Keyboard >InitialKeyboardIndicators = 0 "JT" <grouch_45@hotmail.com> said this in news item news:bWjdn.119121$fu3.43378@newsfe12.iad... > I recently had to reinstall xp and always change the regis...

secure my access problem, Importing the Database.
hi all I have created a small project and my project max I can In all forms design view, allow design view option NO. mainly at tools->start up- unchecked all below 1.Display database window. 2.Display status bar 3.Allow Full menus 4.Allow default shortcuts. 5.Built in toolbars 6.Tool bar menu/ changes 7. Access special keys. and finally created an MDE file also. when my mde file is executed no problem in using the project , and secured database windows. even we cannot right click the form to see properties also. My problem is , if suppose a new access file is c...

Problems with autobudgeting
Hi all, I switched from Quicken 2003 to Money 2003 at the end of last year. However, everytime I want Money to do my an autobudgeting, it always give me incorrect figures. I am wondering if it is the switching from Quicken to Money that causes the problem with the database, or is it because Money does not keep track of day to day transactions? Many Thanks! ...

IF problem.....
I have got a sheet that has 3 columns. A - Code (801,802, 803, 0, " ") B - Time (14:00:01... ) C - formula I want C to look @ A establish which code is present and if 801/2/3 etc return time from B. However, if code is 0 I want C to return time from B but the issue arrises if A has a space it returns the time from B. How can I get it to return a space/- if col A is a space and not a code. Thanks -- tom300181 ------------------------------------------------------------------------ tom300181's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=21580 Vi...

Deleted items folder problem
I am using Outlook 2000 SP 3 9.0.0.6627 Today whilst downloading my e mail, the computer made a noise like it was trying to restart,I am now unable to open the deleted items folder the message I get is "unable to display the folder", I can send and receive e mails as normal, but cannot delete them from my inbox, when I try I get the following message "The messaging interface has returned an unknown error, if the problem persists restart outlook", I have restarted but this made no difference. I did a system restore in the hope that it would cure it but no luck, ...