Showing results for September 2004 - The Old New Thing

Sep 30, 2004
0
0

How to host an IContextMenu, part 7 – Invoking the default verb

Raymond Chen
Raymond Chen

When we last left our hero, we were wondering how to invoke the default verb programmatically. Now that we've learned a lot about how IContextMenu is used in the interactive case, we can use that information to guide us in its use in the noninteractive case. The key here is using the HMENU to identify the default menu item and just invoke it ...

Code
Sep 29, 2004
0
0

Still more goofy terms of service – restrictions on information disclosure

Raymond Chen
Raymond Chen

Part of the terms of the Continental Airlines OnePass Account Privacy rules seem unusually onerous. You are authorized to access OnePass account information solely to obtain information regarding your OnePass account and for no other purpose. You may not delegate or grant any power of attorney or other authorization regarding any such access. ...

Non-Computer
Sep 29, 2004
0
0

What does boldface on a menu mean?

Raymond Chen
Raymond Chen

On many context menus you will see an item in boldface. For example, if you right-click a text file, you will most likely see "Open" in boldface at the top of the mean. What does the boldface mean? The boldface menu item is the default command for that menu. It represents the action that would have occurred if you had double-clicked the item ...

Tips/Support
Sep 28, 2004
0
0

How to host an IContextMenu, part 6 – Displaying menu help

Raymond Chen
Raymond Chen

One of the subtleties of context menus is showing help in the status bar. Now, the program we've been developing doesn't have a status bar, so we'll fake it by putting the help text in the title bar. The key method for this task is IContextMenu::GetCommandString, which allows communication with a context menu handler about the verbs in the ...

Code
Sep 27, 2004
0
0

How to host an IContextMenu, part 5 – Handling menu messages

Raymond Chen
Raymond Chen

One bug that was called out immediately in our first attempt at displaying the context menu to the user is that the Open With and Send To submenus don't work. The reason for this is that these submenus are delay-generated (which explains why they don't contain anything interesting when you expand them) and owner-drawn (which you can't notice ...

Code
Sep 24, 2004
0
0

The unrecognized assistants on those do-it-yourself shows

Raymond Chen
Raymond Chen

Some people from my knitting group have been among those assisting in the preparation of today's episode of the knitting show Knitty Gritty on The Do It Yourself Network. Stop reading if you don't want the television illusion shattered, or at least cracked a bit. Each volunteer was assigned a section of a sweater to knit. The show's host will...

Non-Computer
Sep 24, 2004
0
0

How to host an IContextMenu, part 4 – Key context

Raymond Chen
Raymond Chen

Another of the bugs you may have noticed in our first attempt at displaying the context menu to the user is that the Delete command doesn't alter its behavior depending on whether you hold the shift key. Recall that holding the shift key changes the behavior of the Delete command, causing it to delete a file immediately instead of moving it to ...

Code
Sep 23, 2004
0
0

Penguins do not fall over!

Raymond Chen
Raymond Chen

Everyone has read the story about penguins falling over backwards while observing low-flying aircraft. The Annals of Improbable Research reports that Dr. Richard Stone has been researching the ecological effects of helicopter overflights on King penguins and his preliminary results show that King penguins do not, in fact, fall over backwards (...

Non-Computer
Sep 23, 2004
0
0

How to host an IContextMenu, part 3 – Invocation location

Raymond Chen
Raymond Chen

One of the bugs you may have noticed in our first attempt at displaying the context menu to the user is that the Properties dialog doesn't show up at the point you clicked. The Properties dialog isn't psychic; it doesn't know where the original mouse click occurred. You have to tell it. CMINVOKECOMMANDINFOEX info = { 0 }; ...

Code
Sep 22, 2004
0
0

How to contact Raymond

Raymond Chen
Raymond Chen

If your subject matter is a suggestion for a future topic, please post it to the Suggestion Box (using the Suggestion Box link on the side of the page). If you send it to me directly, I will probably lose track of it. If your subject matter is personal (for example "Hi, Raymond, remember me? We went to the same high school..."), you can send...

Pages

Feedback

  翻译: