?
Solved

Getting the url from IE or Netscape

Posted on 2000-04-15
2
Medium Priority
?
175 Views
Last Modified: 2010-04-10
Hi !
I want to develop an app. in which i will use a indefinite thread. this thread will woke up after every 2000 millisecondd and find out is there any netscape or ie window open. if yes ! then this app. will retreive the url from the browser and store it into a text file.

I want to know how can i get the url from browser.

Notes: this app. will start as soon as user logs on his computer and start working in background.
0
Comment
Question by:sun307
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
Toad224 earned 400 total points
ID: 2719133
This will find if the browser window is open.

FindWindow("IEFrame", NULL)

it will return a non 0 value if the browser is open, and a 0 value if it is not open.

This will detect the URL that the user is currently at:

HWND Wnd = FindWindow("IEFrame, NULL);
HWND Worker = FindWindowEx(Wnd, 0, "WorkerA", NULL);
HWND ReBar = FindWindowEx(Worker, 0, "ReBarWindow32", NULL);
HWND Combo = FindWindowEx(ReBar, 0, "ComboBoxEx32", NULL);
HWND ComboBox = FindWindowEx(Combo, 0, "ComboBox", NULL);
HWND Edit = FindWindowEx(ComboBox, 0, "Combo", NULL);

int Len = GetWindowTextLength(Edit);
LPSTR Str = new char[Len + 1];
GetWindowText(Edit, Str, Len + 1);


The URL will be returned in Str.
0
 
LVL 2

Author Comment

by:sun307
ID: 2721611
Thanx toad !
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question