Code: Select all
{\rtf1
\plain\ltrch
test
}
If I remove \plain or \ltrch, layout preserves.
Is it possible to preserve keyboard layout in all cases?
Moderators: Hacker, petermad, Stefan2, white
Code: Select all
{\rtf1
\plain\ltrch
test
}
In WordPad (for XP) if you pressed <Home> or <End> the keyboard layout will be switched, so maybe TC send one of these keys to the RichEdit control after loading the file and that what causing the keyboard layout switch.MVV wrote:when I open file in WordPad, layout doesn't change from EN to RU.
Code: Select all
#define IMF_AUTOKEYBOARD 0x0001
Code: Select all
int flags=SendMessage(hEdit, EM_GETLANGOPTIONS, 0, 0);
SendMessage(hEdit, EM_SETLANGOPTIONS, 0, flags);
Code: Select all
SendMessage(hEdit, EM_SETLANGOPTIONS, 0, SendMessage(hEdit, EM_GETLANGOPTIONS, 0, 0)&~IMF_AUTOKEYBOARD);
If I set this flag to Lister's TRichEdit and load new file using File\Open then, all works fine - so I think loading doesn't change flags. But you may always try and get see if it works as should.ghisler(Author) wrote:It seems to work when setting it AFTER loading the actual file, because the loading seems to change these flags depending on the file contents...