![]() |
|
Spaces home John Stewien's Road To S...ProfileFriendsFilesMore ![]() | ![]() |
John Stewien's Road To Somewhere ElseProgramming in WPF (.NET 3.0) and moving to Taiwan
Nearly WalkingBy the time I get back to Taiwan Violet will be walking I think: 8/12/2008 Different ways of showing a C# dialog from Managed C++ or C++/CLI
Here are 3 different behaviours for showing a C# dialog from a C++ application:
Code examples are below to show how to use each. Note that for the non-modal non-clipped call to SetWindowLongPtr the flag GWLP_HWNDPARENT doesn’t appear in the documentation for SetWindowLongPtr. That’s because the owner for a window can’t be changed after it is created, however GWLP_HWNDPARENT is the offset flag for reading the owner as seen in the GetWindowLongPtr documentation, so it can be written to before the window is shown and be used to set the owner.
// Wrapper for a HWND void OpenDialog(HWND hwnd){ // hwnd is the main window // Note that the following code snippets are mutually exclusive, only use 1
8/11/2008 Visual Studio Command Prompt Explorer Context MenuI keep on reinventing the wheel every time I'm at a new place of work and want a Visual Studio Command Prompt Explorer Context Menu, so I'm going to put the contents of a reg file here so that I can find it easily in the future when I need it. Here's the entry for a Visual Studio 2003 command prompt, but something similar would also apply for Visual Studio 2005 and 2008: Windows Registry Editor Version 5.00
|
|||||||||||||||||||
|
|