Windows Registry Hack - Programmer

This is a discussion on Windows Registry Hack - Programmer ; Our company uses a scheduling/calendering program called "OnTime" from OpenText. If someone sets an appointment with an alarm, it will open a notify window sometime before the appointment or scheduled item (user defined). The problem is that when this window ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Windows Registry Hack

  1. Windows Registry Hack

    Our company uses a scheduling/calendering program called "OnTime" from
    OpenText. If someone sets an appointment with an alarm, it will open
    a notify window sometime before the appointment or scheduled item
    (user defined). The problem is that when this window opens, it does
    not open ON TOP of any open apps. The has caused VIP's to miss or
    almost miss important meetings, etc. Is there any registry hack to
    tell this application to open its notify window ON TOP of any open
    apps? I talked with OpenText tech support and they say they have
    received calls asking for this option, but they have no plans to
    introduce this in future editions.

    Thanks in advance for your assistnace.

    Roger J

  2. Re: Windows Registry Hack

    rjohnston@mail.ci.midland.tx.us (Roger Johnston) wrote in message news:...
    > Our company uses a scheduling/calendering program called "OnTime" from
    > OpenText. If someone sets an appointment with an alarm, it will open
    > a notify window sometime before the appointment or scheduled item
    > (user defined). The problem is that when this window opens, it does
    > not open ON TOP of any open apps. The has caused VIP's to miss or
    > almost miss important meetings, etc. Is there any registry hack to
    > tell this application to open its notify window ON TOP of any open
    > apps? I talked with OpenText tech support and they say they have
    > received calls asking for this option, but they have no plans to
    > introduce this in future editions.


    No idea about the registry.

    You could try to get some more information about the alarm window
    using
    Spy++. Then you could write your own program (say with an invisible
    main
    window), which has a timer (say every 5 seconds) that tries to find
    any
    alarm window (EnumWindows/EnumChildWindows). If such an alarm window
    is
    found, the you can try to bring it to top
    (BringWindowToTop/SetForegroundWindow/SetWindowPos).

    Did not do it myself, it's just an idea.

    Here is a piece of code where I do something similar: App1 launches
    App2
    When App1 is closed it tries to close App2 as well.


    int CTest1App::ExitInstance()
    {
    if (WaitForSingleObject(m_hChildProcess, 0) == WAIT_TIMEOUT)
    {
    // child process handle is still valid, i.e. child process has
    // been created and has not been closed yet

    // CloseChildProcess() posts WM_CLOSE to all top-level windows whose
    PID matches m_dwChildProcessId.
    // Here you should use a string as lParam, see comment below.
    // and of course _YOU_ should not do it in ExitInstance ;-)
    EnumWindows(CTest1App::CloseChildProcess,
    (LPARAM)m_dwChildProcessId);
    }
    if (m_hChildProcess)
    {
    VERIFY(CloseHandle(m_hChildProcess));
    }

    return CWinApp::ExitInstance();
    }

    BOOL CALLBACK CTest1App::CloseChildProcess(HWND hWnd, LPARAM lParam)
    {
    DWORD dwID;
    // Here you should use lParam in another sense
    // You could use lParam for a caption, then
    // get the caption of hwnd and compare both strings.
    GetWindowThreadProcessId(hWnd, &dwID);
    if (dwID == (DWORD)lParam)
    {
    // Here you should try to bring it to top instead
    PostMessage(hWnd, WM_CLOSE, 0, 0);
    }
    return TRUE;
    }

    HTH

+ Reply to Thread