Greetings, Kambiz! I'm found the "error" code..
- Code: Select all
procedure TTranslator.EndUpdate;
begin
Dec(fUpdateCount);
if (fUpdateCount = 0) and (Owner is TWinControl) then
begin
if TWinControl(Owner).HandleAllocated then
begin
//TWinControl(Owner).Perform(WM_SETREDRAW, 1, 0);
{RedrawWindow(TWinControl(Owner).Handle, nil, 0,
RDW_ERASE or RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_UPDATENOW); }
end;
if (Owner is TCustomForm) and Assigned(fActiveControl) then
TCustomForm(Owner).ActiveControl := fActiveControl;
end;
end;
hm, before showing, the window is invisible... Your code doesn't consider that and paint it. So we have 2 windows, 1 painted by TApplication and is invisible, 2 window painted by i18n and is visible, but non control.
I've comment these strings and bug is fixed, but now after change language, window doesn't redraw automatically.
How fix it?
Also:
http://msdn.microsoft.com/en-us/library ... 19(v=vs.85).aspx
If the application sends the WM_SETREDRAW message to a hidden window, the window becomes visible (that is, the operating system adds the WS_VISIBLE style to the window).