|
Did you receive my source code ??
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
If you did not receive what i send you
download zip file at
http://forums.about.com/n/pfx/forum.aspx?msg=19194.8&nav=messages&webtag=ab-delphi
with the .lnk file inside
|
|
|
|
|
Good, Now I understand your problem.
As far as I know
1) You create this .lnk file problematically, Manually it is not possible.
2) If Internet explorer and Mozilla is not open than click this link it will not open.
I did the same mistake in one of my project that's why I know this issue.
If I am right than create shortcut using "IUniformResourceLocator". .url file is created and with the help of IUniformResourceLocator you can get the correct path.
I am also getting a null string in my project because it is not a correct .lnk file.
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
But windows properties (right mouse click) shows it is a legal
.lnk file
so now can you post a few line of code to GET THE STRING FROM IT?
And i thought i am wrong and do not know
what i am doing.
P.S I did note create this link an installation program did
and it is a legal link file
|
|
|
|
|
limelect wrote: I did note create this link an installation program did
and it is a legal link file
That is what I want to say you that manually this .lnk is not created.
Okie first create a shortcut of any file in your program and than change the target manually to http://www.codeproject.com. It will not allow you.
limelect wrote: so now can you post a few line of code to GET THE STRING FROM IT?
Google IUniformResourceLocator (GetURL) and try to create one project and check if it is working. (I am not sure it is working but you can try it).
limelect wrote: And i thought i am wrong and do not know
what i am doing.
Are you telling me that I am wrong or you understand what I wanna say ??
My suggestion: try to create url shortcut programatically with IUniformResourceLocator not with the help of installer.
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
well Ok by the time i got your message
i did some research and found even in my librery
GETurl and SETurl using
const
CLSID_InternetShortcut: TGUID = (
D1:$FBF23B40; D2:$E3F0; D3:$101B; D4 84,$88,$00,$AA,$00,$3E,$56,$F8));
IID_IUniformResourceLocatorA: TGUID = (
D1:$FBF23B80; D2:$E3F0; D3:$101B; D4 84,$88,$00,$AA,$00,$3E,$56,$F8));
SID_IUniformResourceLocatorA = '{FBF23B80-E3F0-101B-8488-00AA003E56F8}';
and so on but even that DOSE NOT work
I have so much source on the matter (using IUniformResourceLocator) i did not know.
But since this .lnk file become an obsession proffesionaly
i will have to look even closer on the matter.
As for you, you have done more then enough and i appreciate it
You are the only one given a serious response and i thank you.
I think i am on my own now since nothing worked on the above file
and i will see what to do
If i will have good news i will let you know
And thanks again
P.S if you will happen to make a test application for that specific file let me know
|
|
|
|
|
limelect wrote: As for you, you have done more then enough and i appreciate it
You are the only one given a serious response and i thank you.
I think i am on my own now since nothing worked on the above file
and i will see what to do
If i will have good news i will let you know
And thanks again
You are most welcome.
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
The IShellLink specifically states that it cannot be used to create URL shortcuts. The Windows Scripting host is the vehicle for creating them, but I am not sure how to invoke WSH features from C++. However, if you open a URL link with Notepad (or your favourite editor) you will see that it is a simple text file, so you can get the information directly from reading it via any of the stream or file functions.
The best things in life are not things.
|
|
|
|
|
NO sir NO URL !!!!!! link
but .lnk link
In my search for an answer EVERYBODY
makes the same mistake
You are right .URL is text.
But i am talking about .LNK
I have such a file that with its properties
one can see the http://........ STRING
I wander if the community dose not know that?
It seem to me that no one have an answer
since i posted the problem on at list 4 forums
If you want i can send you the file to see.
|
|
|
|
|
OK, I have just created a shortcut with a URL as target (in Windows 7), and it is the same as I described above: a text file of the format:
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
URL=http://support.dell.com/
IDList=
Try opening your file in Notepad to see what its contents look like.
The best things in life are not things.
|
|
|
|
|
See above communication with SP 24
URL is text
the problem is with .lnk
which is NOT TEXT!!!!
|
|
|
|
|
Did you look inside the file like I suggested?
The best things in life are not things.
|
|
|
|
|
|
But that message just links back here, so it adds nothing to the discusion.
The best things in life are not things.
|
|
|
|
|
|
|
I have a problem into gather information into CStringArray reference :
first , I define a CMap object :
CMap<CString,LPCTSTR,CStringArray*,CStringArray*> m_mapType;
and I insert a new element :
CString sTemp = _T("test value");
CStringArray* psaTest = new CStringArray;
psaTest->Add(sTemp);
m_mapType[_T("index")] = psaTest;
psaTest->RemoveAll();
delete psaTest;
and when I try to read this element :
CStringArray* psaRes = new CStringArray;;
if(m_mapType.Lookup(_T("index"),psaRes))AfxMessageBox("Found index");
else AfxMessageBox("Not found");
if(psaRes->GetSize())AfxMessageBox(psaRes->GetAt(0));
else AfxMessageBox("Empty psaRes");
delete psaRes;
my code says that I found CMap element , but psaRes is empty , why ? Because I put wrong CStringArray reference in Lookup method ?
Thank you .
P.S.
I put here entire code , because I try above code in the same place :
CString sTemp = _T("test value");
CStringArray* psaTest = new CStringArray;
psaTest->Add(sTemp);
m_mapType[_T("index")] = psaTest;
psaTest->RemoveAll();
delete psaTest;
CStringArray* psaRes = new CStringArray;;
if(m_mapType.Lookup(_T("index"),psaRes))AfxMessageBox("Found index");
else AfxMessageBox("Not found");
if(psaRes->GetSize())AfxMessageBox(psaRes->GetAt(0));
else AfxMessageBox("Empty psaRes");
delete psaRes;
|
|
|
|
|
Your CMap holds the pointers to CStringArray. You should enure that those pointers are valid till you retrieve them from map. Here you are deleting CStringArray pointers after inserting them to map. Obviously you will not get what you actually inserted. Delete the pointers only when the map is no longer needed.
|
|
|
|
|
Let's say that somewhere I serialize the map object , how can I retrieve CStringArray values ? Because there I simulate something like that.
|
|
|
|
|
CMap is derived from CObject, thereby Serialize method is there. I am not pretty sure what will happen if the map members are pointers, i mean whether the data it points to get serialized or the pointer itself. However its just a matter of a test app to verify the case. 
|
|
|
|
|
You are putting a pointer to a CStringArray in your map, which means that it always points to the same instance of CStringArray that you were originally using (it's not a copy). And you do something like this:
psaTest->RemoveAll();
just after adding the pointer to the map. So, your CStringArray will be empty.
By the way, you shouldn't do something like this:
CStringArray* psaRes = new CStringArray;
...
...
m_mapType.Lookup(_T("index"),psaRes);
Because in that case you will have a memory leak. There's no need to make a new CStringArray: if the pointer is found in the map, it will be copied into the psaRes pointer (the address will be copied, not the content of course).
BTW, I suggest you take a look at the STL containers (map, list, ...) they are much easier to use (once you are confortable with the syntax).
|
|
|
|
|
Thank you for advice , much people say to me to use STL , I didn't work with , I try to keep all in MFC way .
|
|
|
|
|
I have an MFC application which uses the WebBrowser2 object to view html files and pdf files.
Application works fine in Windows XP but it crashes in Windows 7 when viewing pdf files. This application is built on Windows XP and distributed to XP/7 machines.
I have no available Windows 7 machines for debug as of this moment so I couldn't get any other useful information about the problem.
Anyone else experience this or can maybe point me to something that could shed some light? Thanks
|
|
|
|
|
Hi all. I try to do something , but maybe it's stupid thing ?
I want to draft a CMap object , with key as CString and as values CStringArray , something like this :
CMap<CString,CString&,CStringArray,CStringArray&> m_mapPack;
but I get :
error C2582: 'CStringArray' : 'operator =' function is unavailable
my question is, can I setup an CStringArray value into CMap object ? And how ?
Thank you .
|
|
|
|
|
Without a copy constructor or assignment operator, I do not think that CStringArray is copyable. You may want to derive your own class from it where you can provide one of the aforementioned constructs.
As an alternative, consider an STL solution. Something like:
typedef vector<string> myVector;
typedef map<string, myVector> myMap;
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|