Click here to Skip to main content
15,906,624 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: the size of CScrollView's scrollbar Pin
Roger Allen27-Feb-04 6:16
Roger Allen27-Feb-04 6:16 
Questionhow to create Tool bar using MFC dialog Pin
Anonymous27-Feb-04 4:17
Anonymous27-Feb-04 4:17 
AnswerRe: how to create Tool bar using MFC dialog Pin
Prakash Nadar27-Feb-04 4:45
Prakash Nadar27-Feb-04 4:45 
AnswerRe: how to create Tool bar using MFC dialog Pin
Shog927-Feb-04 5:27
sitebuilderShog927-Feb-04 5:27 
QuestionWhat should I do to use SSTab control activeX in VC++ ? Pin
Qadddd27-Feb-04 4:06
Qadddd27-Feb-04 4:06 
GeneralNeed help with HTMLView Pin
RedDragon2k27-Feb-04 3:10
RedDragon2k27-Feb-04 3:10 
GeneralRe: Need help with HTMLView Pin
Ravi Bhavnani27-Feb-04 6:16
professionalRavi Bhavnani27-Feb-04 6:16 
GeneralRe: Need help with HTMLView Pin
RedDragon2k27-Feb-04 6:44
RedDragon2k27-Feb-04 6:44 
GeneralRe: Need help with HTMLView Pin
Ravi Bhavnani27-Feb-04 7:04
professionalRavi Bhavnani27-Feb-04 7:04 
GeneralRe: Need help with HTMLView Pin
Neville Franks27-Feb-04 11:26
Neville Franks27-Feb-04 11:26 
GeneralMinor errors in OLE DB Pin
misha_grewal27-Feb-04 2:48
misha_grewal27-Feb-04 2:48 
GeneralRe: Minor errors in OLE DB Pin
Prakash Nadar27-Feb-04 4:03
Prakash Nadar27-Feb-04 4:03 
GeneralRe: Minor errors in OLE DB Pin
misha_grewal27-Feb-04 4:09
misha_grewal27-Feb-04 4:09 
Generalfile date time stamps Pin
ByNar27-Feb-04 2:36
ByNar27-Feb-04 2:36 
GeneralRe: file date time stamps Pin
David Crow27-Feb-04 5:17
David Crow27-Feb-04 5:17 
GeneralGetAdaptersInfo with windows NT Pin
Aviv Halperin27-Feb-04 2:25
Aviv Halperin27-Feb-04 2:25 
GeneralGrabbing text from Window document Pin
Kashif Ali24527-Feb-04 1:47
sussKashif Ali24527-Feb-04 1:47 
GeneralRe: Grabbing text from Window document Pin
David Crow27-Feb-04 5:22
David Crow27-Feb-04 5:22 
GeneralModeless Dialog in DLL Pin
paul hoshovsky27-Feb-04 1:23
paul hoshovsky27-Feb-04 1:23 
GeneralRe: Modeless Dialog in DLL Pin
Prakash Nadar27-Feb-04 4:34
Prakash Nadar27-Feb-04 4:34 
GeneralRe: Modeless Dialog in DLL Pin
paul hoshovsky2-Mar-04 1:50
paul hoshovsky2-Mar-04 1:50 
Thank you for your suggestion.

It got me thinking about the dialog style. In the main exe where I have a number of modeless dialogs, I set the dialog style to include control. This has the effect in the main exe of allowing the tab key to move between the controls on any modeless dialog. When the last control is exited (loses focus), the dialog style causes the tab key to move out of the current modeless dialog and enter the next modeless dialog.

But in the case of the DLL, this was not correct. The solution turned out to be to clear the dialog style settings and leave only the Visible checked.

Once I solved this small hitch (like two days later), I then discovered that while the tab key works properly inside the modeless Dialog created by the DLL, the effect of leaving the DLL was disabled. This was because the control style was not set.

In the end, I settled for raising an event (i.e. callback) on one of the controls in the DLL that changed the focus to a control in the main app.

in the following example, MyModeless was the hWnd returned from the DLL for the dialog


BOOL CMainEXEApp::PreTranslateMessage(MSG* pMsg)
{
if (TheView->MyModeless!=NULL)
{
if (IsDialogMessage(TheView->MyModeless, pMsg))
return TRUE;
}
return CWinApp::PreTranslateMessage(pMsg);
}
void CMainEXEApp::ChangeTabOrder( void * pPointer)
{
if (pPointer ==NULL)
{
SetFocus(TheView->GetDlgItem(IDC_BUTTON2)->m_hWnd);
}
}

Thanks for the response

paul
GeneralDetecting Keyboard Input in Console Application Pin
Tomaz Rotovnik27-Feb-04 1:11
Tomaz Rotovnik27-Feb-04 1:11 
GeneralRe: Detecting Keyboard Input in Console Application Pin
Selvam R27-Feb-04 1:19
professionalSelvam R27-Feb-04 1:19 
GeneralRe: Detecting Keyboard Input in Console Application Pin
catngo27-Feb-04 19:24
catngo27-Feb-04 19:24 
GeneralSorting an array with pointers Pin
hollowsoft27-Feb-04 0:52
hollowsoft27-Feb-04 0:52 

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.