回复 113楼 beyondyf
是啊 我制作的过程中是老提示 可能丢失像素 WINDOWS自带的画图 PS ACDSee ArtIcon 我都试着用了 不太会搞高清晰的裁剪美观的棋子啊 你说的那个BUG 其实是程序故意设置的 让人直观起点位置。只要删除一句画选择框的语句就成了。
梅尚程荀
马谭杨奚
// Draw On the lattice 根据具体消息在格子上画图 static void DrawLattice(int cPos, BOOL select) { int PosTurn, cx, cy, ChessmanID; PosTurn = WV.bTurn ? LatticeTurn(cPos) : cPos; cx = BoardEdge + (GetX(PosTurn) - 3) * LatticeSize; cy = BoardEdge + (GetY(PosTurn) - 3) * LatticeSize; SelectObject(WV.hdcTemp, WV.hbmpBoard); BitBlt(WV.hdcMain, cx, cy, LatticeSize, LatticeSize, WV.hdcTemp, cx, cy, SRCCOPY); ChessmanID = State.Chessman[cPos]; if (ChessmanID != 0) DrawTransMap(WV.hdcMain, WV.hdcTemp, cx, cy, WV.hbmpChessman[ChessmanID]); if (select != 0) DrawTransMap(WV.hdcMain, WV.hdcTemp, cx, cy, WV.hbmpSelected); }
case WM_CREATE: GetWindowRect(hWnd, &rect); x = rect.left; y = rect.top; rect.right = rect.left + BoardWidth; rect.bottom = rect.top + BoardHeight ; AdjustWindowRect(&rect, WINDOW_STYLES, TRUE); MoveWindow(hWnd, x, y, rect.right - rect.left, rect.bottom - rect.top, TRUE); break;
#define WINDOW_STYLES WS_OVERLAPPEDWINDOW | WS_SYSMENU | WS_CAPTION const int LatticeSize = 52; const int BoardEdge = 4; const int BoardWidth = 2 * BoardEdge + 9 * LatticeSize; const int BoardHeight = 2 * BoardEdge + 10 * LatticeSize;