mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-19 03:51:02 -05:00
No border on Windows Pageant/PuTTYgen About boxes.
(Bringing them in line with the PuTTY one in cc6ab00b71.)
This commit is contained in:
@ -157,6 +157,23 @@ void pgp_fingerprints_msgbox(HWND owner)
|
||||
HELPCTXID(pgp_fingerprints));
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function to remove the border around a dialog item such as
|
||||
* a read-only edit control.
|
||||
*/
|
||||
void MakeDlgItemBorderless(HWND parent, int id)
|
||||
{
|
||||
HWND child = GetDlgItem(parent, id);
|
||||
LONG_PTR style = GetWindowLongPtr(child, GWL_STYLE);
|
||||
LONG_PTR exstyle = GetWindowLongPtr(child, GWL_EXSTYLE);
|
||||
style &= ~WS_BORDER;
|
||||
exstyle &= ~(WS_EX_CLIENTEDGE | WS_EX_STATICEDGE | WS_EX_WINDOWEDGE);
|
||||
SetWindowLongPtr(child, GWL_STYLE, style);
|
||||
SetWindowLongPtr(child, GWL_EXSTYLE, exstyle);
|
||||
SetWindowPos(child, NULL, 0, 0, 0, 0,
|
||||
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
|
||||
}
|
||||
|
||||
/*
|
||||
* Handy wrapper around GetDlgItemText which doesn't make you invent
|
||||
* an arbitrary length limit on the output string. Returned string is
|
||||
|
Reference in New Issue
Block a user