Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Active Desktop

Active Desktop

Scheduled Pinned Locked Moved C / C++ / MFC
c++
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    micutzu
    wrote on last edited by
    #1

    Hello, I have developed a Channel File that is distributed using an installation file. In order to install the File on the active desktop I use a small C++ application which does the following: ShellExecute(NULL, NULL, activedesktop.cdf, "", "", SW_NORMAL); When I tested on several machines on some XP it works just fine and on other it does not show the Add Item to Active Desktop dialog. If someone has experience with the Active Desktop I would appreciate a suggestion. Thanks, Dan.

    M 1 Reply Last reply
    0
    • M micutzu

      Hello, I have developed a Channel File that is distributed using an installation file. In order to install the File on the active desktop I use a small C++ application which does the following: ShellExecute(NULL, NULL, activedesktop.cdf, "", "", SW_NORMAL); When I tested on several machines on some XP it works just fine and on other it does not show the Add Item to Active Desktop dialog. If someone has experience with the Active Desktop I would appreciate a suggestion. Thanks, Dan.

      M Offline
      M Offline
      micutzu
      wrote on last edited by
      #2

      Hello, I have managed to find the solution. For anyone interested this is it: bool InstallActiveDesktop() { COMPONENT component; COMPPOS comppos; CoInitialize(NULL); HRESULT hr; IActiveDesktop *pActiveDesktop; hr = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER, IID_IActiveDesktop, (void**)&pActiveDesktop); ZeroMemory(&component, sizeof(COMPONENT)); component.dwSize = sizeof(COMPONENT); component.iComponentType = COMP_TYPE_WEBSITE; component.fChecked = TRUE; component.fDirty = TRUE; component.fNoScroll = TRUE; comppos.dwHeight = 400; comppos.dwSize = sizeof(COMPPOS); comppos.dwWidth = 165; comppos.fCanResize = TRUE; comppos.fCanResizeX = TRUE; comppos.fCanResizeY = TRUE; comppos.iLeft = 400; comppos.iTop = 20; comppos.izIndex = 0; component.cpPos = comppos; MultiByteToWideChar(CP_ACP, 0, "FriendlyName", strlen("FriendlyName")+1, component.wszFriendlyName, sizeof(component.wszFriendlyName)); MultiByteToWideChar(CP_ACP, 0, "http://www.complete.link", strlen("http://www.complete.link")+1, component.wszSource, sizeof(component.wszFriendlyName)); component.dwCurItemState = IS_NORMAL; pActiveDesktop->AddDesktopItem(&component, 0); pActiveDesktop->ApplyChanges(AD_APPLY_ALL); pActiveDesktop->Release(); CoUninitialize(); return true; } bool UnInstallActiveDesktop() { COMPONENT component; COMPPOS comppos; CoInitialize(NULL); HRESULT hr; IActiveDesktop *pActiveDesktop; hr = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER, IID_IActiveDesktop, (void**)&pActiveDesktop); ZeroMemory(&component, sizeof(COMPONENT)); component.dwSize = sizeof(COMPONENT); component.iComponentType = COMP_TYPE_WEBSITE; component.fChecked = TRUE; component.fDirty = TRUE; component.fNoScroll = TRUE; comppos.dwHeight = 400; comppos.dwSize = sizeof(COMPPOS); comppos.dwWidth = 165; comppos.fCanResize = TRUE; comppos.fCanResizeX = TRUE; comppos.fCanResizeY = TRUE; comppos.iLeft = 100; comppos.iTop = 20; comppos.izIndex = 0; component.cpPos = comppos; MultiByteToWideChar(CP_ACP, 0, "FriendlyName", strlen("FriendlyName")+1, component.wszFriendlyName, sizeof(component.wszFriendlyName)); MultiByteToWideChar(CP_ACP, 0, "http://www.complete.link", strlen("http://ww

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups