Can anybody help me about this..
I made a dialog based application wich at a point open another dialog (FileDialog) to choose a file.
When the filedialog exit the main window wich was covered for the filedialog stands like erased.
I think that is matter of refreshing the main window but I don't know how to do it.
Catch the WM_PAINT message in th dialog and repaint your window accordingly
You may just have to call for a paint by windows. Sounds like you do ot use HDC's.
Try grabbing the dlg with the mouse and shake it while it is 'like erased'. If it redraws then all you need is to call for windows to redraw it.
Do this when you have finished cleaning up the previous dlg in response to its WM_QUIT ect.
InvalidateRect(hDialog,&Rect,TRUE);//will redraw background
If when you shake it it does not redraw then you will need, as Fordy says, to create a response to the WM_PAINT msg.
or you could also use SendMessage()