Re: ShowWindow() inside of DrawItem ?
On solution I would try is to just send a message to your control (a WM_APP
message) which would cause it to check the current state of the controls and
enable/disable show/hide whatever you want based on teh current state. You
could use SendMessage() at the end of your draw function to pump this
message to your dialog. You want to make sure not to change anything if
the state doesn't change so you could just return if there are no changes
from the previous state.
Tom
"Peter" <Peter@discussions.microsoft.com> wrote in message
news:57E24AFD-D3C3-43E3-A896-C931FA43259A@microsoft.com...
I have CMyListCtrl and it is owner draw.
In it's DrawItem() function I use ShowWindow(SW_SHOW) and
ShowWindow(SW_HIDE) to show/hide subcontrols (edit boxes and ip address
controls) drawed like items in list control.
Problem is, that calling ShowWindow() invokes again WM_PAINT for
CMyListCtrl
and after CMyListCtrl::OnPaint() is finished it is called again and it
loops
with CPU100% .
How to solve this problem ?
Can be ShowWindow() placed inside of DrawItem() ?
Or other solution ?
Peter