|
Well at least you have the source so you will just have to dig in and figure it out. Menu's can be a quite stubborn. It sounds like perhaps something is not being created successfully so I might start by checking out how they implemented creation. Like are they logging or asserting or throwing or whatever. Since you have source you could add any of those that might be helpful in researching the problem.
led mike
|
|
|
|
|
well, I noticed something else which might provide a hint. If I hit the Alt key and then the down arrow, the drop down menus appear, but they appear as though they're dropping down from under the title bar and each top level menu (accessed by using the right and left arrow keys) shows up in the same place.
I guess I'll dig into their rendering code. Maybe the positioning was somehow hosed.
|
|
|
|
|
Interesting. Are your controls, by chance, contained within other controls?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
no, they're direct children of the dialog.
|
|
|
|
|
Hmmm... I don't have that same problem (using the same library). Contained control controls are not showing up and the ones that do, Spy++ says it can't find the window at all. So while I can find the controls, Spy++ still can't find them.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
Hello everyone,
I am learning set_se_translator, and there are some good resources about how to translate structured exception into C++ exception, like,
http://www.codeproject.com/KB/cpp/seexception.aspx
1.
What makes me confused is, when we are talking about translate, it means both structured exception and C++ exception may occur in a C++ program, right?
2.
But from build option, we can select either /EHa or /EHsc, means we can only select one type of exception, either asynchronous (structured) or synchronous (C++ exception).
(1) and (2) are conflict?
thanks in advance,
George
|
|
|
|
|
/EHsc enables standard exceptions. It does say nothing about the proprietary form.
Also, MSDN clearly states
"The two exception handling models, synchronous and asynchronous, are fully compatible and can be mixed in the same application."
under the topic "Exception Handling: Default Synchronous Exception Model"
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Thanks jhwurmbach,
1. You mean in the current part of the application, which handles C++ exception;
2. The current part of application invokes another model, which throws structured exception to the current part;
3. The current part of application uses set_se_translator to convert structured exception to C++ exception and catch it (since current model is designed to handle only C++ exception).
Is my description correct?
If yes, my confusion is in the project setting, we could either select /EHa or /EHsc, means only one model could be selected, and how to make the current part and the other model in my sample above to have different exception model?
regards,
George
|
|
|
|
|
Please read the configuration settings again!
Enable C++ Exceptions:
1: No
2: Yes (/EHsc)
3: Yes with SEH Exceptions (/EHa)
Maxwell Chen
|
|
|
|
|
Sorry Maxwell,
I think it is my mistake.
The important point should be,
Maxwell Chen wrote: 3: Yes with SEH Exceptions (/EHa) // Standard C++ way plus SEH.
which means enable both structured exception and C++ exception, right?
regards,
George
|
|
|
|
|
Yes.
You can create a small test project and test both ways mixed.
Maxwell Chen
|
|
|
|
|
Thanks Maxwell,
1.
So, set_se_handler works only in /EHa mode, since in /EHsc, there is no structured exception, so no need to convert, right?
2.
Maxwell Chen wrote: test both ways mixed
Confused about what do you mean both ways. In my current understanding, only /EHa mixed structured and C++ exception. /EHsc only produces C++ exception -- no mix. Correct me if I am wrong.
regards,
George
|
|
|
|
|
You were asking if the SEH model is compatible with the Standard C++ Exception model. You have already got the answer to your question. The SEH model and the Standard C++ Exception model can exist together in one single project. And you know the syntaxes of both models. I suggest you to launch your VC++ IDE, and test it yourself.
Maxwell Chen
|
|
|
|
|
Thanks Maxwell!
Sorry I have not made myself understood. I just want to make a summary of this question and let you have a final review to see whether it is correct.
1. set_se_translator only works for /EHa mode;
2. in /EHsc mode, when there are programming errors, like dereferencing a NULL pointer, structured exception will not occur and program will report error and let end user select to debug;
3. /EHa mode is more accurately a mixed mode of structured exception and C++ exception, not structured exception only, as quoted from Visual Studio 2008
Enable C++ Exceptions Yes With SEH Exceptions (/EHa)
regards,
George
|
|
|
|
|
hi...
My file Location is "D:\paul.txt
i have a button. if i click the button , aove file should be open.
how can i open? can anybody help me?
thank you.
paulraj
|
|
|
|
|
Do u want it to be open in the notepad editor or wanna get its handle?
Come online at:-
jubinc@skype
|
|
|
|
|
|
Then u can do the following:-
1. Use fopen(): It is a CRT function.<br />
2. Use CreateFile (): It is a Win32 API
Come online at:-
jubinc@skype
|
|
|
|
|
ok... thank you..
paulraj
|
|
|
|
|
Hi
here is my code
CDedJed d(this); //passes through constructor and member functions as well
d.Domodal(); // goes into the windows files wincore.cpp dlgcore.cpp dbgrpt.cpp
gives out debug assert error at the following lcation
->!::PeekMessage(pMsg, NULL, NULL, NULL, PM_NOREMOVE)
-> VERIFY(RunModalLoop(dwFlags) == m_nModalResult);
-> domodal();
FYI: resource IDs which are loading properly..checked with resource.h
help on this regard
Neel
|
|
|
|
|
Debug more into the RunModalLoop(dwFlags) function.
Come online at:-
jubinc@skype
|
|
|
|
|
thanks for ur reply i use gtalk, got no skype setup/accnt.
iam online urneel@gmail.com
FYI: This error occur only in debug mode but not in release mode.
here is debug details
VERIFY(RunModalLoop(dwFlags) == m_nModalResult);
ASSERT(ContinueModal());
// pump message, but quit on WM_QUIT
if (!AfxPumpMessage())
{
AfxPostQuitMessage(0);
return -1;
}
BOOL AFXAPI AfxPumpMessage()
{
CWinThread *pThread = AfxGetThread();
if( pThread )
return pThread->PumpMessage(); // here i end up with debug assert error
else
return AfxInternalPumpMessage();
}
regards
Neel
|
|
|
|
|
Could u write the declaration of the class CDedJed?
Come online at:-
jubinc@skype
|
|
|
|
|
CDed.h file
-----------------
class CDedJed : public CDialog
{
// Construction
public:
CDedJed(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CDedJed)
enum { IDD = IDD_DED_JED_DLG };
//}}AFX_DATA
// Overrides
//{{AFX_VIRTUAL(CDedJed)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
public:
void XX(); void YY();
public:
int m_TT;
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CDedJed)
virtual void OnOK();
virtual BOOL OnInitDialog();
afx_msg void OnWindowPosChanged(LPWINDOWPOS lpWndPos);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // !defined(AFX_DELETEJED_H__20D49F0D_8F35_4A61_A493_1F332F85A293__INCLUDED_)
CDedJed.cpp file
------------
/////////////////////////////////////////////////////////////////////////////
// CDedJed dialog
CDedJed::CDedJed(CWnd* pParent /*=NULL*/)
: CDialog(CDedJed::IDD, pParent)
{
//{{AFX_DATA_INIT(CDedJed)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CDedJed::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDedJed)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDedJed, CDialog)
//{{AFX_MSG_MAP(CDedJed)
ON_WM_WINDOWPOSCHANGED()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
|
|
|
|
|
Comment out OnWindowPosChanged() . What happens in OnInitDialog() ?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|