Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Modal dialog box hangs with multiple keyboard languages in Window 7

$
0
0

My VC++ application is a multi-thread .Threads within the application communicate with each other using SendMessage() .

Inside Thread 2 :SendMessage(WM_OPEN_FILE)Inside Thread 1:

ON_REGISTERED_MESSAGE(WM_OPEN_FILE,&CMainFrame::OnFileOpenDlg)

LRESULT CMainFrame::OnFileOpenDlg(WPARAM wParam,LPARAM lParam) 
{
   CFileDialog FileDialog(TRUE, NULL, NULL, OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST,
                            NULL, NULL);
   FileDialog.DoModal() ;	
}


Scenario 1(Single keyboard language) 

  • Thread 2 send message to thread 1 using SendMessage(MSG1).
  • Inside thread 1 inside procedure where we handle MSG1 if we call modal dialog box it opens and behave normally .

Scenario 2(Multiple keyboard language) 

  • Thread 2 send message to thread 1 using SendMessage(MSG1).
  • Inside thread 1 inside procedure where we handle MSG1 if we call modal dialog box it opens but application will become "Not Responding" .

So problem is that when user have multiple keyboard languages modal dialog box (those created as shown in scenario 2) within the application become not responding .This happens only in window 7 not in window XP .


Bikas Tanti


Viewing all articles
Browse latest Browse all 15302

Trending Articles