|
Yes, and sometimes it's zero.
|
|
|
|
|
What URL are you using? I just tried it with a few and get_length() returned the correct value.
"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
|
|
|
|
|
I am testing with "flightcenter.co.uk" and "google.com". The first one returns some URLs while the second doesn't return any !!
|
|
|
|
|
Mohammed Tarik wrote: The first one returns some URLs while the second doesn't return any !!
Do the anchors have a name or id attribute?
"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
|
|
|
|
|
No, the URLs returned were strange and I couldn't even find their corresponding anchors. They were like "javascript:submitCJ10.....http://somesite"
As you can see from
hr = pColl->item(vIndex, vIndex, &pDisp2);
I am not trying to put any constraints on the returned URLs.
|
|
|
|
|
Mohammed Tarik wrote: No...
get_anchors() only returns those that do.
"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
|
|
|
|
|
So, in order to return all the links on a page regardless of name or id attributes, I have to write my own code? Do you know of any other function that can do this?
Thanks a lot for your help
|
|
|
|
|
I found that get_links can do it.
Thanks again.
|
|
|
|
|
Doesn't that return LINK and AREA elements?
"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
|
|
|
|
|
Well, at the beginning of my first post, I mentioned that I need to get all links on a web page. I chose get_anchors() because I found a sentence mentioning it in one of CP articles where the author said that it is used to get hyperlinks.
I guess that get_links() would do a better job for me after some processing.
Sorry for the inconvenience.
|
|
|
|
|
Hi,
How can I get the all connected harddrive to my pc and logical drive name corresponding to physical drive?
I think WMI can help me right?, if yes please help mw with any suitable link.
|
|
|
|
|
Fedrer wrote: How can I get the all connected harddrive to my pc and logical drive name corresponding to physical drive?
Use GetLogicalDriveStrings() .
"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
|
|
|
|
|
Not quite a newbie, but just how do you have the system shell open your application on right click->open?
This of course assumes you already associated that file type to your application.
Someone please enlighten me.
Thanks:
|
|
|
|
|
I am not sure I understand your question properly. How does it matter if you right click and open a file or you double click and open a file?
If I got your question right, do have a look at ShellExecute()[^]
|
|
|
|
|
Okay,
Say I wrote an application to view jpeg bitmaps. Then I tell windows to open jpeg files using my application by going into explorer, right click on a jpeg file choose properties, then click "Opens with" ---> change. Set to myApp.exe as associating executable. Now, let's suppose after doing this when I double click or right click--> open, myApp executes... But guess what? Where's the bitmap?
There is something missing... You need at the very least, some means to pass the file path info to myApp. As a command argument ?? A pointer to file structure?? As a shellexecute parameter , But wait, shell execute is only useful if all you're interested in is to run another application from within your program. You would then have to write a shell helper that attaches to explorer, but this seems far too much overkill to me. I'm missing something here, so I'm hoping some MSVS C++ gurus out there could help me get to an answer quicker. As I said, I'm not a newbie-just point me in the right direction.
|
|
|
|
|
The file path is passed as a command-line parameter to your app.
You need to retrieve that filename and open/render the file.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks for the tip.
I'm looking at CCommandLineInfo class right now... Think I'll have this solved in no time.
|
|
|
|
|
I don't know what you're asking for, anyway have a look at Michael Dunn's series on writing shell extensions [^].
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]
|
|
|
|
|
Who the hell is voting us both down.
|
|
|
|
|
Choose an option, my friend:
(1) Somebody pretending we've the CPMRU s fully charged.
(2) A poor troll who doesn't know the power of cross balancing.
(3) Maybe ours were really poor answers.
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]
|
|
|
|
|
Introduction to File Associations[^]
AlmodJ wrote: This of course assumes you already associated that file type to your application.
Are you just having trouble getting the path from the command line in your application?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Sounds like you're missing the %1 part of the command.
Here's a pair of .reg files that show two entries from my context menu.
One of them controls the behaviour of right-click, Open (on zip files)
While the other adds a new entry to the context menu for EXE files.
Open zip files with WinRar (works for double click too)
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\WinRAR.ZIP\shell\open\command]
@="\"C:\\Program Files\\WinRAR\\WinRAR.exe\" \"%1\""
Scan exe files with PEiD - adds a new entry to the context menu
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\exefile\shell\Scan with PEiD\command]
@="\"C:\\Program Files\\Universal Extractor\\bin\\peid.exe\" \"%1\""
|
|
|
|
|
Hi,
Does anyone know how to set the text on the Finish button WITHOUT it hiding the 'Back' button?
It is hidden when I call SetFinishText().
TIA
Tony
|
|
|
|
|
Use SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH);
|
|
|
|
|
Hi,
Thanks for the speedy reply. I already call
SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH);
in my code but when I add the call to SetFinishText() it still hides the 'Back' button. This is documented in the MSDN implying that its by design but I am not so sure - I mean why would you want to hide the Back button when you change the text on the Finish button?
|
|
|
|