In my program I have a dialog box (number 1) containing a CTree control and a button opening a new dialog box (number 2) to add information in the CTree control of the previous dialog.

The Ctree control is initialize in the OnInitDialog and in the Onpaint function ( number 1). When I quit (OnOk function ) dialog box number 2, I call

BroadcastSystemMessage ( BSF_QUERY, BSM_ALLCOMPONENTS, WM_PAINT, 0, 0 );

to refresh other dialog ( number 1 )

My problem is when the CTree control is full and the scroll bar appear. When I add info with second dialog box (number2) and when I return to window number 1 ( with Ctree control), it refresh the CTree dialog box (number 1) the Ctree control blick all the ready I click on the control. I solve this problem by removing initialisation of the tree control in the OnPaint function of window number1. But with this function remove, my new information did'nt appear because the Ctree is not refresh.

It is possible to refresh window number 1 with a other method or technique.

Thanks