|
|
Another CodeProject article on it here. This was the option 2 I was talking about.
Steve
-- modified at 5:11 Tuesday 17th January, 2006
Link in article is wrong, try this instead.
|
|
|
|
|
Hi Steve,
Thanks a lot for reply. Your code and method seems to be very helpful to me.
Thanks again for rugent reply !.
Regards,
Hemant Kulkarni.
|
|
|
|
|
Sir ,
As i m having the VS c++ 6.0 version where there is not the prototype for the IHtmlElementRender interface in the Mshtml.h file so is there any other way out of this.
Regards
Shikha
|
|
|
|
|
With the SDK that comes with MSVC6 the declaration is not present. In the Feburary 2003 Platform SDK it's present. You need to download a newer Platform SDK from Microsoft. Download from here[^]. You can use this SDK with MSVC6.
Steve
|
|
|
|
|
A more easy task
copy the Web pages to a folder
the select from the view thumbnails
and then use print screen to store the image
this can make ur work fast
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
I'm trying to send mouse message to a application programmatically . I use win32 API SendMessage() to MS Paint (just 4 a test) to draw : SendMessage(hwnd_paint,WM_LBUTTONDOWN,0,position). There was no error but nothing happened. Is there something wrong ?
|
|
|
|
|
1. Manually do the mouse event and using spy++ try to find out the appropriate values of LPARAM and WPARAM
2. After a lbuttondown message, also post a lbutton up message.
Regards,
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
To fake input you should use the SendInput function. See here for details (talks about keyboard input but a lot of what is mentioned still applies).
Steve
|
|
|
|
|
|
I used Spy++ to get parameter, and try to SendMessage. But it dosent work. I cant understand what happened ????
|
|
|
|
|
|
Using SendMessage or PostMessage message may or may not work, it depends on the program. As I mentioned the SendInput API is specifically designed for faking input. Here are some reasons the SendMessage /PostMessage technique may not work:
- The program calls the GetMessagePos to get the coordinated of the mouse when a message was posted.
- The program calls the GetAsyncKeyState to check for mouse buttons.
In short, the SendMessage /PostMessage may work, but then again it may not: it depends on how the program performs its input.
Steve
|
|
|
|
|
In my Project, i'm having 2 applications. i need to send and receive messages between the two applications. The first application should wait until it gets an acknowledgement from the second after sending the message. If i use WaitForSingleObject function, how can i carry this out? Please help....
|
|
|
|
|
|
|
|
Hello Owner drawn. As I said in my original message (the link), I don't receive such message! I don't know why :- ). I think I should, but I don't. As I said, it's a window created like this:
hwndControl = CreateWindowEx //Creating the window.
(
NULL, //ExStyles.
"Static", //Class name.
Text, //Text of the label.
WS_CHILD | SS_CENTER, //Styles.
0, //X.
0, //Y.
100, //Width.
30, //Height.
hwndThis, //Parent, a WS_POPUP window.
NULL, //Menu.
(HINSTANCE)hwndThis, //The handle of that WS_POPUP window which contains this one.
NULL //CreateStruct.
);
So it's a static label control... and it centers the text... but I can't change the background. So then I guess my question becomes, WHY DOESN'T IT RECEIVE WM_CTLCOLORSTATIC...
Weird!
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
The parent of the static control recieves the WM_CTLCOLORSTATIC message (the window identified by hwndThis in your code).
Steve
|
|
|
|
|
Yes. You are indeed correct, I don't know how I missed this *confused*. The fact is that I wrote all window procedures and I think I got a bit mixed up between them. Thank you both ::- ) Stephen and Owner drawn.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Axonn Echysttas wrote: WHY DOESN'T IT RECEIVE WM_CTLCOLORSTATIC
As steve said where are you writing this code. It should be written inside the wndproc of the parent that holds the static control.
Jesus Loves <marquee direction="up" height="40" scrolldelay="1" step="1" scrollamount="1" style="background:#aabbcc;border-bottom:thin solid 1px #6699cc">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Yeap, both color changing and text colors changing work now. Thank ya! ::- ).
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Ok the problem is a lil strange, i am all confused how the hell is this possible, lemme explain with an example...
void Test()<br />
{<br />
CComBSTR bstrOne("abc");<br />
{<br />
CComBSTR bstrTwo("xyz");<br />
}<br />
AfxMessageBox(CString(bstrOne));<br />
}
Now this is what happens sometimes.. when the destructor of bstrTwo is called it calls ::SysFreeString( m_str ) and this free's the string of bstrOne. I have checked the address passed to ::SysFreeString it is the address of bstrTwo.m_str , i just dont understand how the string at bstrOne.m_str is freed. If anyone can explain me this. One more thing it doesn't always happens this way.. It just happens when i copy data on clipboard. The only special thing i am doing is that i have written a custom COM component to handle my Clipboard requests. This actually happens in that code. I understand there is some problem with my code.. but what i dont understand is how does ::SysFreeString(something) frees something else.
:-> WHATEVER :->
|
|
|
|
|
Did you simplify the problem or does it really happen with code that simple?
Steve
|
|
|
|
|
Well actually i simplified it alot.. there are many lines of code there of course. What i am really curious about was that i pass some address X to the SysFreeString and it just frees the string at address Y. I have check the addresses in Memory View and they are different. I am just all confused. The behaviour is consistent in one way, if i have 2 string it will always free the string1 when asked to destroy string2.
|
|
|
|