I had seen ::UpdateResource() before but it operates on a file, not from with the same program. Oh, well. If I have to make a utility app to do it externally, so be it. At least now I have a template function to do the mechanics of changing the string without having to think about it too much. Thanks for you help -G
negativeG
Posts
-
Can you add a new string resource at runtime? -
Can you add a new string resource at runtime?Is it possible to add a new string resource at runtime? e.g. I would like to add "My Custom string" with the resource ID "IDR_CUSTOM_STRING" (with some unused value) to the string table. We wish to allow our customers to customize the application. e.g. where it by default says 'Some Program' and 'Some file type (*.som)', they might use 'Bob's Program' and 'Bob's files (*.bob)'. That info in particular is all encoded into the IDR_MYPROGTYPE resource in the string table. The constructor for CMultiDocTemplate only uses this resource to set those strings as needed. I could define a new entry in the string table, and use that, but that works for only a single customization. To allow complete flexibility, I want want to generate a new string table entry based on some data file that is accessed before the DocTemplate is created (early in CMyWinApp). As the resources themselves as part of the exe seems frought with problems, so I am happy to leave that alone. It just seems that at some point that data must be loaded and allocated somewhere, somehow. I just want to add a new one. Or... if there is a safe way to do it, just modify the existing one. Thanks, -G
-
switch to existing instance [modified]Thanks! I had to massage it a little since I have a Dialog based app, but it is working great now! -G
-
switch to existing instance [modified]Sure, but how do I find the hWnd for the Applet (it is a dialog based) from my App? There is some recourse if I start the Applet from my App using CreateProcess, but if it is run from the command line, my app has no knowledge of it. -G
-
switch to existing instance [modified]Not intentionally. That is how the post came up when I started it. I thought the preview just came that way. Reviewing it, I see that there as indeed a bold tag around it all, which I have since removed (I hope) Sorry. -G
-
switch to existing instance [modified]My app allows users to start a 'helper' applet that runs independently. I am using a mutex to limit this applet to a single instance. I use the mutex both to prevent starting the second instance from my app (by CreateProcess or ShellExecute)AND to have any second instance started outside my (by clicking icons, etc) to self-terminate. How can I have them switch to the current instance of the applet? That is, if they select to run the applet from my app I don't want to ignore it or display a message that an instance is running. I want to make that instance be get focus and be the top most application. Thanks, -G
modified on Wednesday, March 4, 2009 1:39 PM