Notification when renaming directory in SHBrowseForFolder?

Hi, I use SHBrowseForFolder with the flags
BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE
so that I can create a new subdirectory or
rename an existing directory.
I'd also like to show the directory currently
selected in the static control above the treeview.
When selecting another directory my callback
function is being called and I can set the window
text of the static control. Works like a charme.

However when I just rename a directory in the treeview,
then the callback function is not being called, allthough
the directory currently selected has changed it's name.
Any idea how to reflect this event?

Here is my code:

int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM
pData)
{
 TCHAR szDir[MAX_PATH];

 switch (uMsg)
 {
 case BFFM_INITIALIZED:
  SendMessage(hwnd, BFFM_SETSELECTION, TRUE, pData);
  break;
 case BFFM_SELCHANGED:
  if (SHGetPathFromIDList((LPITEMIDLIST)lp ,szDir))
  {
   //SendMessage(hwnd, BFFM_SETSTATUSTEXT, 0, (LPARAM)szDir);

   HWND hFirstChild = GetWindow(hwnd, GW_CHILD);
   HWND hSecondChild = GetNextWindow(hFirstChild, GW_HWNDNEXT);
   if (hFirstChild != NULL && hSecondChild != NULL)
   {
    SetWindowText(hFirstChild, szDir);
   }
  }
  break;
  default:
  {}
 }

 return 0;
}

void CFoo::OnBrowseSourcePath()
{
 LPMALLOC pMalloc;

 if (SUCCEEDED(SHGetMalloc(&pMalloc)))
 {
  BROWSEINFO bi;
  LPITEMIDLIST pidl;
  TCHAR path[MAX_PATH];

  bi.hwndOwner   = m_hWnd;
  bi.pidlRoot = NULL;
  bi.pszDisplayName = path;
  bi.lpszTitle   = NULL;
  bi.ulFlags  = BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE;
  bi.lpfn  = BrowseCallbackProc;
  bi.lParam   = (LPARAM)(LPCTSTR)m_strSourcePath;
  bi.iImage   = 0;

  pidl = SHBrowseForFolder(&bi);
  if (pidl)
  {
   SHGetPathFromIDList(pidl, path);
   m_strSourcePath = path;
  }

  pMalloc->Free(pidl);
  pMalloc->Release();
 }
}

0
5/18/2005 3:03:57 PM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
334 Views

Similar Articles

[PageSpeed] 19

Reply:

Similar Artilces:

CRM and Active Directory Synchronisation (Error Correction?)
Following a successful(!) Pilot Test Install and Data Migration for MSCRM, Recently when Generating New Business Units and attempting to populate with Roles and/or Users, the following message (or of very similar style appears in the CRM applogs) Error: A privilege change was dropped after the maximum number of tries. -2147016672 (0x80072020) Description: An operations error occurred. Comments: The privilege {78777C10-09AB-4326-B4C8-CF5729702937} could not be changed for business {FBCC65E2-38E8-4FCF-AD20-34DEDE432A51}. This may be normal if this business has been deleted. If this busin...

renamed file
How to get back a renamed file in excel? Is it sawed enywhere else in another filename or... TIA. Hi! If you open a file and then use Saved As and save under a different name the original file is closed (without saving any changes since it was last saved). That original file is still in it's old location. The new file is saved at wherever you said it should be saved during the Saved As process. as long as you can remember the new name you gave, you should be able to find it easily using Start > Search > For files and folders -- Regards Norman Harker MVP (Excel) Sydney, Austr...

Notifications
I just started using Windows Live Mail. I am using Windows 7 and would like to know how to get an icon to come up when I have mail (even if I am not in live mail). My other question is when I am at a website and you click on an email, it will not allow me to. 1) Tools (ALT+T), Options, General is where you tell WLM to check for messages every xx minutes. You can also tell it to play a sound when new mail is downloaded. WLM does have to be open for it to check mail. But it can be minimized. 2) If you mean clicking a mailto or contact us link doesn't open a message co...

URL for case or opportunity in notification email
Greetings all, Again I find myself at a loss for a customization I'd like to do. I've looked through the newsgroups and on the sandbox to no avail. I'd like to be able to send an email that goes something like: You've just been assigned a case! Please click here to open the case and have the word 'here' be a link to the actual case (or opportunity) that would open up in the web interface but I cannot find a way to include the 'entity URL' (if there is such a thing). Can anyone reccommend a straightforward to accomplish this? Many thanks in advance. -...

Email Notification from Resource Scheduling Mailbox
I am using Outlook 2k/2k2 on my clients backed with Exchange 5.5 Std Edition. I am using resource scheduling to easily schedule rooms and equipments. My question is this, currently, using this system, we are always looking or checking the user's folder (Calendar) to check if there are any reservation. Is there a way that there will be a notification to a particular email so that we will know if there are user who would like to reserve a particular resources(e.i. camera, projector, etc). Did you set up a mailbox for each resource or how are you using Resource Scheduling? --� Milly Sta...

Read Notifications are 6days earlier than delivey notification
Dear Colleagues, What is the explanation for a read reciept of a message sent to many users apperas in the tracking tape ealier 6 days than the delivery reciept? the same Time zones on all the PCs all of them are on the same exchange and in the same active directory Site> Example: A message i sent 4 days ago and trying to check its tracking status from the tracking tape of the sent message shows: Tracking: Recipient Delivery Read Sameh Saleh Delivered: 07/03/2006 12:47 PM Read: 07/03/2006 1:39 PM Yehia Amin Delivered: 07/03/2006 12:45 PM Mohamed Daif Delivered: 07/03/2006 12:45 PM ...

OWA view to a directory tree
Hi, For some reason when I tried to access my e-mail via webmail I can only see a directory tree... can anyone help me please. Thanks in advanced, Henrique Alves. I don't know exactly how it happened, but I recently had the same experience. I disabled and then re-enabled Forms Based Authentication to fix mine using the following instructions: In E2K3 ESM, drill down to the Exchange Virtual Server under Servers | <ServerName> | Protocols | HTTP | Exchange Virtual Server Right click on Exchange Virtual Server Choose the Settings tab Uncheck the "Enable Forms Base...

View recieving notification of document being saved
I have a standard document/view application. Is there a way to have the view notified just before the document gets saved? Thanks! - Pete You can use UpdateAllViews() or send a message inside the virtual function OnSaveDocument() Normand Then use UpdateAllViews() or get the "AirPete" <x@x.x> a �crit dans le message de news: ZoRZb.3036$yZ1.1944@newsread2.news.pas.earthlink.net... > I have a standard document/view application. > Is there a way to have the view notified just before the document gets > saved? > > Thanks! > - Pete > > Thanks! - Pete...

Member directory in booklet form: How to?
I'd like to publish a membership directory in booklet form, similar to the kind of booklet one can produce in Outlook, but with more control over the formatting of printed items. By booklet format, I mean printing double sided on folded sheets so the first printed page contains booklet pages 1,2,last-1,last ....second printed page is 3,4,last-3,last-2 and so on. My member data is in an Excel file. I understand how to set up Publisher to print in booklet format and I know how to link to the Excel file as a merge source. I also know how to embed dummy fields in a text box so that the mer...

Notification
Hi We would like to set up CRM so that a notification is sent to a Manager if no one has created an activity in 24 hours. We are unsure if this is possible and we have attempted to do this through Workflow however we are unsure of the event that will trigger a workflow rule like this. Is this possible? Can this possibly be achieved through using Client Side Code? Any ideas? Many Thanks Mark Hi Mark, May be you need to write a custom SQL report and use the Microsoft CRM 3.0 Scheduler to run the reports daily. You can download the Scheduler from Microsoft. http://www.microsoft.com/down...

Renaming the SQL Server
The SQL server running the databases for our Great Plains install was built before the network design was finalized. It was also attached to a network it will not be part of so that we could import data, etc. As such, it was given a generic name that does not meet the naming requirements of the now finalized network design. Since I will have to change the IP address for the server once it is placed on the correct production network, I thought to change its name as well. I know to drop the old server name from sysservers and add the new server name as the 'local' server. Are...

Renaming a Business Unit
Hi there! We want to rename a business unit. This is not possible through the CRM interface. Can we do it from the SQL Server directly? If we de-activate the BU and then create a new one, will there be any problem with the users that now work normally under the old BU? Thanks, Elena If you deactivate the business unit then users of that unit will not be able to connect. Also be aware that if you transfer users to the new business unit their security roles will have to be added back in. "SiEBEN Innovative Solutions" <newsgroup@sieben.gr> wrote in message news:uhHwsTXSEHA....

macro to rename mutiple spreadsheets when being saved
I have a number of spreadsheets all named 'CTS Master' but placed in different places in a network. A macro opens these files individually and populates another spreadsheet - 'Batched CTS', with the data from all the 'CTS Master' files (about 20 of them). Once each sheet is opened and all the data pulled across I want to save these files as an electronic backup eg 'CTS Master' file used by Mark is saved as 'CTS Master - Mark 17 Nov 03'. Without doing this manually (there will be about 20 'CTS Master' files on the network)is this possi...

How to rename a user's email account
I have a woman here who recently got married. I know in our 2000 domain I can rename her account, but how do I go about renaming her email accoutn without losing her current email? What steps do I have to take? Thanks, Jim Rename the appropriate items in her ADUC properties. Add a new SMTP address for her new name and make it default (but don't remove the old one). Change her home directory & profile folder names to match. Log in as her and recreate her mail profile. You won't lose mail. Jim wrote: > I have a woman here who recently got married. I know in > our 20...

Notification addin?
Is there an add-in that will allow a pop-up notification for an IMAP account? Outlook 2007 Not that I know of. There are utilities that will check the acct and let know if there is new mail. They are not connected at all to outlook. http://www.google.com/search?num=100&q=email+notification+software -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips by email: dailytips-subscribe-request@lists.outlooktips.net Outlook...

"FileDialogOpen"
xl03 I'm using "Application.FileDialog(msoFileDialogOpen)" to present a list of files to the user so he/she can select a wb to load. My question is, can I somehow force the dialog to open with a specific directory? -- Regards Rob (Most of this was stolen from the help for .filedialog) Option Explicit Sub testme() Dim lngCount As Long Dim curFolder As String Dim newFolder As String curFolder = CurDir newFolder = "C:\test" ChDrive newFolder ChDir newFolder ' Open the file dialog With Application.FileDialog(msoFileD...

Envelope notification
Hello, I accidentaly clicked on the option "Hide Envelope" in the taskbar, when I right clicked on the envelope icon that indicates I have a new unread e-mail. Is there a way to make this icon reappear whenever I get new e-mails? Thanks, Katerina Katerina K. <scorpio_gemini@hotmail.com> wrote: > I accidentaly clicked on the option "Hide Envelope" in the taskbar, > when I right clicked on the envelope icon that indicates I have a new > unread e-mail. Is there a way to make this icon reappear whenever I > get new e-mails? Right-click the Taskbar an...

Renaming Sheet Problem
I have this Workbook, containing a number of Worksheets. When I rename a worksheet, it prefixes it with the following: .XLS] Any idea why this is happening? I am using Excel 2002 SP3 Cheers Does your filename have []'s in it? If yes, remove them from the filename. xl doesn't like for you to use them. They mean something special to excel. Funky Junky wrote: > > I have this Workbook, containing a number of Worksheets. > > When I rename a worksheet, it prefixes it with the following: .XLS] > > Any idea why this is happening? > > I am using Excel 2002 S...

Customize Notification
I was needing help with icons that show up on the taskbar in the lower right hand corner. I have several from various programs and would like to delete them from the taskbar but the only option seems to be "hide them when inactive" or "always hide". These are programs that I use from time to time, but I don't want them on my taskbar. I have tried the "kelly" website to remove past items and it does remove several, but when I reboot all of the icons are back on there again. Thanks for your help! -- Gina How to delete icons from the Windows System Tray h...

Inbox Renamed
I am running Outlook 2000 on a Win 2K Pro machine, with POP3 services only (no Exchange Server or MAPI). My inbox name just changed to the name of a recurring meeting that I cancelled. I found notes on the bug in the MS Knowledge Base. Howerver, the only notes on how to resolve it point to exchng32.exe which I don't have, or downloading Office SR 1a, which I downloaded with no results. Any ideas? Thanks, Sam ...

Rename Mailbox Post Domino Migration
Greetings, I am finishing up a Domino to Exchange migration. One user, the Executive Admin uses a generic account called, you guessed it, "Executive Admin." All emails from her appear to come from this name along with her proper email address. I have changed the Display Name to match hers. The only reference to Executive Admin is the mailbox name in Exchange, as well as the NOTES address left over from the Domino migration. What is the best way to modify her account so that it displays her name, rather than Executive Admin? Thanks! On Mon, 6 Mar 2006 12:47:32 -0800, celti...

Cannot Rename a Folder After Using CFileDialog
When I use CFileDialog to open a file, it will prevent that folder from being renamed. That makes sense but suppose I'm done with that file and I want that folder free from system's control without exiting my application. How do I do this? It always gives me a sharing violation error message. Thanks in advance for any help. Rob The folder remains set as your application's current directory. Solutions: 1. OPENFILENAME Structure use the flag OFN_NOCHANGEDIR, but it doesn't work on NTs when opening a file ("Windows NT 4.0/2000/XP: This flag i...

Outlook express email arrival notification
How do I get a visual notifier to appear on my desktop when an e.mail arrives ? Can't rely on sound when I'm constantly leaving the room. "jane" <anonymous@discussions.microsoft.com> wrote in message news:457701c4732d$40fa6210$a501280a@phx.gbl... > How do I get a visual notifier to appear on my desktop > when an e.mail arrives ? Can't rely on sound when I'm > constantly leaving the room. This group is for Outlook 97, 98, 2000, 2002 and 2003, part of the Office suite. Not Outlook EXPRESS, which despite its name is in fact a completely different progr...

Replacing the Active Directory
Is there any possibility to use my own database in the place of Active Dirtectory. Any help is appreciated. TIA Suneetha No. Dave Ireland "Sunitha" <suneethaavusuru@gmail.com> wrote in message news:7fd4e1b3-f4f7-42e3-a2a6-325edaf5832c@c22g2000prc.googlegroups.com... > Is there any possibility to use my own database in the place of Active > Dirtectory. > Any help is appreciated. > > TIA > Suneetha ...

Notifications from multiple accounts
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: Exchange I have several accounts within Entourage. Is there a way to designate notifications for only the primary account? Currently I receive a notification of a new message every time any one of these accounts has an email. Many of them just catch confirmation emails. It's annoying. ...