Click here to Skip to main content
15,892,269 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSkin based system Pin
SGO2-Nov-00 19:29
SGO2-Nov-00 19:29 
GeneralRe: Skin based system Pin
Michael Dunn2-Nov-00 20:51
sitebuilderMichael Dunn2-Nov-00 20:51 
GeneralEnhanced metafile Pin
Jean-Yves2-Nov-00 5:28
Jean-Yves2-Nov-00 5:28 
GeneralRe: Enhanced metafile Pin
Lars Dirks9-Nov-00 3:17
Lars Dirks9-Nov-00 3:17 
GeneralDrag & Drop Pin
Adrian Metcalfe2-Nov-00 2:16
Adrian Metcalfe2-Nov-00 2:16 
GeneralRe: Drag & Drop Pin
Shafeeque O.K.4-Nov-00 21:19
Shafeeque O.K.4-Nov-00 21:19 
GeneralRe: Drag & Drop Pin
Shafeeque O.K.4-Nov-00 21:19
Shafeeque O.K.4-Nov-00 21:19 
Generalkeyboard layout vs threads Pin
real name2-Nov-00 2:16
sussreal name2-Nov-00 2:16 
user stars program and changes keyboard layout (taskbar small icon)
(clicks at icon in toolbar what) runs new thread with dialog
-> this changes selected keyboard back to system one (taskbar small icon)
escapes dialog
-> returns to its keyboard laybout (what else except laybout?)

when he changes layout in dialog thread all is fine
escaping/reopen dialog keeps his settings

for test i tryed to call fix value (i have sk lang and keyboard installed)
bool bul = SetThreadLocale(MAKELCID(MAKELANGID(LANG_SLOVAK, SUBLANG_DEFAULT), SORT_DEFAULT));
before dialog opening (in new thread) but it not helped (makes nothing except returns true)

i found is possible to GetKeyboardLayout in mail thread (HKL)
but (from help) for ActivateKeyboardLayout is necessary (expecialy w9x) call LoadKeyboarLayout before
and its oputut set to ActivateKeyboardLayout

1.
is any back tranformation from HKL to parameters wanted for LoadKeyboarLayout?
2.
why SetThreadLocale "makes nothing"? or for what is good?
what all is necessary to set for new thread to keep main thread lang etc. settings?

more details:

first try
seems working (keyboar icon in taskbar relives)
but under nt4, w2000 only
under w98 ignores
main thread
StData *pData = new (StData);
pData->m_Layout = GetKeyboardLayout(0);
if((hThread = CreateThread(NULL, 0, Thread, (void*)pData, 0, &ThreadID)) == NULL)
ui thread
StData *pData = (StData*) pVoid;
HKL boo = ActivateKeyboardLayout(pData->m_Layout, 0);
AfxMessageBox("!");

second try again not works under w98
main
BOOL boo = GetKeyboardLayoutName(pData->m_LayoutName);
ui
//HKL Layout = GetKeyboardLayout(0);
//UnloadKeyboardLayout(Layout);

HKL hkl = LoadKeyboardLayout(pData->m_LayoutName, 0);
ActivateKeyboardLayout(hkl, 0);
AfxMessageBox("!");

do you see reason?

thanks for reply
t!
GeneralHtmlHelp control Pin
Dmitry Karpezo2-Nov-00 1:24
Dmitry Karpezo2-Nov-00 1:24 
GeneralThreads Pin
joEp mEloEn2-Nov-00 1:02
joEp mEloEn2-Nov-00 1:02 
GeneralRe: Threads Pin
Stephen Kellett6-Nov-00 5:26
Stephen Kellett6-Nov-00 5:26 
GeneralCFrameWnd in Ext DLL Pin
Lars Dirks2-Nov-00 0:57
Lars Dirks2-Nov-00 0:57 
GeneralDrop item on explorer. Pin
Juan Diego Domínguez1-Nov-00 23:39
Juan Diego Domínguez1-Nov-00 23:39 
GeneralDavid Pin
Juan Diego Domínguez1-Nov-00 23:39
Juan Diego Domínguez1-Nov-00 23:39 
Generalstring table field definitions Pin
Ron Ginsberg1-Nov-00 17:01
Ron Ginsberg1-Nov-00 17:01 
GeneralBitBlt Pin
zack1-Nov-00 16:23
zack1-Nov-00 16:23 
GeneralRe: BitBlt Pin
Christian2-Nov-00 10:52
Christian2-Nov-00 10:52 
GeneralRe: BitBlt Pin
zack3-Nov-00 13:37
zack3-Nov-00 13:37 
QuestionRisky Parallel Port Scheme? Pin
Myles1-Nov-00 15:46
Myles1-Nov-00 15:46 
GeneralDraw child outside of parent or Mainframe in MDI Pin
Ryan Park1-Nov-00 13:36
Ryan Park1-Nov-00 13:36 
GeneralDetecting a KeyDown Pin
Member 117662571-Nov-00 10:48
Member 117662571-Nov-00 10:48 
GeneralApplication Error with Popup Menu Pin
larryepplin1-Nov-00 8:47
larryepplin1-Nov-00 8:47 
QuestionHow to write screen saver Pin
koteswara1-Nov-00 2:25
koteswara1-Nov-00 2:25 
AnswerRe: How to write screen saver Pin
Member 12089651-Nov-00 6:37
Member 12089651-Nov-00 6:37 
GeneralSound Card input line Pin
Member 3791-Nov-00 0:30
Member 3791-Nov-00 0:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.