| | |
| | | DWORD attributes = GetFileAttributes(path.c_str()); |
| | | return (attributes != INVALID_FILE_ATTRIBUTES && (attributes & FILE_ATTRIBUTE_DIRECTORY)); |
| | | } |
| | | |
| | | double CToolUnits::toInt32(const char* pBuffer) |
| | | { |
| | | return (pBuffer[0] & 0xff) | (pBuffer[1] & 0xff) << 8 | (pBuffer[2] & 0xff) << 16 | (pBuffer[3] & 0xff) << 24; |
| | | } |
| | | |
| | | double CToolUnits::toInt16(const char* pBuffer) |
| | | { |
| | | return (pBuffer[0] & 0xff) | (pBuffer[1] & 0xff) << 8; |
| | | } |
| | | |
| | | void CToolUnits::setDlgItemDouble(CWnd* pWnd, int nCtrlId, double value) |
| | | { |
| | | CString strText; |
| | | strText.Format(_T("%.03f"), value); |
| | | pWnd->SetDlgItemText(nCtrlId, strText); |
| | | } |