C++ Windows Shell property sheet handler (CppShellExtPropSheetHandler)

The code sample illustrates how to create a Windows Shell property sheet handler in VC++

C++ (179.2 KB)
 
 
 
 
 
4 Star
(1)
11,554 times
Add to favorites
1/16/2012
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Instructions Incomplete
    2 Posts | Last post April 02, 2019
    • I tried using this on both .cpp and .txt, and this example code worked on neither as-is, and neither the instructions nor a couple hours of web searching brought me to the answer, so I'm documenting it here.
      
      As it turns out, HKLM\SOFTWARE\Classes\.txt had a default value of "txtfile", which is the name of another key in the same location. I added the shellex tree to that one instead of .txt, and only then would the property page show up for .txt files.
      
      The problem with .cpp was different. The .cpp key didn't have a default value, but it did contain another key, named OpenWithProgids, containing a string value named VisualStudio.cpp.ab756e5b with no data. I was able to get the property page for .cpp files to appear by adding the shellex tree to VisualStudio.cpp.ab756e5b instead in this case.
      
    • It may be worth noting that HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\OpenWithProgids also contained a zero-length binary value named txtfile, but I'm not sure if either of those is actually what *caused* the aforementioned issue.
  • Working with Controls
    2 Posts | Last post April 27, 2011
    • Hi there, i've been working with your VS2010 PropSheet solution and so far it's GREAT! Nice Work!
      Now I'm having this problem: I've added a List Control to the dialog but I can't work with it on the code. the CListBox or the CListCtr need an afxwin or afxcmm to be included.
      So far so good, but as soon as do that I start to have problems related to WINDOWS.H been already included. This made me change the definition of my project to have the MFC Libraries as a Shared DLL.
      
      Does anyone has an idea for working with those controls using your solution? 'Have been looking around and trying to find an answer but still nothing.
      
      Using the SetWindowText Function I've been able to populate the labels and textboxes... so far!
      
      Thanks all!
    • Solved (for now) it with adding Strings and using the ListBox Control without having to use the MFC List Control.
      
      My doubt still exists 'cause I'd like to use CListCtr, which gives me more control over the data.
      
      SendMessage(listbox_handle, LB_ADDSTRING, 0, (LPARAM)L"thava");