|
So have you used the debugger to step into that method to find out why?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I had to re-install VS2008 when I re-installed the operating system. Somehow the "Just-In-Time Debugger" de not get installed. I tried going to Microsoft downloads for it and all they offer is VS20088 SP1. Every time I installed VS2008 SP1 it messed VS2008 up so I won't install it. Does anyone know how I can get a copy of the "Just-In-Time Debugger" from microsoft?(Microsoft Script Debugger is another name for it).
A C++ programming language novice, but striving to learn
|
|
|
|
|
microsoft bug team will surly reply you back on this issue!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Anyone have any experience and thoughts to share about Adobe GIL
GIL[^]
I'm considering GIL library as replacement for GDI+ for my ongoing project.
Thanks
|
|
|
|
|
I have a DIALOG project with more than fifty EDIT.I want to make the cursor move to the next EDIT when the length of each EDIT get five.
But I don't know how to realize it.Please help me!
Thanks!
|
|
|
|
|
You could handle the KeyPress event and call GetWindowText on the edit control to count how many chars have been entered.
Then, when 5 chars have been entered, call SetFocus on the next edit control to move the cursor there.
|
|
|
|
|
|
I'd go with Richard's reply, except instead of SetFocus, I'd use
the WM_NEXTDLGCTL message. WM_NEXTDLGCTL automatically selects the
edit control text so the user can just type if there's existing text.
Of course, if the edit control is empty it does't make a difference
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
I am developing a GUI based application using C++ and MFC. I have a couple of menu options
that should be grayed out when the application starts up. What I mean by grayed out is that
they are not valid for the user to select and the visual appearance of the menu option should
reflect that. The menu is defined in an RC (resource script) file. What is the best way to
have these menu selections grayed out?
Thanks
Bob
|
|
|
|
|
Typically, the ON_UPDATE_COMMAND_UI Macro[^] is used to provide a command enabler function.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark or anybody else that knows,
Thanks for the response. However, I am not sure what you are saying. Please consider
the following menu:
Selection 1
Selection a
Selection b
Selection c
Selection d
and the user chose Selection 1, I use then have a function (or method) to gray out
the sub-menu selection that I wanted grayed out. If so, how would the handler do
that?
I was thinking that I might do it when the menu is first created. I world do this by using the macro ON_WM_INITMENUPOPUP. What do you think of my approach?
Bob
|
|
|
|
|
You can set the menu status with this function call:
CMenu::SetMenuItemInfo
|
|
|
|
|
BobInNJ wrote: I am not sure what you are saying
I'm saying typically Selection a, Selection b, etc. each have an associated command
(for example, using the wizards, ID_SELECTION1_SELECTIONA)
IDR_MYMENU MENU
BEGIN
POPUP "Selection 1"
BEGIN
MENUITEM "Selection a", ID_SELECTION1_SELECTIONA
MENUITEM "Selection b", ID_SELECTION1_SELECTIONB
END
END
ON_UPDATE_COMMAND_UI(ID_SELECTION1_SELECTIONA, &CMainFrame::OnUpdateSelection1Selectiona)
...
void CMyMenuWindowFrame::OnUpdateSelection1Selectiona(CCmdUI *pCmdUI)
{
if (some_state)
pCmdUI->Enable(TRUE);
else
pCmdUI->Enable(FALSE);
}
Three advantages of using the command macros are:
1) MFC does the work for you
2) The IDE has wizards to add the command handler and enabler functions with just clicks
3) If you have a toolbar or possibly other context menu(s) with equivalent
commands, you only have to write the enabling code in one place.
That's the MFC way.....you are free to do it manually if you want to.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark,
Thanks for the detailed response. It solved my problem.
Bob
|
|
|
|
|
Hi! I have a CBrush created with the CBrush(COLORREF crColor) constructor. I'd like to know if I can retrieve this colorref later from the CBrush, or do I have to store it in a variable? Thx
|
|
|
|
|
This method [^] looks promising (see the lbColor member of the LOGBRUSH [^] struct).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
You're welcome.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
Is it possible to enable/allow ActiveX controls inside my webbrowser control (CHtmlView).
Please do not say it is not possible!
Niki
PS: Background: I'm writing a database application where data is stored in html format. There are also popups (similar to the old WinHelp32) which are implemented using JavaScript (or similar things; these scripts are not written by me). When I open such a HTML file directly in IE I get the security warning (even when all files are local). In my webbrowser control I even do not get a warning but only script errors.
|
|
|
|
|
I have found CoInternetSetFeatureEnabled.
But nothing changes
I have already set FEATURE_WEBOC_POPUPMANAGEMENT, FEATURE_SECURITYBAND, FEATURE_LOCALMACHINE_LOCKDOWN, FEATURE_RESTRICT_ACTIVEXINSTALL. But nothing changes
I again get a script error with "Permission denied"
|
|
|
|
|
The problem was not the browser control itself but my async pluggable protocol!
I missed to handle PARSE_SECURE_URL for the secure manager so two different URLs in my protocol were essentially in a different domain.
So I got "permission denied"-messages when accessing different frames (cross frame scripting prevention)
Regards,
Niki
|
|
|
|
|
Hello, I have a problem with static variables and inheritance
<br />
<br />
class BVolume {<br />
protected:<br />
enum { NONE = 0, SPHERE, BOX, PLANE };<br />
public:<br />
static const unsigned short type = NONE;<br />
<br />
virtual bool TestCollision(BVolume * volume)=0;<br />
<br />
};<br />
<br />
<br />
<br />
class BBox : public BVolume {<br />
public:<br />
static const unsigned short type = BOX;<br />
<br />
bool TestCollision(BVolume * volume) { return Collision< volume -> type >(volume); }<br />
<br />
template< unsigned short type > bool Collision(BVolume * volume) { return false; }<br />
<br />
template< > bool Collision< BOX >(BVolume * box) { return BoxCollision(static_cast< BBox * >(box)); }<br />
template< > bool Collision< SPHERE >(BVolume * sphere) { return SphereCollision(static_cast< BSphere * >(sphere)); }<br />
<br />
bool BoxCollision(BBox * box) { return true; }
bool SphereCollision(BSphere * box) { return true; }
<br />
<br />
};<br />
<br />
<br />
<br />
BBox b1, b2;<br />
<br />
bool Collided() {<br />
<br />
return b1.TestCollision(&b2);<br />
<br />
}<br />
<br />
if(Collided()) std::cout << "Collided";<br />
else std::cout << "Not Collided";<br />
<br />
the code above outputs "Not Collided"
I found the problem but i don't know how to solve it.
Problem:
volume->type in BBox::TestCollision is NONE (it needs to be BOX or SPHERE here) because static is a Compile Time "Thing". I need something Run Time "Thing".
What can i do? Please Help me with that problem!
Thanks,
Kasya
|
|
|
|
|
Why don't you use a virtual method, for instance getType(), instead of a const?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
please tell me how? Like that:
virtual const unsigned short getType() { return BOX; }
It doesn't work i tested it.
If you mean another thing please tell me.
Thanks,
Kasya
|
|
|
|