Skip to content

Commit 94d6573

Browse files
committed
fix(ui): remove unnecessary IntPtr conversion for HWnd
dte.MainWindow.HWnd already returns IntPtr on x64, so wrapping it in new IntPtr() causes a compilation error. Use the value directly.
1 parent c958451 commit 94d6573

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/CodingWithCalvin.ProjectRenamifier/Commands/RenamifyProjectCommand.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@ private void RenameProject(Project project, DTE2 dte)
6767
var dialog = new RenameProjectDialog(currentName);
6868

6969
// Set the owner to the VS main window for proper modal behavior
70-
var hwnd = new IntPtr(dte.MainWindow.HWnd);
7170
var helper = new WindowInteropHelper(dialog)
7271
{
73-
Owner = hwnd
72+
Owner = dte.MainWindow.HWnd
7473
};
7574

7675
if (dialog.ShowDialog() != true)

0 commit comments

Comments
 (0)