| | |
| | | return static_cast<HCURSOR>(m_hIcon);
|
| | | }
|
| | |
|
| | |
|
| | | void CLCDDisplayTestDlg::DbgLog(CString s1)
|
| | | {
|
| | | ((CEdit*)GetDlgItem(IDC_EDIT_LOG))->ReplaceSel(s1);
|
| | | }
|
| | |
|
| | | void CLCDDisplayTestDlg::OnBnClickedButton1()
|
| | | {
|
| | |
| | | }
|
| | | m_lcd_display.RedrawWindow();
|
| | |
|
| | |
|
| | | CString s1;
|
| | | CString s2;
|
| | | unsigned char pixels[8][8] = { 0 };
|
| | |
|
| | | for (int ch = 0; ch < 128; ch++)
|
| | | {
|
| | | long long dots = font5_7[ch];
|
| | | s1.Format(_T("{"));
|
| | | for (int m = 0; m < 7; m++) {
|
| | | int line = dots & 0x3f;
|
| | | int mask = 1;
|
| | | for (int n = 0; n < 5; n++)
|
| | | {
|
| | | if (line & mask)
|
| | | {
|
| | | pixels[m][n] = 1;
|
| | | } else pixels[m][n] = 0;
|
| | | mask <<= 1;
|
| | | }
|
| | | dots >>= 6;
|
| | | }
|
| | |
|
| | | for (int m = 0; m < 5; m++) {
|
| | | int line = 0;
|
| | | int mask = 1;
|
| | | for (int n = 0; n < 7; n++)
|
| | | {
|
| | | if (pixels[n][m])
|
| | | {
|
| | | line |= mask;
|
| | | }
|
| | | mask <<= 1;
|
| | | }
|
| | | s2.Format(_T("0x%02X"), line);
|
| | | s1 += s2 ;
|
| | | if (m < 4) { s1 += _T(","); }
|
| | | }
|
| | | s1.AppendFormat(_T("}, // %c \r\n"),ch);
|
| | | DbgLog(s1);
|
| | | }
|
| | | }
|
| | |
|
| | |
|