|
Generally, the way to tell is to check line 22 of afxwin1.inl.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I use Visual C++ 6.0
the 22nd line of file "afxwin1.inl" only is a MACRO !
I don't know how to do it.
Thanks
|
|
|
|
|
When an assert fails, the error message shows you the check that was being done. What does the message say?
|
|
|
|
|
the assertion dialog like below:
Debug Assertion failed!<br />
<br />
Program:...<br />
File:afxwin1.inl<br />
Line: 22<br />
<br />
For information on how your program can cause an assertion failure,See the vasual C++ documentation on asserts.<br />
<br />
(Press Retry to debug the application)
Thanks
|
|
|
|
|
now,I know,the statement can work well only on Release mode, if you run it on Debug mode ,the assertion will be throwed allways!
Somebody would tell me,Why?
Thanks
|
|
|
|
|
In my version of MFC I see this
_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetInstanceHandle()
{ ASSERT(afxCurrentInstanceHandle != NULL);
return afxCurrentInstanceHandle; }
If this is the same line that is asserting in your app then maybe MFC isn't initialized properly.
It seems to me that shouldn't get called anyway when you call COleDateTime::Format unless the
time is invalid.
If you click to debug you should be able to trace back on the stack and view the value that is
causing the assertion and why.
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
but when i select Retry on the assertion dialog, it would start debug and show assembly codes!
i think nobody would accept this!
but how to resolve it?
Thanks
|
|
|
|
|
What call stack states , in this case ? Make sure, your .rc file is compiling.
|
|
|
|
|
of course,my .rc file is compiling.
but this code would work well in VS2005's debug mode.
why?
and how to debug my program using VC6.0?
Thanks for helping
|
|
|
|
|
kcynic wrote: but this code would work well in VS2005's debug mode.
Does this mean, Its not working in release mode ? Have you tried seeing difference betn these two configurations ?
|
|
|
|
|
No,I mean that, it doesn't work in Debug mode,but work well in Release mode.
I'm sorry, my English is so poor that sometimes I could not show my thought well.But I really want to improve it and learn more things here,not only programming but also language.
Thanks for your help
Best Regards
|
|
|
|
|
Dear all
In one dialog based project in visual C++ 6,
I create one window by following instruction.
childWindow = new CMyDialogBox;
childWindow->Create(IDD_HANNELSWINDOW_DIALOG,this);
childWindow->ShowWindow(SW_SHOW);
but I want to access both windows of my program.
for example by using Ctrl tab I want to switch between 2 dialogs of my program.
But it is not possible now , because child dialog box is on the main dialog
box,
how can I overcome this problem
Regards
Monhi
|
|
|
|
|
May be you should have gone for an MDI type application ?
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
My project is one Dialog based program.
But I want it to have 2 Dialogs
I create second dialog.
But when I want to change the control from child dialog box to fathers dialog box, I find that childs window is always on fathers window. Thus I cannot control the fathers dialog box.
|
|
|
|
|
m_monhi wrote: fathers dialog box, I find that childs window is always on fathers window. Thus I cannot control the fathers dialog box.
Amusing.
Ok check here.[^]Good Luck.
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
Finaly I find the answer
if we call Create(IDD_SOMETHING,NULL) and put second argument to NULL then 2 dialog boxes will become separate from each other.
thank you for your help Mr VuNic.
|
|
|
|
|
Hi all,
i've created this class that inherites from CRichEditCtrl:
CMyRichEditCtrl::CMyRichEditCtrl()
{
}
CMyRichEditCtrl::~CMyRichEditCtrl()
{
}
void CMyRichEditCtrl::PreSubclassWindow()
{
CRichEditCtrl::PreSubclassWindow();
SetAutoURLDetect();
SetEventMask(ENM_CHANGE | ENM_LINK);
}
BEGIN_MESSAGE_MAP(CMyRichEditCtrl, CRichEditCtrl)
ON_NOTIFY_REFLECT(EN_LINK, &CMyRichEditCtrl::OnRichEditLink)
ON_NOTIFY_REFLECT(EN_CHANGE,&CMyRichEditCtrl::OnRichEditChange)
END_MESSAGE_MAP()
void CMyRichEditCtrl::OnRichEditLink(NMHDR* pNMHDR,LRESULT* pResult)
{
}
void CMyRichEditCtrl::OnRichEditChange(NMHDR* pNMHDR,LRESULT* pResult)
{
}
problem is that when i place a break point inside the 'OnRichEditLink' it breaks there, but when i place a break point inside the 'OnRichEditChange' it doesn't break???
can any1 help
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
ok i found what the problem was, instead of catching
ON_NOTIFY_REFLECT(EN_CHANGE,&CMyRichEditCtrl::OnRichEditChange)
i should have caught
ON_CONTROL_REFLECT(EN_CHANGE,OnRichEditChange)
thanks anyways
cheers
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Dear all
I want to write one program in dialog base mode in visual C++.
I neet this program to have 2 separate windows, which one of them is the child of main window.
I want to show some information on second window,thus I need to know how to send data to it.
If I can create a new class which is responsible for second window, then I can handle all the requirments I need.
If you know any article about this problem please let me know about it.
Regards
Mahdi
|
|
|
|
|
You will like this.[^]
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
|
Have a nice day monhi
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
Dear VuNic
But if you have one program which is visual C++ 6 version Then I can open that project with my ancient Visual C++ 6 compiler and trace it.
Regards
Monhi
|
|
|
|
|
Well the concept is going to be the same.Follow it and recreate it in VC6.0 please put your feet into it then'll see it's not too cold. [Btw,I suggest you drop VC6.0 move to 8.0 or 7.1]
Look at this part of the code in particular :
CChildDlg::CChildDlg(const CString& strComment, bool bIsCaptainBlind)
: CDialog(CChildDlg::IDD, NULL) {
this->m_strComment = strComment;
this->m_bIsCaptainBlind = bIsCaptainBlind;
}
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|