Date: | July 8, 2005 / year-entry #184 |
Tags: | other |
Orig Link: | https://blogs.msdn.microsoft.com/oldnewthing/20050708-21/?p=34993 |
Comments: | 4 |
Summary: | Occasionally, I see someone ask a question like the following. I have the handle to a dialog window. How can I get the original dialog resource ID that the dialog was created from? As we saw in our in-depth discussion of how dialogs are created from dialog templates, the dialog template itself is not saved... |
Occasionally, I see someone ask a question like the following.
As we saw in our in-depth discussion of how dialogs are created from dialog templates, the dialog template itself is not saved anywhere. The purpose of a template is to act as the... well... "template" for creating a dialog box. Once the dialog box has been created, there is no need for the template any more. Consequently, there is no reason why the system should remember it. Besides, if the dialog were created from a runtime-generated template, saving the original parameters would leave pointers to freed memory. Furthermore, the code that created the dialog box almost certainly modified the dialog box during its It's like asking, "Given a plate of food, how do I recover the original cookbook and page number for the recipe?" By doing a chemical analysis of the food, you might be able to recover "a" recipe, but there is nothing in the food itself that says, "I came from The Joy of Cooking, page 253." |
Comments (4)
Comments are closed. |
What’s the recipe on page 253?
Considering the number of editions JoC has been through, could be anything from Rabbit Stew (first, catch a rabbit) to microwave popcorn ;)
In my edition it’s your choice of: "Creamed Chipped Beef", "Chipped Beef in Creole Sauce", "Chipped Beef in Cheese Sauce", "Chipped Beef and Sweet Potato Casserole" or "Chipped Beef or Corned Beef in Canned Soup."
Early editions of The Joy Of Cooking only had 200 pages. The reference to page 253, exploits a well-known buffer overrun error which causes the end of each edition to be corrupted with pictures of ham sandwiches. Later editions corrected this error by expanding the number of pages to 928:
http://www.amazon.com/exec/obidos/tg/detail/-/0026045702/ref=dp_proddesc_1/102-4684116-3275367?%5Fencoding=UTF8&n=283155&v=glance
HTH,
TC