CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2009
    Location
    Lahore, Pakistan.
    Posts
    10

    Checking application opened (Challenge For Coders)

    Hi,
    can anyone tell me that how can i check,In C++ Code, if the app i am working on is IE Or FireFox ??

    Details:
    I want to make a c++ programe that Once I run it's exe ... and after that when my Ctrl is on IE/FireFox my C++ file prints "Its a browser".
    then let say i minimize IE/FireFox and start working on MS word .. then my Cpp does nothing....
    I basically want to detect when an Internet Browser is running on my computer and my Control is on that browser...

    By Ctrl/Control i mean if IE/Firefox is running on my PC but i am working on MS Word ... then my Ctrl/Control is on MS Word but when i maximize The browser and start working on it then my Ctrl is on the browser ....

    Plz help with brilliant ideas and even code if possible ... someone has given me the challenge ..

  2. #2
    Join Date
    Apr 2004
    Posts
    102

    Re: Checking application opened (Challenge For Coders)

    Possibly use GetForeGroundWindow and extract the text from the title bar to determine if it's IE or Firefox????

  3. #3
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,656

    Re: Checking application opened (Challenge For Coders)

    Quote Originally Posted by adi.shoukat View Post
    Plz help with brilliant ideas and even code if possible ... someone has given me the challenge ..
    Could you please describe that "challenge"?
    Based on the content of all three threads that you have started (socket communication, keyboard hooking and detecting when user works in a brouser), I could make an educated guess. And based on such guess, I don't see why anybody would want to help you.
    Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinWindows - replacement windows manager for Visual Studio, and more...

  4. #4
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: Checking application opened (Challenge For Coders)

    Based on the content of all three threads that you have started (socket communication, keyboard hooking and detecting when user works in a brouser), I could make an educated guess. And based on such guess, I don't see why anybody would want to help you.
    Well, my first thought was about writing malware... with the same conclusion.
    Best regards,
    Igor

  5. #5
    Join Date
    Apr 2009
    Location
    Cochin
    Posts
    83

    Thumbs up Re: Checking application opened (Challenge For Coders)

    I dont write malware on Windows because i love Windows and i like Billgates the most.

    But i hates Linux the most! :X


    so i will learn Linux programming, and writes deadly malwares on it
    "I studied everything but never topped. Today, toppers of the world's best universities are my employees"

    -William Henry Gates (Bill Gates)

  6. #6
    Join Date
    Apr 2008
    Posts
    214

    Re: Checking application opened (Challenge For Coders)

    Could be working on separate programs. Ive been working on a networking program that requires socket communications, and a windows shell which requires keyboard hooking, and i could see wanting to hook into a browser to auto login in which would require me to know when the browser opened or is open.

    so u can use microsoft spy++, WinID from dennisbabkin, or there was another cant remember. But they allow you to retrieve the windows HWND and other information. then you can enumerate through windows and match to what you retrieved or what BobS0327 said is also reasonable to do.

  7. #7
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Checking application opened (Challenge For Coders)

    Quote Originally Posted by zaryk View Post
    Could be working on separate programs.
    Could be, but unlikely. Noticed how the OP didn't respond after 'malware' was mentioned?

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