Hi i am working on a dialog box in a MFC application in VC 6.0 I want to use a simple button on which there is no text written instead a bmp image is drawn. what i actually need is that the image of button will change on mouse over,mouse down,mouseup etc. I need help of you people to solve this problem.
Try to find 'BtnST' class on this site. All you have to do is place a button on dialog, delete all text and in your .h file(wich you added to yours project) declare them as 'CButtonST' (a.g. CButtonST m_btnMY). It take this much code in yours cpp:
m_btnMY.SetIcon(IDI_ICON10);//icon you want(must be in resource)<br />
m_btnMY.SetFlat(TRUE);// if u want to be flat<br />
m_btnMY.SetTooltipText(_T("some text"));//if u want tooltip
and that is it!!!
You could do a whole lot more... just reed the article and take at look at sample!
Happy I could help!
Be aware of an a little bug I discovered, tooltips working fine before you press the button, but after that (when whatever code you run under the button press ends) tooltips do not appear any more so you have to put them back:
can you please tell me which visual studio you are working in ?
Also check the font of your editor, may be it got changed.
Do a test -
Copy some text from vc editor which contains " and ?.
Paste it in notepad. Now check if notepad shows the original characters.
Also do the reverse of it, Copy text from notepad and paste in vc editor.
Are the characters got changed now also ?
You already have a message below with the same question. If you have answered which format are you using, you don't have to ask againg including the format. Just wait for an answer in your first message.
Read the good answer of toxcct or mine to the message of snoop82
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
1) you spam the boards, so, this question have been marqued as SPAM.
2) you abuse the forum, so, your first question have been marqued so too.
3) use a correct english. people here are not all native english and it's already dificult enough to express themselves in a language that's not their mother tongue, so don't force them to guess which words you're typing.
4) no one here answer for money. we all belong to this forum for the pleasure, so we're not obliged to answer.
5) ask a specific question. don't expect us to do your homework.
6) use the html tags provided to format the messages correctly. a code sample should be placed in <pre></pre> blocks. use <code></code> to highlight som words if you like.
7) don't post a huge piece of code like you did. no one will read it, and worst, you give us a bad side of yours.
8) when you have an error, provide the relevant error message.
9) and never forget to tell what you already tried to go around the problem you got...
SO, please, delete these 2 questions immediately, and re ask like you would expect someone to ask a question if you had to answer it
-- modified at 5:44 Thursday 20th September, 2007
When my dialog shows at first (before my edit control has no input string) I don't even see it (all dialog is black)! When I populate edit control m_edtInfo.SetWindowText('some text') text is displayed and edit ctrl's BkColor is shown but only behind the text not on all edit ctrl rectangle.why?
How to get all edit ctrl's region being filled with BkColour, even at first?
My apology for my language.
Last Visit: 31-Dec-99 19:00 Last Update: 4-Dec-23 11:56