MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / InfoBoxDlgProc

Function InfoBoxDlgProc

src/Dialogs.c:1726–1758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1724} INFOBOX, *LPINFOBOX;
1725
1726INT_PTR CALLBACK InfoBoxDlgProc ( HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam )
1727{
1728 LPINFOBOX lpib;
1729 switch ( umsg ) {
1730 case WM_INITDIALOG:
1731 lpib = ( LPINFOBOX ) lParam;
1732 SetWindowLongPtr ( hwnd, DWLP_USER, ( LONG_PTR ) lParam );
1733 SendDlgItemMessage ( hwnd, IDC_INFOBOXICON, STM_SETICON,
1734 ( WPARAM ) LoadIcon ( NULL, IDI_EXCLAMATION ), 0 );
1735 SetDlgItemText ( hwnd, IDC_INFOBOXTEXT, lpib->lpstrMessage );
1736 if ( lpib->bDisableCheckBox ) {
1737 EnableWindow ( GetDlgItem ( hwnd, IDC_INFOBOXCHECK ), FALSE );
1738 }
1739 LocalFree ( lpib->lpstrMessage );
1740 CenterDlgInParent ( hwnd );
1741 return TRUE;
1742 case WM_COMMAND:
1743 switch ( LOWORD ( wParam ) ) {
1744 case IDOK:
1745 case IDCANCEL:
1746 case IDYES:
1747 case IDNO:
1748 lpib = ( LPINFOBOX ) GetWindowLongPtr ( hwnd, DWLP_USER );
1749 if ( IsDlgButtonChecked ( hwnd, IDC_INFOBOXCHECK ) ) {
1750 IniSetInt ( L"Suppressed Messages", lpib->lpstrSetting, 1 );
1751 }
1752 EndDialog ( hwnd, LOWORD ( wParam ) );
1753 break;
1754 }
1755 return TRUE;
1756 }
1757 return FALSE;
1758}
1759
1760
1761//=============================================================================

Callers

nothing calls this directly

Calls 4

SetWindowLongPtrFunction · 0.85
CenterDlgInParentFunction · 0.85
GetWindowLongPtrFunction · 0.85
IniSetIntFunction · 0.85

Tested by

no test coverage detected