用mfc嘛,呵呵,继承一个新按钮类,然后create。
纯api好象比较难了。

解决方案 »

  1.   

    use  WinAPI
    SetWindowRGN
    look out MSDN for detail
      

  2.   

    给你3角类
    class CTriangleButton : public CButton
    {
    public:
    enum POINTDIRECTION {POINT_UP, POINT_DOWN, POINT_LEFT, POINT_RIGHT};

    // Construction
    public:
    CTriangleButton();
    virtual ~CTriangleButton();// Attributes
    public:protected:
    POINTDIRECTION PointDirection;
    CRgn CurrentRegion;// Operations
    public:// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CTriangleButton)
    public:
    virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
    protected:
    virtual void PreSubclassWindow();
    //}}AFX_VIRTUALpublic:
    //note: SetWindowPos decreases the cx, cy parameter to nearest number dividable by two
    BOOL SetWindowPos(const CWnd* pWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags );// Implementation
    public:
    void SetDirection(POINTDIRECTION PointDirection); //sets the direction of triangle
    POINTDIRECTION GetDirection(); //gets the direction of triangle // Generated message map functions
    protected:
    //{{AFX_MSG(CTriangleButton)
    //}}AFX_MSG DECLARE_MESSAGE_MAP()
    };
      

  3.   

      我的email是[email protected].
      

  4.   

    >[email protected]发给你两个典型的例子!
      

  5.   

    在创建按钮时调用SetWindowRgn函数指定窗口形状.
      

  6.   

    自己定义一个类,继承按钮类,重载drawim什么的函数,我计不清了,
      

  7.   

    prog_st(st) ,对不起,我的email写错了,是[email protected].不过谢谢你的热心,过几天给你加分!