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

C / C++ / MFC

 
GeneralRe: Double buffering in MFC Pin
Anonymous12-Sep-04 11:50
Anonymous12-Sep-04 11:50 
GeneralCDaoDatabase connection string in Windows XP Pin
olis12-Sep-04 5:36
olis12-Sep-04 5:36 
GeneralProcess help Pin
swarup12-Sep-04 4:40
swarup12-Sep-04 4:40 
GeneralToolbar in views Pin
Jens Christiansen12-Sep-04 3:26
Jens Christiansen12-Sep-04 3:26 
QuestionHow can I export my class in "Regular DLL that statically linked MFC"? Pin
Behzad Ebrahimi12-Sep-04 3:20
Behzad Ebrahimi12-Sep-04 3:20 
GeneralDialog in taskbar steals focus from children Pin
PEK12-Sep-04 1:49
PEK12-Sep-04 1:49 
GeneralRe: Dialog in taskbar steals focus from children Pin
Gary R. Wheeler12-Sep-04 2:44
Gary R. Wheeler12-Sep-04 2:44 
GeneralRe: Dialog in taskbar steals focus from children Pin
PEK12-Sep-04 4:55
PEK12-Sep-04 4:55 
Thanks, but I get it same result if I do this:

::MessageBox( m_hWnd, "Bla bla bla", NULL, MB_OK);

I have checked with Spy++ and the handles are set up correctly.

However, I have found a workaround. I handle the WM_SETFOCUS message in the dialog. If the dialog gets focus and the window isn't enabled, it tries to change the focus to the popup window:

LRESULT CDialog2::OnSetfocus(WPARAM wParam, LPARAM lParam)
{
  //Window is not enabled if popup window
  if(!IsWindowEnabled())
  {
    HWND child = ::GetWindow(m_hWnd, GW_HWNDPREV);
    if(child != NULL)
    {
       TRACE(_T("Has child!\n"));
       ::SetFocus(child);
    }
  }

  return 0;
}

I don't like this solution sense I doesn't understand what's going on, but I guess I could live with that.
Generalbackground color Pin
Joerg Warthemann12-Sep-04 1:42
Joerg Warthemann12-Sep-04 1:42 
GeneralGetting the -REAL- printable area of a page Pin
Ernesto D.11-Sep-04 21:48
Ernesto D.11-Sep-04 21:48 
GeneralRe: Getting the -REAL- printable area of a page Pin
Blake Miller13-Sep-04 6:10
Blake Miller13-Sep-04 6:10 
Questionhow to find which port is active? Pin
anuchelvi11-Sep-04 20:55
anuchelvi11-Sep-04 20:55 
AnswerRe: how to find which port is active? Pin
Mad__13-Sep-04 4:49
Mad__13-Sep-04 4:49 
Generalsearching for Nicholl-Lee- Nicholl C or C++ code Pin
gledaoc11-Sep-04 18:26
gledaoc11-Sep-04 18:26 
GeneralRe: searching for Nicholl-Lee- Nicholl C or C++ code Pin
Ravi Bhavnani12-Sep-04 7:16
professionalRavi Bhavnani12-Sep-04 7:16 
Generaldeselecting list ctrl items Pin
Tyrus18211-Sep-04 14:05
Tyrus18211-Sep-04 14:05 
GeneralRe: deselecting list ctrl items Pin
Branislav11-Sep-04 22:32
Branislav11-Sep-04 22:32 
GeneralRe: deselecting list ctrl items Pin
Michael Dunn12-Sep-04 8:49
sitebuilderMichael Dunn12-Sep-04 8:49 
GeneralCreate a flash movie from C++ Windows code Pin
AssemblySoft11-Sep-04 13:59
AssemblySoft11-Sep-04 13:59 
GeneralMouse hook Pin
0v3rloader11-Sep-04 13:26
0v3rloader11-Sep-04 13:26 
GeneralRe: Mouse hook Pin
AssemblySoft12-Sep-04 4:53
AssemblySoft12-Sep-04 4:53 
GeneralRe: Mouse hook Pin
0v3rloader12-Sep-04 5:46
0v3rloader12-Sep-04 5:46 
GeneralCRecordset question. Pin
crimsongrape11-Sep-04 12:46
crimsongrape11-Sep-04 12:46 
General_tscanf oddness Pin
Ravi Bhavnani11-Sep-04 11:39
professionalRavi Bhavnani11-Sep-04 11:39 
GeneralRe: _tscanf oddness Pin
Neville Franks11-Sep-04 12:13
Neville Franks11-Sep-04 12:13 

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.