|
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
|
|
|
|
|
|
You might have to use CDC::GetOutputTextMetrics() along with GetTextExtentExPoint() . Add size.cx and tm.tmAveCharWidth together to see what that produces. Don't forget to select the static control's font into the DC before taking any measurements.
"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
|
|
|
|
|
DavidCrow wrote: select the static control's font into the DC
Great!!
Now it works!
Thank for your time.
Have a nice code day
|
|
|
|
|
Just a suggestion, you can wrap text in a static control.
Nibu thomas
Software Developer
|
|
|
|