You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/extensibility/adding-icons-to-menu-commands.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -30,11 +30,11 @@ Commands can appear on both menus and toolbars. On toolbars, it is common for a
30
30
31
31
If you use an 8-bit color depth, use magenta, `RGB(255,0,255)`, as the transparency. However, 32-bit color icons are preferred.
32
32
33
-
2. Copy the icon file to the *Resources* directory in your VSPackage project. In the Solution Explorer, add the icon to the project. (Select **Resources**, and on the context menu click **Add**, then **Existing Item**, and select your icon file.)
33
+
2. Copy the icon file to the *Resources* directory in your VSPackage project. In the **Solution Explorer**, add the icon to the project. (Select **Resources**, and on the context menu click **Add**, then **Existing Item**, and select your icon file.)
34
34
35
35
3. Open the *.vsct* file in the editor.
36
36
37
-
4. Add a `GuidSymbol` element with a name of **testIcon**. Create a GUID (**Tools / Create GUID**, then select **Registry Format** and click **Copy**) and paste it into the `value` attribute. The result should look like this:
37
+
4. Add a `GuidSymbol` element with a name of **testIcon**. Create a GUID (**Tools** > **Create GUID**, then select **Registry Format** and click **Copy**) and paste it into the `value` attribute. The result should look like this:
Scaling an imagelist depends on whether the imagelist is complete at load time, or is appended at run time. If complete at load time, call LogicalToDeviceUnits() with the imagelist as you would a bitmap. When the code needs to load an individual bitmap before composing the imagelist, make sure to scale the image size of the imagelist:
59
+
Scaling an imagelist depends on whether the imagelist is complete at load time, or is appended at run time. If complete at load time, call `LogicalToDeviceUnits()` with the imagelist as you would a bitmap. When the code needs to load an individual bitmap before composing the imagelist, make sure to scale the image size of the imagelist:
To use the library, go to the [Visual Studio VSSDK extensibility samples](https://github.com/Microsoft/VSSDK-Extensibility-Samples) and clone the High-DPI_Images_Icons sample.
102
102
103
-
In source files, include *VsUIDpiHelper.h* and call the static functions of VsUI::DpiHelper class:
103
+
In source files, include *VsUIDpiHelper.h* and call the static functions of `VsUI::DpiHelper` class:
104
104
105
105
```cpp
106
106
#include "VsUIDpiHelper.h"
@@ -322,7 +322,7 @@ customDoc.SetUIHandler(this);
322
322
323
323
```
324
324
325
-
If you did NOT implement the ICustomDoc interface, then as soon as the WebOC's document property is valid, you'll need to cast it to an IOleObject, and call the SetClientSite method, passing in the class that implements IDocHostUIHandler. Set the DOCHOSTUIFLAG_DPI_AWARE flag on the DOCHOSTUIINFO passed to the GetHostInfo method call:
325
+
If you did NOT implement the ICustomDoc interface, then as soon as the WebOC's document property is valid, you'll need to cast it to an IOleObject, and call the `SetClientSite` method, passing in the class that implements IDocHostUIHandler. Set the DOCHOSTUIFLAG_DPI_AWARE flag on the DOCHOSTUIINFO passed to the `GetHostInfo` method call:
Copy file name to clipboardExpand all lines: docs/extensibility/best-practices-for-implementing-a-source-control-plug-in.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ The following technical details can help you reliably implement a source control
40
40
## Error result codes and reporting
41
41
The `SCC_OK` return code for a source control function indicates that the operation has succeeded for all files. If the operation fails, it is expected to return the last error code encountered.
42
42
43
-
The rule for reporting is that if an error occurs in the IDE, the IDE is responsible for reporting it. If an error occurs in the source control system, the source control plug-in is responsible for reporting it. For instance, "No files are currently selected" would be reported by the IDE, whereas "This file is already checked out" would be reported by the plug-in.
43
+
The rule for reporting is that if an error occurs in the IDE, the IDE is responsible for reporting it. If an error occurs in the source control system, the source control plug-in is responsible for reporting it. For instance, **No files are currently selected** would be reported by the IDE, whereas **This file is already checked out** would be reported by the plug-in.
44
44
45
45
## The context structure
46
46
During the call to the [SccInitialize](../extensibility/sccinitialize-function.md), the caller passes the `ppvContext` parameter, which is an uninitialized handle to a void. The source control plug-in can ignore this parameter or it can allocate a structure of any kind and put a pointer to that structure into the passed pointer. The IDE does not understand this structure, but it passes a pointer to this structure into every other call in the plug-in. This provides valuable context cache information to the plug-in that it can use to maintain global state information that persists across function calls without using global variables. The plug-in is responsible for freeing the structure on a call to the [SccUninitialize](../extensibility/sccuninitialize-function.md).
@@ -50,7 +50,7 @@ The following technical details can help you reliably implement a source control
50
50
## Bitflags and other command options
51
51
For each command, such as the [SccGet](../extensibility/sccget-function.md), the IDE can specify many options that change the behavior of the command.
52
52
53
-
The API supports the setting of certain options by the IDE through the `fOptions` parameter. These options are described in [Bitflags Used by Specific Commands](../extensibility/bitflags-used-by-specific-commands.md) together with the commands that they affect. In general, these are options for which the user would not be prompted.
53
+
The API supports the setting of certain options by the IDE through the `fOptions` parameter. These options are described in [Bitflags used by specific commands](../extensibility/bitflags-used-by-specific-commands.md) together with the commands that they affect. In general, these are options for which the user would not be prompted.
54
54
55
55
Most user-configurable setting options are not defined in this manner, because they vary widely among source control plug-ins. Therefore, the recommended mechanism is an **Advanced** button. For instance, in the **Get** dialog box, the IDE displays only information that it understands, but it also displays an **Advanced** button if the plug-in has options for this command. When the user clicks the **Advanced** button, the IDE calls the [SccGetCommandOptions](../extensibility/sccgetcommandoptions-function.md) to enable the source control plug-in to prompt the user for information, such as bitflags or a date/time. The plug-in returns this information in a structure that is passed back during the `SccGet` command.
0 commit comments