SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

siDialogs 6.22, Vista OS behavior

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
pupkinzon



Joined: 17 Feb 2005
Posts: 5

PostPosted: Fri Apr 04, 2008 10:07 am    Post subject: siDialogs 6.22, Vista OS behavior Reply with quote

TsiLang ver 6.2.2 have Vista dialogs support, however, it's kinda strange. If I'm correct. when common dialog is opened on Vista, TsiLang:
1. Creates one-shot timer object,
2. Tunes up dialog Window procedure to fire timer on each WM_WINDOWPOSCHANGED event
3. In the timer procedure enumerates all child windows on the dialog, recursively calling GetWindowText followed by GetTextFrom, then SetWindowText for each control with non-empty Window string found.

The results are, keeping in mind that we have DoRaiseExceptions property set (at least for debug code), quite far from grace. Namely, each opening, moving, changing focus from\to common dialog under Vista produces many side effects, like
1 Dialog controls get enumerated and localized until the first exception is thrown from GetTextFrom, which is occured quite soon during enumeration, actually.
2 siLang Exceptions are generated with 100% probability for different hidden\visible helper common dialog windows which happen to have their titles not empty, for instance, CommonPlacesWrapperWnd, Search bar, something wierd like WorkerW, Tree View, NamespaceTreeControl, misc. edit boxes, containing paths, file names, etc., which normally should never be localized at all.
3 Enumeration process, and, hence, exception throwing, gets repeated each time WM_WINDOWPOSCHANGED event occured.
4 No neet to tell that each time localization is re-started, it throws exceptions on each control which has already been localized.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Fri Apr 04, 2008 11:23 am    Post subject: Reply with quote

Yes, you're absolutely right. It is performed exactly in the way you described, otherwise it is not possible to translate Vista's dialog in VCL. The ony bug is that "localization" is called every time window position changed and we will fix this in next update.
Back to top
View user's profile Send private message
pupkinzon



Joined: 17 Feb 2005
Posts: 5

PostPosted: Fri Apr 04, 2008 12:11 pm    Post subject: Reply with quote

Ok, Igor, I understand that if re-translation is turned off, Vista dialogs may restore some control's captions to untranslated state, after, for instance, save dialog roll-up\roll-down, so here it may be the only way. But I would suggest though, that for some child controls, translation should not be called at all, at least some window classes may be filtered out in siDialogEnumChildProc, comparing value returned from GetClassNameW with, for instance, "CommonPLacesWrapperWndClass", "Edit", "WorkerW", "ComboBox"...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group