INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: WM_MMC_COMMAND for Zone Manager...  (Read 1638 times)

muchadhesion

  • Recent member
  • *
  • Posts: 44
WM_MMC_COMMAND for Zone Manager...
« on: January 10, 2009, 12:37:57 pm »

I'm writing a plug-in for managing the music currently playing in all zones.

I'd like to add a button to my UI that opens the Zone Manager Dialog ("Player" | "Playback Options" | "Zone Manager...").  Currently it is a little hard to get to this dialog for my users.

Is there a WM_MMC_COMMAND that will cause the Zone Manager Dialog to appear?  eg,

    HWND hwndMC = FindWindow(_T("MJFrame"), NULL);
    PostMessage(hwndMC, WM_MC_COMMAND, MCC_ZONE_MANAGER, 0);


The list here (http://wiki.jrmediacenter.com/index.php/Media_Center_Core_Commands) and in MCCommands.h from the SDK don't seem to have anything relevant...

Thanks in advance.
Logged

muchadhesion

  • Recent member
  • *
  • Posts: 44
Re: WM_MMC_COMMAND for Zone Manager...
« Reply #1 on: February 23, 2009, 05:45:21 am »

I found a useful technique to avoid bothering the User with JR's standard options dialogs.  (And JR does have soooo many options. ;) )

You can get access to most of JR's options by poking around in the registry.  eg PlayerCore and Properties have many of the interesting options.

eg,

      private void SetMCOptions(int aZone)
      {
         string suffix = "";
         if (aZone > 0) suffix = " (" + aZone + ")";

         IMJVersionAutomation ver = mcRef.GetVersion();
         string verstring = ver.Major.ToString();
         const string userRoot = "HKEY_CURRENT_USER";
         string subkey = @"Software\JRiver\Media Center " + verstring;
         string properties = userRoot + "\\" + subkey + @"\Properties";
         string playercore = userRoot + "\\" + subkey + @"\Player Core";

         Registry.SetValue(playercore, "Stop Mode" + suffix, 0);
         Registry.SetValue(playercore, "Trim Silence" + suffix, 0);
                 }


Note that different Zones have thier options suffixed with "(<zone index>)".

For most options Get and Set registry items update dynamically (i.e. you don't have to restart JR for the new setting to apear in JR's standard dialogs.)


Logged
Pages: [1]   Go Up