| 103 | // NSFConfigDialog ���b�Z�[�W �n���h�� |
| 104 | |
| 105 | BOOL NSFConfigDialog::OnInitDialog() |
| 106 | { |
| 107 | BOOL bResult = __super::OnInitDialog(); |
| 108 | |
| 109 | RECT rect, rect_b; |
| 110 | GetClientRect(&rect); |
| 111 | rect_b.top = rect.bottom + 8; |
| 112 | rect_b.right = rect.right-8; |
| 113 | rect_b.left= rect_b.right; |
| 114 | |
| 115 | CString str; |
| 116 | str.LoadString(IDS_CANCEL); |
| 117 | |
| 118 | CDC *pDC = GetDC(); |
| 119 | CSize cs = pDC->GetTextExtent(str); |
| 120 | ReleaseDC(pDC); |
| 121 | |
| 122 | rect_b.bottom = rect_b.top + cs.cy * 3 / 2; |
| 123 | rect_b.left = rect_b.right - cs.cx; |
| 124 | m_cancel.Create(str, BS_TEXT|BS_CENTER|BS_PUSHBUTTON|WS_CHILD|WS_TABSTOP|WS_VISIBLE, rect_b, this, 3); |
| 125 | m_cancel.SetFont(GetFont()); |
| 126 | rect_b.right = rect_b.left - 4; |
| 127 | str.LoadString(IDS_APPLY); |
| 128 | rect_b.left = rect_b.right - cs.cx; |
| 129 | m_apply.Create(str, BS_TEXT|BS_CENTER|BS_PUSHBUTTON|WS_CHILD|WS_TABSTOP|WS_VISIBLE, rect_b, this, 2); |
| 130 | m_apply.SetFont(GetFont()); |
| 131 | rect_b.right = rect_b.left - 4; |
| 132 | rect_b.left = rect_b.right - cs.cx; |
| 133 | m_ok.Create("OK", BS_TEXT|BS_CENTER|BS_DEFPUSHBUTTON|WS_CHILD|WS_TABSTOP|WS_VISIBLE, rect_b, this, 1); |
| 134 | m_ok.SetFont(GetFont()); |
| 135 | |
| 136 | GetWindowRect(&rect); |
| 137 | rect.bottom += cs.cy * 3 / 2 + 8 + 8; |
| 138 | MoveWindow(&rect); |
| 139 | |
| 140 | UpdateNSFPlayerConfig(TRUE); |
| 141 | |
| 142 | return bResult; |
| 143 | } |
| 144 | |
| 145 | void NSFConfigDialog::OnOK() |
| 146 | { |
nothing calls this directly
no outgoing calls
no test coverage detected