| 78 | } |
| 79 | |
| 80 | void KeyWindow::draw_notes(CDC *pDC, int x, int y, int nx, int ny) |
| 81 | { |
| 82 | CRect rect; |
| 83 | int i; |
| 84 | for(i=0; i<14*8; i++) |
| 85 | { |
| 86 | if(m_nKeyStatus[i]) |
| 87 | { |
| 88 | if(i&1) |
| 89 | { |
| 90 | rect.left = x + i/2*nx+nx/2 + nx/4; |
| 91 | rect.top = y-1+ny/4; |
| 92 | } |
| 93 | else |
| 94 | { |
| 95 | rect.left = x + i/2*nx + nx/4; |
| 96 | rect.top = y+4+ny*4/7; |
| 97 | } |
| 98 | rect.right = rect.left + nx/2; |
| 99 | rect.bottom = rect.top + nx/2; |
| 100 | pDC->FillSolidRect(&rect, RGB((m_nKeyColor[i]>>16)&0xFF,(m_nKeyColor[i]>>8)&0xFF,m_nKeyColor[i]&0xFF)); |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | // �I�N�^�[�u�`�� |
| 105 | if(m_bShowOctave) |
| 106 | { |
| 107 | for(i=0; i<8; i++) |
| 108 | pDC->BitBlt(x+i*7*nx+1,y+1+ny-2-6,4,5,&m_digDC,(i+1)*4,0,SRCCOPY); |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | void KeyWindow::KeyOn(int note, int color) |
| 113 | { |
nothing calls this directly
no outgoing calls
no test coverage detected