Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by jtrox

  1. jtrox

    Can't display text in a modeless dialog box when initially displayed

    I understand what you are saying LazyMe - I had the same concerns when I put it there. For some reason though, it doesn't end up creating an endless loop. And I haven't been able to find another place that I could put the function call that works....
  2. jtrox

    How to detect when a dialog-based app is no longer receiving focus

    palbano - Thanks, that actually did help. By overriding the WindowProc function in my dialog class, I am able to handle the WM_ACTIVATEAPP message. Then I can use the modeless window's ShowWindow function to manually display or hide the window as necessary. I then returned the function with...
  3. jtrox

    How to detect when a dialog-based app is no longer receiving focus

    Thanks palbano and LazyMe - I've been playing around with this and haven't made any headway. There is a WM_WINDOWPOSCHANGED message sent, but it isn't unique to the situation when the application is sent to the background. As for the parent window handle, it does appear that the parent of my...
  4. jtrox

    How to detect when a dialog-based app is no longer receiving focus

    I have a dialog-based app that can launch a modeless dialog and several other modal dialogs (although only one of the modal dialogs at a time). If another application is brought up, the modal dialog boxes are automatically moved to the background. However, the modeless dialog stays on top of...
  5. jtrox

    Can't display text in a modeless dialog box when initially displayed

    Thanks everyone. LazyMe is right - nothing I add to the OnShowWindow function is displayed. So I went ahead and added the following code to my OnPaint function: void CDefDlg::OnPaint() { // Get a pointer to the static text dialog CWnd* pWnd = GetDlgItem(IDC_TEXT) CString blkspace =...
  6. jtrox

    Can't display text in a modeless dialog box when initially displayed

    Sorry - forgot to mention that textRect is calculated to be centered vertically within the clientRect area.
  7. jtrox

    Can't display text in a modeless dialog box when initially displayed

    PencilBiter - It does seem convoluted. This modeless dialog is created at the start of the app and exists the entire time. When the user closes it, I hide the dialog with the (SW_HIDE) flag, and when they launch it I use the (SW_SHOW) flag. That's why I'm using the WM_SHOWWINDOW event. I...
  8. jtrox

    Can't display text in a modeless dialog box when initially displayed

    I have a modeless dialog box with a listbox control and a static control. When the dialog box is shown initially, I have a handler in place for the WM_SHOWWINDOW message to select the first item in the listbox, and then display the appropiate text corresponding to that item in the static...

Part and Inventory Search

Back
Top