Click here to Skip to main content
15,910,471 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralText File Update Pin
gemini6521-Dec-04 23:05
gemini6521-Dec-04 23:05 
GeneralRe: Text File Update Pin
naren-vc22-Dec-04 0:12
naren-vc22-Dec-04 0:12 
GeneralRe: Text File Update Pin
David Crow22-Dec-04 2:47
David Crow22-Dec-04 2:47 
GeneralRe: Text File Update Pin
gemini6524-Dec-04 23:53
gemini6524-Dec-04 23:53 
GeneralRe: Text File Update Pin
David Crow28-Dec-04 2:54
David Crow28-Dec-04 2:54 
Generalabout pasting and the GetClipboardSequenceNumber Pin
Filomela21-Dec-04 21:13
Filomela21-Dec-04 21:13 
GeneralShellExecute add\remove programs Pin
Eran_Co21-Dec-04 20:43
Eran_Co21-Dec-04 20:43 
QuestionControlling an opened browser/Getting data from it? Pin
VCProgrammer21-Dec-04 20:36
VCProgrammer21-Dec-04 20:36 
Hi,
My name is Michael. I am trying to find a way I can print out an opened browser's x,y,width and length coordinates (like I can with a regular mainframe using the CWnd::GetWindowRect function call). I also want to do other things like count how many images are currently in the browser and get each x,y,width and length from all the images.

What I tried doing was use a loop with a CWnd pointer called wnd that was initialized to point at 'this' (the program's dialog box) before the loop started. Then, I used..

wnd = wnd->GetNextWindow(GW_HWNDPREV);

to point at previous windows in the memory bank, stored the name of each window on a string and kept getting previous windows until ::IsWindow(wnd) was false or until the string "- Netscape" was found within the string. Then I used another loop with...

wnd = wnd->GetNextWindow(GW_HWNDNEXT);

in it instead (to get next windows). Then, when the computer finally found the pointer to any Netscape Browser that was opened, the loop would then terminate. I then used

wnd->GetWindowText(str);
AfxMessageBox(str);

to test it out and it worked! but when I used

wnd->GetWindowRect(size);

I would get some strange numbers until I either minimized or maxamized the browser. Then I would get 0, 0, 600, 800 when the browser was minimized and a constant values between 0 and 600 (for x), 0 and 800 (for y), 0 and 600 (for width), 0 and 800 (for height) and no matter if I resize the browser window, I would get the same numbers. Also, SetWindowText wouldn't work. I found out I need to use something like...

CComPtr<iwebbrowser2> browser;
CComPtr<iserviceprovider> isp;

but I don't know how to use these.

Thank you for any help,
Michael S. Lowe




Michael S. Lowe
QuestionHow to change the Menu Color using C++? Pin
pubududilena21-Dec-04 20:17
pubududilena21-Dec-04 20:17 
GeneralTone/pulse detection Pin
aesthete21-Dec-04 20:07
aesthete21-Dec-04 20:07 
GeneralRe: Tone/pulse detection Pin
Blake Miller22-Dec-04 5:47
Blake Miller22-Dec-04 5:47 
GeneralRe: Tone/pulse detection Pin
aesthete22-Dec-04 19:17
aesthete22-Dec-04 19:17 
GeneralBitmap in MSAccess OLE Object Pin
FLDev200521-Dec-04 20:05
FLDev200521-Dec-04 20:05 
GeneralEnquiry Pin
max_gundam1521-Dec-04 19:54
max_gundam1521-Dec-04 19:54 
GeneralRe: Inquiry Pin
David Crow22-Dec-04 2:55
David Crow22-Dec-04 2:55 
GeneralTelephone to modem communication Pin
aesthete21-Dec-04 19:34
aesthete21-Dec-04 19:34 
GeneralRe: Telephone to modem communication Pin
Antti Keskinen22-Dec-04 14:34
Antti Keskinen22-Dec-04 14:34 
QuestionHow to get the the total number of day within one month using CTime Pin
LiYS21-Dec-04 19:32
LiYS21-Dec-04 19:32 
AnswerRe: How to get the the total number of day within one month using CTime Pin
User 665822-Dec-04 1:30
User 665822-Dec-04 1:30 
GeneralHigh resolution Timer Pin
DavidR_r21-Dec-04 19:08
DavidR_r21-Dec-04 19:08 
GeneralRe: High resolution Timer Pin
Arsalan Malik21-Dec-04 22:16
Arsalan Malik21-Dec-04 22:16 
GeneralRe: High resolution Timer Pin
Jon Hulatt21-Dec-04 22:30
Jon Hulatt21-Dec-04 22:30 
GeneralRe: High resolution Timer Pin
David Crow22-Dec-04 3:25
David Crow22-Dec-04 3:25 
GeneralHelp reqd with Serialization Problem! Pin
Ravdeep21-Dec-04 18:49
Ravdeep21-Dec-04 18:49 
GeneralModeless Propertysheet Pin
lisoft21-Dec-04 18:01
lisoft21-Dec-04 18:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.