Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 12-09-2004, 06:19 PM
jone jone is offline
Senior Member
 
Join Date: Jul 2001
Posts: 456
Default How to make this code running in windows98 or windowsMe ?

I Want to get all instant of IE, and follow this forum I have got this codes to do:

Function GetUrlFromIE (Handle: THandle; List: TStringList): boolean; stdcall;
var
hWndIE, hWndIEChild : HWND;
Buffer : array[0..255] of Char;
begin
//get the window caption
SendMessage(Handle, WM_GETTEXT, 255, integer(@Buffer[0]));

//look for the Internet Explorer window with "Buffer" caption
hWndIE := FindWindow('IEFrame', Buffer);
if hWndIE > 0 then
begin
//try to get a handle to IE's toolbar container
hWndIEChild := FindWindowEx(hWndIE, 0, 'WorkerW', nil);
if hWndIEChild > 0 then
begin
//get a handle to address bar
hWndIEChild := FindWindowEx(hWndIEChild, 0, 'ReBarWindow32', nil);
if hWndIEChild > 0 then
begin
//finally, locate combo box and add its text to the list
hWndIEChild := FindWindowEx(hWndIEChild, 0, 'ComboBoxEx32', nil);
if hWndIEChild > 0 then
begin
SendMessage(hWndIEChild, WM_GETTEXT, 255, integer(@Buffer));
List.AddObject(Buffer,TObject(hWndIE));
end;
end;
end;
end;
//continue enumeration
Result :=True;
end; (*GetUrlFromIE*)

But those codes only in WidowsXP, Who Can help me to do in WinDowsME or WinDows98 ?
Reply With Quote
  #2  
Old 12-10-2004, 05:21 AM
gLes gLes is offline
Senior Member
 
Join Date: Jan 2001
Posts: 2,273
Default RE: How to make this code running in windows98 or windowsMe ?

I believe the classname of the IE window under Win98 should be WorkerA due to the fact that the W in the classname WorkerW ought to refer to the Unicode nature of the window that owns it, and we all know that Win98 isn't actually a Unicode system

Hope that helps...

gLes
Reply With Quote
  #3  
Old 12-12-2004, 02:03 AM
jone jone is offline
Senior Member
 
Join Date: Jul 2001
Posts: 456
Default RE: How to make this code running in windows98 or windowsMe ?

do you mean useing WorkerA , not use WorkerW ? in windowsME or 98 ? it's all thing ?
Reply With Quote
  #4  
Old 12-12-2004, 09:56 AM
gLes gLes is offline
Senior Member
 
Join Date: Jan 2001
Posts: 2,273
Default RE: How to make this code running in windows98 or windowsMe ?

Win9x, incl. Me are not Unicode OSs, A should stand for ANSI, WinNT,2k,XP,2k3 are Unicode OSs, W should stand for Widestring or whatever, I mean I'm sure it's not Widestring, but that makes sense if you are programming in Delphi, but it's definitely related to Unicode Was I clear enough? So under Win98 and Me use WorkerA, under WinNT, 2k, and XP use WorkerW that's the point

gLes
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 02:35 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.