Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #633 from dotnet/fix629
Browse files Browse the repository at this point in the history
Fix DLGTEMPLATE and DLGITEMTEMPLATE field sizes
  • Loading branch information
AArnott committed Jan 3, 2023
2 parents 4ded1cd + f0efeec commit c01077e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 28 deletions.
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ anything else found in native header files for these reasons:

| C/C++ type | C# type |
| ----------- | --------- |
| `short` | `short` |
| `WORD` | `ushort` |
| `DWORD` | `uint` |
| `int` | `int` |
| `long` | `int` |
| `long long` | `long` |
Expand Down
28 changes: 14 additions & 14 deletions src/User32/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,22 +164,22 @@ PInvoke.User32.DISPLAYCONFIG_VIDEO_SIGNAL_INFO.vSyncFreq -> PInvoke.User32.DISPL
PInvoke.User32.DISPLAYCONFIG_VIDEO_SIGNAL_INFO.videoStandard -> uint
PInvoke.User32.DLGITEMTEMPLATE
PInvoke.User32.DLGITEMTEMPLATE.DLGITEMTEMPLATE() -> void
PInvoke.User32.DLGITEMTEMPLATE.cx -> byte
PInvoke.User32.DLGITEMTEMPLATE.cy -> byte
PInvoke.User32.DLGITEMTEMPLATE.dwExtendedStyle -> int
PInvoke.User32.DLGITEMTEMPLATE.id -> short
PInvoke.User32.DLGITEMTEMPLATE.style -> int
PInvoke.User32.DLGITEMTEMPLATE.x -> byte
PInvoke.User32.DLGITEMTEMPLATE.y -> byte
PInvoke.User32.DLGITEMTEMPLATE.cx -> short
PInvoke.User32.DLGITEMTEMPLATE.cy -> short
PInvoke.User32.DLGITEMTEMPLATE.dwExtendedStyle -> uint
PInvoke.User32.DLGITEMTEMPLATE.id -> ushort
PInvoke.User32.DLGITEMTEMPLATE.style -> uint
PInvoke.User32.DLGITEMTEMPLATE.x -> short
PInvoke.User32.DLGITEMTEMPLATE.y -> short
PInvoke.User32.DLGTEMPLATE
PInvoke.User32.DLGTEMPLATE.DLGTEMPLATE() -> void
PInvoke.User32.DLGTEMPLATE.cdit -> short
PInvoke.User32.DLGTEMPLATE.cx -> byte
PInvoke.User32.DLGTEMPLATE.cy -> byte
PInvoke.User32.DLGTEMPLATE.dwExtendedStyle -> int
PInvoke.User32.DLGTEMPLATE.style -> int
PInvoke.User32.DLGTEMPLATE.x -> byte
PInvoke.User32.DLGTEMPLATE.y -> byte
PInvoke.User32.DLGTEMPLATE.cdit -> ushort
PInvoke.User32.DLGTEMPLATE.cx -> short
PInvoke.User32.DLGTEMPLATE.cy -> short
PInvoke.User32.DLGTEMPLATE.dwExtendedStyle -> uint
PInvoke.User32.DLGTEMPLATE.style -> uint
PInvoke.User32.DLGTEMPLATE.x -> short
PInvoke.User32.DLGTEMPLATE.y -> short
PInvoke.User32.DRAWTEXTPARAMS
PInvoke.User32.DRAWTEXTPARAMS.DRAWTEXTPARAMS() -> void
PInvoke.User32.DRAWTEXTPARAMS.cbSize -> uint
Expand Down
14 changes: 7 additions & 7 deletions src/User32/User32+DLGITEMTEMPLATE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,40 +21,40 @@ public struct DLGITEMTEMPLATE
/// The style of the control. This member can be a combination of window style values (such as WS_BORDER) and one or
/// more of the control style values (such as BS_PUSHBUTTON and ES_LEFT).
/// </summary>
public int style;
public uint style;

/// <summary>
/// The extended styles for a window. This member is not used to create controls in dialog boxes, but applications that
/// use dialog box templates can use it to create other types of windows.
/// </summary>
public int dwExtendedStyle;
public uint dwExtendedStyle;

/// <summary>
/// The x-coordinate, in dialog box units, of the upper-left corner of the control. This coordinate is always relative
/// to the upper-left corner of the dialog box's client area.
/// </summary>
public byte x;
public short x;

/// <summary>
/// The y-coordinate, in dialog box units, of the upper-left corner of the control. This coordinate is always relative
/// to the upper-left corner of the dialog box's client area.
/// </summary>
public byte y;
public short y;

/// <summary>
/// The width, in dialog box units, of the control.
/// </summary>
public byte cx;
public short cx;

/// <summary>
/// The height, in dialog box units, of the control.
/// </summary>
public byte cy;
public short cy;

/// <summary>
/// The control identifier.
/// </summary>
public short id;
public ushort id;
}
}
}
14 changes: 7 additions & 7 deletions src/User32/User32+DLGTEMPLATE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,38 +31,38 @@ public struct DLGTEMPLATE
/// </para>
/// <para>The DS_SHELLFONT style is not supported in the DLGTEMPLATE header.</para>
/// </summary>
public int style;
public uint style;

/// <summary>
/// The extended styles for a window. This member is not used to create dialog boxes, but applications that use dialog
/// box templates can use it to create other types of windows.
/// </summary>
public int dwExtendedStyle;
public uint dwExtendedStyle;

/// <summary>
/// The number of items in the dialog box.
/// </summary>
public short cdit;
public ushort cdit;

/// <summary>
/// The x-coordinate, in dialog box units, of the upper-left corner of the dialog box.
/// </summary>
public byte x;
public short x;

/// <summary>
/// The y-coordinate, in dialog box units, of the upper-left corner of the dialog box.
/// </summary>
public byte y;
public short y;

/// <summary>
/// The width, in dialog box units, of the dialog box.
/// </summary>
public byte cx;
public short cx;

/// <summary>
/// The height, in dialog box units, of the dialog box.
/// </summary>
public byte cy;
public short cy;
}
}
}

0 comments on commit c01077e

Please sign in to comment.