|
Hi, thanks for your response.
When I set the image list, does this refer to just the image for one button? My understanding is that the toolbar gets its button images from a single BMP image "strip". If this is the case, then it looks like I would have to repeat the image "strip" for each button that has two image states.
If I had a tool bar that had only one button that behaved in the way that I described, then I would need only two image strips. However, if TWO buttons on my toolbar toggled between two images, then I would need FOUR image strips to cover every possible permutation. If there were 3, then EIGHT! And so on...
Have I understood this?
Thank you,
Mark
-- modified at 15:16 Wednesday 8th March, 2006
|
|
|
|
|
Read this article:
http://www.codeguru.com/cpp/controls/toolbar/miscellaneous/article.php/c2521/
Create 3 different toolbars one with live colors, second dimmed colors, third with hot mode (when mouse moves over it)
Using OnUpdateUI code your can display buttons of the toolbars
Some graphical and icon software you need to prepare the toolbar
I hope this helps you sort it out.
THelvaci
|
|
|
|
|
Hi, thanks for your response.
I'm not sure that this is exactly what I'm looking for. It has been my experience that if I provide ONE toolbar BMP, then Windows magically provides "dimming services" for each button when that button is disabled. I've never had a problem with that. Furthermore, I'm not really looking for the button to change its appearance when the mouse cursor passes over it. It is enough for my purposes to have the little "tool tip" message pop up when the mouse passes over.
What I do want is for at least one button on the tool bar to completely change the bit map it is using depending on some internal state of the program. For example, when my USB connection to some device is inactive, I want the button to display a BMP that shows a picture of a plug being inserted into a socket. THis means that it will attempt to open the port and connect to the device when the button is clicked. When the user clicks that and the port successfully opens, I want the button to change function. I want it to show a picture of a plug being pulled OUT of a socket and the user will click that to disconnect from the USB port.
I have worked with applications that do this, so I know it can be done.
If you have any other advice, I would appreciate it.
Thank you,
Mark
|
|
|
|
|
Did you ever find a solution for this? I have 8 buttons that I want to do this with. Managing 256 toolbars would be horrendaous.
|
|
|
|
|
Hi!
I'm a prety beginner with Visual Studio 2005 Standard Edition.
I have converted vs 2003 project, in C++, into VS 2005,
But, I can't find EXE file in either debug or release.
When I code new project VS 2005, it automatically generate EXE.
But, converted one doesn't give me EXE file.
I checked Project/configuration manager release, win32.
I don't use any MFC or DLL, I just use pure C++ with OpenGL.
Anybody can help me?
Yonggoo
|
|
|
|
|
click on the "build project" menu item...
|
|
|
|
|
What's "build project" menu item?
I don't have any.
Under "Build" menu,
I have "projcet only"
build only ???
rebulid only ???
clean link only ???
Yonggoo
|
|
|
|
|
did you open the solution ?!
|
|
|
|
|
do you have the right project/solution selected ?
maybe there are some new compiler/linker errors that 2005 detects and stops the compilation ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I got it!
It's set up to send EXE files to a different directory.
Thanks!
Yonggoo
|
|
|
|
|
Hello !
I have a form (CViewForm derivative) with two controls:
1. edit control
2. button control
I would like to click a button to enter some text to edit box, but I don't want the edit box to lose a focus.
Now, if I click a button, edit box is properly updated, but it loses focus (the button becomes focused).
Does somebody know if it is any way to make a button (or any other control) "unfocusable" (but not by disabling it, it should properly response to mouse clicks) ?
I hope somebody knows
Regards,
WTL
|
|
|
|
|
add to the editbox a WM_KILLFOCUS handler.
it will be called each time the edit looses focus.
inside the handler, call WM_SETFOCUS ...
|
|
|
|
|
you can to add style Edit WS_POPUP with ModifyStyle but this way one problem
that all messages post to edit and you can use Alt+F4 for close edit
else dont work with buttons or controls in the form
|
|
|
|
|
Thanks for your advice !
I have try the first one, but I should make changes (add message hendler) to every "focusable" object existing in a box (in real life there is more controls than in my sample ). Second one unfortunately doesnt fit my needs...
Now I'm playing with MA_NOACTIVATE (OnMouseActivate), with only partial success...
|
|
|
|
|
you're welcome Wojciech Litwin
your question is attractive and I hope that you find your answer early.
I tested your question,But I think my information is poor.
Have a nice day
|
|
|
|
|
Hi,
I have a little problem converting a string to a number.
Situation:
string : "1.555,23"
thousand seperator = "."
decimal seperator = ","
Why doesn't this help?
<br />
lconv* pConv = localeconv();<br />
pConv->decimal_point = ",";<br />
pConv->thousands_sep = ".";<br />
Using the default "C-locale", things get messed up.
How can I make sure it uses the (above) seperators so i get correct conversion?
Best regards,
Jens
|
|
|
|
|
JensB wrote: I have a little problem converting a string to a number.
Use atoi() or atof() .
Use localeconv() to get information about the locale settings. Use setlocale() to set, change, or query some or all of the current program locale information. So are you trying to get or set information? Why aren't you using GetLocaleInfo() and SetLocaleInfo() ?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
How to know the length (in pixel) of a text string in a CStatic object?
It isn't sure that the current displayed text is the text on interest.
[Seemes that pStatic->GetDC()->GetOutputTextExtent("bye bye") isn't the right way]
thanks
Have a nice code day
|
|
|
|
|
What about CDC::GetTextExtent()?
|
|
|
|
|
I get the same values in boh cases,
but far from the real length!
Have a nice code day
|
|
|
|
|
I get the same values in both cases,
but far from the real length!
Have a nice code day
|
|
|
|
|
Why do you need to know the width of a string in pixels?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I have a dynamic dialog, and sometimes the text is too large!
So, I was thinking to resize it, but I need to know the text length!
Any tips?
thanks.
Have a nice code day
|
|
|
|
|
So if you have text that is 1025 pixels wide on a 1024x768 monitor, will the dialog therefore go off the edge of the screen?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|