��������: DrawLine ��������: void ������Ϣ: HDC hDC ������Ϣ: const RECT & rc ������Ϣ: int nSize ������Ϣ: DWORD dwPenColor ������Ϣ: int nStyle ����˵��:
| 1166 | // ����˵��: |
| 1167 | //************************************ |
| 1168 | void CRenderEngine::DrawLine( HDC hDC, const RECT& rc, int nSize, DWORD dwPenColor,int nStyle /*= PS_SOLID*/ ) |
| 1169 | { |
| 1170 | ASSERT(::GetObjectType(hDC)==OBJ_DC || ::GetObjectType(hDC)==OBJ_MEMDC); |
| 1171 | |
| 1172 | LOGPEN lg; |
| 1173 | lg.lopnColor = RGB(GetBValue(dwPenColor), GetGValue(dwPenColor), GetRValue(dwPenColor)); |
| 1174 | lg.lopnStyle = nStyle; |
| 1175 | lg.lopnWidth.x = nSize; |
| 1176 | HPEN hPen = CreatePenIndirect(&lg); |
| 1177 | HPEN hOldPen = (HPEN)::SelectObject(hDC, hPen); |
| 1178 | POINT ptTemp = { 0 }; |
| 1179 | ::MoveToEx(hDC, rc.left, rc.top, &ptTemp); |
| 1180 | ::LineTo(hDC, rc.right, rc.bottom); |
| 1181 | ::SelectObject(hDC, hOldPen); |
| 1182 | ::DeleteObject(hPen); |
| 1183 | } |
| 1184 | |
| 1185 | void CRenderEngine::DrawRect(HDC hDC, const RECT& rc, int nSize, DWORD dwPenColor) |
| 1186 | { |
nothing calls this directly
no outgoing calls
no test coverage detected