Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Button to owner drawn class #555

Open
compnerd opened this issue May 22, 2021 · 2 comments
Open

Change Button to owner drawn class #555

compnerd opened this issue May 22, 2021 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@compnerd
Copy link
Owner

Convert the Button implementation to use an owner drawn button. This should allow for changing the button to include an image and title simultaneously. Additionally, it would allow for embedding a Label and ImageView members which can then be made available to the user to control the button more thoroughly.

@compnerd compnerd added enhancement New feature or request help wanted Extra attention is needed labels May 22, 2021
@h4cky
Copy link

h4cky commented Jun 8, 2021

Last few days I am playing with BS_OWNERDRAW on Button, and while my drawing code works (for background, border and text colors), I am having issues with passing Button ref to the WndProc which handles the drawing of the Button.

I can't promise anything at the moment.

@compnerd
Copy link
Owner Author

compnerd commented Jun 9, 2021

Ah, you mean the reference to the Button instance? You cannot do that directly; the way to accomplish that is by squirreling away the pointer into GWLP_USERDATA. There are a couple of examples of that in the tree already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants