An MFC application need an edit ctrl in dialog for edit Tamil language. But I found the Tamil language does not have code page in Windows (Yes, there isn't Tamil system locale), and the Unicode option is not in my situation.
Saw someone idea, Embedding HWND into external process using SetParent
I wanna to create another application built with UNICODE option, embed its window to the dialog, but failed. Check the MSDN, SetParent need the parent and child window in one application.
So, how can I implement it?
@MSalters
I solved it by override virtual BOOL CWinThread::PumpMessage(), force the message loop use W version API.
BOOL CtamildlgApp::PumpMessage()
{
_AFX_THREAD_STATE *pState = AfxGetThreadState();
if ( !::GetMessageW( &( pState->m_msgCur ), NULL, NULL, NULL ) )
{
// Note: prevents calling message loop things in 'ExitInstance'
// will never be decremented
return FALSE;
}
// process this message
if ( pState->m_msgCur.message != WM_KICKIDLE )
{
::TranslateMessage( &( pState->m_msgCur ) );
::DispatchMessageW( &( pState->m_msgCur ) );
}
return TRUE;
}
Then CreateWindowExW(... MSFTEDIT_CLASS ...)