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

Function EditAlignDlgProc

src/Edit.c:5614–5649  ·  view source on GitHub ↗

============================================================================= EditAlignDlgProc() Controls: 100 Radio Button 101 Radio Button 102 Radio Button 103 Radio Button 104 Radio Button

Source from the content-addressed store, hash-verified

5612// 104 Radio Button
5613//
5614INT_PTR CALLBACK EditAlignDlgProc ( HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam )
5615{
5616 static int *piAlignMode;
5617 switch ( umsg ) {
5618 case WM_INITDIALOG: {
5619 piAlignMode = ( int * ) lParam;
5620 CheckRadioButton ( hwnd, 100, 104, *piAlignMode + 100 );
5621 CenterDlgInParent ( hwnd );
5622 }
5623 return TRUE;
5624 case WM_COMMAND:
5625 switch ( LOWORD ( wParam ) ) {
5626 case IDOK: {
5627 *piAlignMode = 0;
5628 if ( IsDlgButtonChecked ( hwnd, 100 ) == BST_CHECKED ) {
5629 *piAlignMode = ALIGN_LEFT;
5630 } else if ( IsDlgButtonChecked ( hwnd, 101 ) == BST_CHECKED ) {
5631 *piAlignMode = ALIGN_RIGHT;
5632 } else if ( IsDlgButtonChecked ( hwnd, 102 ) == BST_CHECKED ) {
5633 *piAlignMode = ALIGN_CENTER;
5634 } else if ( IsDlgButtonChecked ( hwnd, 103 ) == BST_CHECKED ) {
5635 *piAlignMode = ALIGN_JUSTIFY;
5636 } else if ( IsDlgButtonChecked ( hwnd, 104 ) == BST_CHECKED ) {
5637 *piAlignMode = ALIGN_JUSTIFY_EX;
5638 }
5639 EndDialog ( hwnd, IDOK );
5640 }
5641 break;
5642 case IDCANCEL:
5643 EndDialog ( hwnd, IDCANCEL );
5644 break;
5645 }
5646 return TRUE;
5647 }
5648 return FALSE;
5649}
5650
5651
5652//=============================================================================

Callers

nothing calls this directly

Calls 1

CenterDlgInParentFunction · 0.85

Tested by

no test coverage detected