Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

path to Desktop and Icon changing for a file

Status
Not open for further replies.

Raywall

Programmer
Oct 1, 2003
51
RO
Please tell me how can I get the path to Desktop(I want to create a shortcut from code) and also how can I change the icon for that shortcut(or any other file). I'm using plain API but if you know how to do these in MFC it'll be ok(though I don't like MFC that much).
 
Note, the Desktop isn't a folder in the common sense, its a namespace object (infact, its the root of the namespace hierarchy).

See the 'Creating a Shortcut to a Nonfile Object' section in





/Per

"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."
 
Sorry I was saying that I would want to create a shortcut on the desktop, not a shortcut to the desktop(my mistake). It will be an internet shortcut(I will create a file with the proper extension and content...that will do) and I must change the icon for that shortcut. The problem is that I don't know the path to the desktop and I don't know other way to create a file other then specifying the path...
Sorry I wasn't clear from the begining.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top