How to get the items in the view before window is created?

Hi,
i have some item in the list before starting the application.where i need to write the code to get the items in the list just after creation.
srikadiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ZoppoCommented:
Hi srikadi,

please explain you problem more detailed: What kind of view/items/list? Where/what are they before the application starts?

ZOPPO
0
srikadiAuthor Commented:
Hi ZOOPO,
i have CListView,CformView.if CListView contain any task  i need to enable one button in CFromView.
first iam disabling the button after that i am checking getItemcount of Clistview.if getItemcount>1 iam enabling..its working fine if the list doesnot contain any tasks in Listview before creation of the application.
but i want to test before creation of the application.if it contains ant task then it should enable ie on creation time..
iam very poor in english..sorry if i did any mistakes.
0
ZoppoCommented:
Hm - I still don't really understand this: '... in Listview before creation of the application' - how can there be items (tasks?) in the listview before the application runs?
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

srikadiAuthor Commented:
sometime i directly close the application..so when i open the application the nexttime the listview contains the previous items..so i want to enable button if the list contain items.
0
ZoppoCommented:
I still don't see the problem. When you start the application there can't be items in the list, the list has to be filled by the application. There must be some code in the application which adds and removes items to the list - that's where you can enable/disable the button.
0
srikadiAuthor Commented:
sorry if i can't expalin properly..
1)my list has some items..
2) i closed the application with out deleting the items in the list.
3)next tiem when i opened the list contain same item which were there before.
so
now initially i disbled the button in OnInitialUpdate() funtion..after that i am rading getcount()..if it contains items then i am enabling the button..
but i want..
to check just after appearing of the window..where i need to write the code..
0
ZoppoCommented:
Ok, so you don't 'close' and 'start' the application, you 'minimize' it and 'restore' it, right?

Then I still would suggest to enable/disable the button in the code where the list items are added/deleted. Another possibility would be to implement a WM_ACTIVATE message handler. In there you can (in case of activation) count the number of items and enable/disable the button.

ZOPPO
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.