CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    4

    How to switch between windows

    I receive data from the network and the basis of some ID in the data received i have to maximize an already running session of a program, process the data, possibiliy send some data back over the network and then minimize the window. There will be 4 such sessions running and will have to be maximized and minimised on the basis of the ID. The session will come up when the system is started and will go down when the system goes down. The working environment will be Windows 95 or 98 or NT.


  2. #2
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: How to switch between windows

    Each session (instance of the program) will have to set its main window title to something unique - for example, "Such-And-Such-An-App:ID=01", "Such-And-Such-An-App:ID=02", "Such-And-Such-An-App:ID=03" and "Such-And-Such-An-App:ID=04". You would then need to use FindWindow() to find the window with that string, and then you can activate the instance or send it data. You can call ActivateFrame() on the window pointer returned from FindWindow().

    Does this help?


    --
    Jason Teagle
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured