圆边按钮 [英] Round Edge Button

查看:95
本文介绍了圆边按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我确实想在背景上绘制渐变的圆形按钮

有人可以帮我吗?

Hello,

I do want to draw round edged button with gradient in back ground

Can anyone help me out?

推荐答案

对于入门而言,这是C#中的示例
C#中的圆形按钮 [
For head start, here is a sample of it in C#
Round Button in C#[^]

Update:
I saw the tag. I gave you that as a start to you. You will have to Paint it yourself. Handle the Paint event for the button.

or are you asking the full codebase for what you need?


但是我必须在这里定义一些内容:粗体.

But i have to define some thing here: the bold.

m_cButon.Create("", WS_CHILD | WS_VISIBLE, CRect(150, 20, 250, 43), this, UNIT ID);



提供什么UINT ID?



what to provide for UINT ID?


Eugen,我之前发送给您的项目,我正在从事同一项目.

我在一个cpp中创建按钮,并在另一个cpp中使用它.像这样

Eugen, the project which i had sent you earlier, I am working on the same project.

I am creating button in one cpp and using it in another cpp. Like this.

int CMyButton::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (CButton::OnCreate(lpCreateStruct) == -1)
        return -1;

    // TODO:  Add your specialized creation code here
    m_cButon.Create("", WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(20, 34, 90, 79), this, 1);

    return 0;
}



并在这里使用.



And using here.

void CDisplayBar::DoDataExchange(CDataExchange* pDX)
{
    // TODO: Add your specialized code here and/or call the base class

    CDialogBar::DoDataExchange(pDX);

    DDX_Control(pDX, 1, m_Btn1);
 }



为了进一步说明,请尝试查看我发送的名为 ColoredButton 的项目.



For more clarification, try to look on my sent project which is named as ColoredButton.


这篇关于圆边按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆