Register | Login

Quick search in Advantech Support Portal 
Print

[Technical Inquiry] How to obtain button bit map using VC++?(solved)

How to obtain button bit map using VC++?(solved)

Hi guys

Now i want to do something like getting the rectangle bit map for my rectangular button using VC++.

After i get the bit map area.

I want to have an if statement

if (mouse land on that bit map area of rectange)

Is this possible?

Thank you very much indeed

[ Last edited by pingpong at 2010-2-17 18:38 ]
Share |

TOP

Definitely possible, but you will have to subclass the button and intercept WM_MOUSEMOVE. For details on how to do this, see the documentation for SetWindowLongPtr. You will pass it the HWND for the button, the index of GWL_WNDPROC and the address of your intercepting function.
Share |

TOP

Thank you mate.
I am doing a Dialog based application. MCF.
I don't think it is possible to pass value from one class to another right?
Share |

TOP

>>I don't think it is possible to pass value from one class to another right?

Not sure what you're getting at. Passing a value from one class to another in the C++ language? Sure, that's possible. Just have to get hold of the instance of the class that you want to pass the value to. How you get that instance depends on the architecture of your code.
Share |

TOP

Good. I am able to pass data from one class to another now. thank you very much.
Share |

TOP