[sword-devel] SwordReader PocketPC and SmartPhone CAB files.

SonWon sonwon.1 at gmail.com
Mon Jul 7 19:15:56 MST 2008


Not sure if this is useful since it is pure Win32.

Try this out, call in WinMain():

TCHAR g_szClassName[11] = TEXT("App name here");    // Main window class 
TCHAR g_szTitle[11] = TEXT("Window name here");        // Main window name

        function to set the focus back to the main window
HWND SetFocusToApp()
  HWND hWnd = NULL;
  // Check if the application is running. If it's running then focus on 
the window.
  hWnd = FindWindow(g_szClassName, g_szTitle);
    // Bring to front if running
    return hWnd;

Code snip it for WinMain()

  HWND hWnd = SetFocusToApp();  
    return 0;

David Trotz wrote:
>> Another thing to sort out.  If I exit SwordReader using the exit 
>> menuitem, it's OK.  If I exit using the close button, as you know, 
>> Windows Mobile leaves the program running in the background.  When I try 
>> to re-start SwordReader, another instance opens, and won't run properly 
>> because the module files are already open in the first instance.
> I must not be registering the window correctly with the OS. This should
> be an easy fix.
> --
> David
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page


I choose God and all that my choice entails in this life even unto death and look forward to the new life that will come.

More information about the sword-devel mailing list