Hi,
Comment inline
Quote:
>Hi
>This is hard for me to explain but I will try anyway.
>I have created a button object labeled "button" and 2 list view controls in the
> view class. when I click on "button", message handler OnButtonClicked() calls
> a void function that updates the contents of the list view controls, this
> works ok.
>Problem is their is a case when I want to update the List view controls more
> than once without clicking "button" again the List view disappears instead of
> being updated.
>OnButtonClicked()
>{
> DisplayListControl();//contents updated correctly
>}
>OnButtonClicked()
>{
> do
> {
> DisplayListControl();//contents not updated on screen?
> //ListControl text changes each time
> //after x times m_var = false
Try to add UpdateWindow or RedrawWindow here. DisplayListControl probably
invalidates ListView. When Windows has time it will check if any windows has
invalidated areas and send WM_PAINT for those windows. You however are running
in the loop so windows haven't time to send WM_PAINT.
This explains why ListView is not updated but instead of disappearing the
ListView should show contents of last DisplayListControl function. Therefore
I'm not sure if my answer is correct.
Quote:
> }while(m_var == true);
>}
>-----------------** -- Posted from CodeGuru -- **-----------------
>http://www.codeguru.com/ The website for Visual C++ programmers.
-------------------------------------------------------------
Mika Kurki - System Analyst, ICL Financial Services
to respond remove zzz from start of the address