News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

How to Hide Button behind image or icon?

Started by hfheatherfox07, August 18, 2012, 08:53:39 AM

Previous topic - Next topic

hfheatherfox07

Hi there,
I was wondering how to hide a button behind an image or icon....
I can make this work with region only why  :( ?


Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

qWord

Quote from: hfheatherfox07 on August 18, 2012, 08:53:39 AMI was wondering how to hide a button behind an image or icon....
ShowWindow(hBtn,SW_HIDE) ?
MREAL macros - when you need floating point arithmetic while assembling!

Antariy

Set a BS_OWNERDRAW window style to a button.


CONTROL "IDC_BTN",IDC_BTN1,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_CLIPSIBLINGS|WS_TABSTOP|BS_OWNERDRAW,12,12,36,18,WS_EX_OVERLAPPEDWINDOW

hfheatherfox07

Quote from: Antariy on August 18, 2012, 11:52:04 AM
Set a BS_OWNERDRAW window style to a button.


CONTROL "IDC_BTN",IDC_BTN1,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_CLIPSIBLINGS|WS_TABSTOP|BS_OWNERDRAW,12,12,36,18,WS_EX_OVERLAPPEDWINDOW


That leaves a static in the shape of the Button ....It does not show icon or bitmap that is there
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

hfheatherfox07

Quote from: qWord on August 18, 2012, 10:34:04 AM
Quote from: hfheatherfox07 on August 18, 2012, 08:53:39 AMI was wondering how to hide a button behind an image or icon....
ShowWindow(hBtn,SW_HIDE) ?

LOL

The Button Is hidden ...but wont work
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

Antariy

Use static for a bitmap displaying - declare it in a RC file after button declaration.

hfheatherfox07

Oh Ok ....
That works but ...it breaks the image.... you meant add a static image  on top of the bottom right ?
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

hfheatherfox07

LOL Never Mind .....
I Got what you were saying
Thank you that works  :biggrin:
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.