|
I used This code for get the Text from Internet Explorer . Use IHTMLDocument::OnClick() and IHTMLDocument::MouseUp() Message for Mouse Event . I used Popupblocker code for Implementing my application . But On Some pages like http://search.webdunia.com and hindi.webdunia.com
On That pages I am not able to get Invoke function So I am not getting Text So pls help me out To resolve me problem. in OnDocEventHandler Function.
IHTMLDocument2 * pDoc;
m_pBrowser->get_Document((IDispatch**)&pDoc);
CComQIPtr<IHTMLSelectionObject> pSel;
CComQIPtr<IHTMLTxtRange> pRange;
HRESULT hr = pDoc->get_selection( & pSel );
if (hr || (!pSel) )
return E_FAIL;
hr = pSel->createRange((IDispatch **)&pRange);
if (hr || (!pRange))
return E_FAIL;
CComBSTR bstrText;
pRange->get_text(&bstrText);
dabara
|
|
|
|
|
I want to do the following:
1. use Image/Bitmap to load a image file
2. decorate it, for example, put another small image on it
3. when save, overwrite the original one using the decorated one
The problem is that, when save the file format should keep the same, how to solve the problem?
I find it is even hard to get the file type (eg. gif, jpeg , tiff...) via an Image/Bitmap object.
|
|
|
|
|
|
Hi all,
I am wondering if there is a way to use FaceID icon to a dialog box?
I tried to do the following in my dialog's OnInitDialog() :
HICON hIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(540));
this->SetIcon(hIcon, FALSE);
"540" is FaceID number of a commandbar button icon. Apparently it did not work as the ID did not point to the wanted resource in the dialog project.
Any help would be really great. Thanks!
|
|
|
|
|
J.B. wrote: Apparently it did not work...
What does LoadIcon() return? Have you tried making hIcon a member variable instead?
What happens if you use:
hIcon = AfxGetApp()->LoadIcon(540);
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Dear DavidCrow,
Thanks for the reply. LoadIcon() returns NULL . I should give more details about my project. The dialog is ATL-based class which is to be brought up via DoModal() . A window-based parent may decide to bring up the dialog at any time. Since the dialog is ATL based (derived from CAxDialogImpl class). The way I use to call LoadIcon in the dialog's OnInitDialog() is in fact:
HICON hIcon = LoadIcon((HINSTANCE)GetModuleHandle(NULL), MAKEINRESOURCE(540));
if (NULL != hIcon)
this->SetIcon(hIcon);
I get hIcon is NULL in return. Am I doing something incorrectly here?
Thanks!
|
|
|
|
|
J.B. wrote: Am I doing something incorrectly here?
Are you calling GetLastError() to find out why?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yes, the return code is 1813 (The specified resource type cannot be found in the image file ).
Perhaps the resource just isn't available for access without explicitly loading from the actual resource DLL?
Thanks for the help anyway
|
|
|
|
|
J.B. wrote: Perhaps the resource just isn't available for access without explicitly loading from the actual resource DLL?
Where else would it come from?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
That's exactly right. I naively thought it is as that's what I was able to do with Visual Studio Automation and Extensibility methods. I simply looked up the face ID and specified it in a method, say AddCommandBar2() (Commands ojbect, EnvDTE namespace). And the icon I picked would appear accordingly. I initially hoped the FaceID resource is somehow accessible globally.
This is embarassing Thanks for the help to clearing this out
Reference:
FaceID Browser[^]
|
|
|
|
|
Hi,
How can I appear the default context menu and property in my application?
|
|
|
|
|
create popup menu and associate with right click event, search CP for Popmenu, theer N number article present dealing with it.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
Hi alreay have a context menu in my application but I want the windows context menu as I click on my menu item.
|
|
|
|
|
This is hopefully a basic question but it's been a VERY long time since I used C++ and I just need to know how I can get a file extension from a path and compare to constant extension.
I have an input:
LPCWSTR pwszPath
and a constant:
WCHAR MY_EXT[4] = L".me";
I need to know if pwszPath ends with MY_EXT but I can't think how to do it..
Any help would be great!
|
|
|
|
|
__DanC__ wrote: I need to know if pwszPath ends with MY_EXT but I can't think how to do it..
Use PathFindExtension .
Matching extension will somewhat look like this...
bool MatchExtension( LPCTSTR lpctszMyPath, LPCTSTR lpctszChkExt )
{
ASSERT( lpctszMyPath && lpctszChkExt );
LPCTSTR lpctszExt = PathFindExtension( lpctszMyPath );
return ( lpctszExt && _tcscmpi( lpctszExt + 1, lpctszChkExt ) == 0 );
}
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
modified on Wednesday, July 2, 2008 5:06 AM
|
|
|
|
|
That was exactly what I was looking for! Thanks!
|
|
|
|
|
__DanC__ wrote: That was exactly what I was looking for! Thanks!
I've modified my reply a bit.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
What about PathFindExtension [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
too late buddy
|
|
|
|
|
Indeed: bits flow very slowly from Italy this morning .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
Quote:
bits flow very slowly from Italy this morning
Bits? or Thoughts? :P
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I don't know (maybe bits of thougths? ).
BTW apparently the same happens from Germany...;P (this thread is a bit dated)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yeah, I am having quite things to do and less time to do them, I am a bit away from keyboard
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I am working on an existing application in VC 6.0 MFC, there are a few call in the application, which takes a very long time, I am working on placing some progress indication (play avi)on the status bar. Since there are many calls in the applicaion which takes very long, I thought of createing a thread for playing AVI file on the status bar. And the first statement of the time consuming funcions will be call to the progress indication thread. ( I dont want to place the time consuming funcion itself in thread, since there are many, I am looking for a simple solution)
Please comment advantage and disadvantage in following this method, and also suggest/advice me some good approch in doing so
|
|
|
|