Visual Studio Developer Center > Visual Studio Forums > Visual Studio Extensibility > Dynamically Append Window Title for Isolated shell based Custom Application...
Ask a questionAsk a question
 

AnswerDynamically Append Window Title for Isolated shell based Custom Application...

  • Thursday, October 29, 2009 5:26 PMAAG Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    In my isolated shell application I would like to append the Shell Window title dynamically to display the user whether it’s a Trial version or Licensed copy based on response. Currently it shows as PowerPMACSuite(Administrator) window Title and I want it like PowerPMACSuite-Trial Version(Administrator)

    I tried to append AppName from the registry entry but it did not work .
    Thanks,
    AAG

Answers

  • Tuesday, November 03, 2009 11:39 PMAAG Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Thanks for the Help.
    I figured it out in the function ...
    int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) 
    I look for my license Status and Update the AppKeyName before I start the shell...

    nRetVal = Start(W2A(lpCmdLine), L

    "MyApp", nCmdShow, NULL, NULL);

    Thanks for the help!

    • Marked As Answer byAAG Tuesday, November 03, 2009 11:39 PM
    •  

All Replies

  • Monday, November 02, 2009 6:38 AMChao KuoMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello, AAG
    Do you mean modify the AppName key value which located in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppEnv\9.0\Apps? I think modify the registry entry could do the work. Because the Shell window use the AppName in registry as its title.
    If you registered your shell in the experimental hive, your AppName will changed back if you recompile your project. Maybe this is the reason that accout for it did not work.
    If I misunderstood you, feel free to let me know.
    Thanks
    Chao
  • Monday, November 02, 2009 4:38 PMAAG Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Yes I tried to modify but it did not work. What I am looking for is to change the Window Title Dynamically based on the License state.
    I was hoping to change title from CPP file for the isolated shell which uses stub dll.Here is the signature of the function which loads the Shell.

    int
    APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) 

    Thanks,
    Atul
  • Tuesday, November 03, 2009 2:39 AMChao KuoMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Sounds good!
    I am waiting for your good results.
    • Marked As Answer byAAG Tuesday, November 03, 2009 11:37 PM
    • Unmarked As Answer byAAG Tuesday, November 03, 2009 11:37 PM
    •  
  • Tuesday, November 03, 2009 11:39 PMAAG Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Thanks for the Help.
    I figured it out in the function ...
    int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) 
    I look for my license Status and Update the AppKeyName before I start the shell...

    nRetVal = Start(W2A(lpCmdLine), L

    "MyApp", nCmdShow, NULL, NULL);

    Thanks for the help!

    • Marked As Answer byAAG Tuesday, November 03, 2009 11:39 PM
    •