Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9164777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:45:45+00:00 2026-06-17T14:45:45+00:00

CButton *btn = new CButton(); btn->Create(btn, WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(0,0,50,50), this, 1234); btn = new CButton();

  • 0
CButton *btn = new CButton();
btn->Create("btn", WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(0,0,50,50), this, 1234);
btn = new CButton();
btn->Create("btn", WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(40,30,50,50), this, 1234);

running above code in CDialog::OnInitDialog() will only display first button correctly, the second button will be displayed incompletely.

Any suggestion is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:45:46+00:00Added an answer on June 17, 2026 at 2:45 pm

    The CRect constructor you’re using is not doing what you think it’s doing. The 4 parameter override takes left, right, top, bottom as parameters. You are simply making the rectangle too small – there’s nothing incomplete about it.

    As an aside you’re giving both controls the same control ID of 1234 – that’s potentially dangerous – you should rather give them unique values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I create the CButton in the myTab class, I can't interact with it
I am looking for an accurate conversion of this C# Linq code to VB.net.
I get this: This is a sample code of the two classes: main.h class
I am new in JQ. I have created this fiddle here: http://jsfiddle.net/SZ6mY/7/ All I
I have a small (6x9) graphic that I want to draw on a CButton.
How do I change the border color of focused/unfocused CEdit, CListCntl, CButton in WinCE/Windows
I have implemented my custom button inheriting from CButton and drawing it by using
Lets say in a dialog, we dynamically create a variable number of CWnds... like
I've not been able to find this out, which seems weird. When I add
I have index.php inside in this has modal window with login link. Modal window

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.