|
Hi Kuphryn
The assertion failure occurs when I try to execute my application. I mean execute from Visual C++ (6.0), than I get a dialogbox with "Debug Assertion Failed"
So I hope can help me my friend
|
|
|
|
|
Try debugging your software. Look at the line of code that generated the assert. Usually they will document what the problem is or it will be obvious looking at the source.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
If you press 'Abort' (or whatever that might be in Dutch ), the debugger will stop at the ASSERT in the MFC source code. More often than not, there will be a comment giving the reason for the problem. ASSERTs are a way for the code telling that some condition is not fullfilled at this point of the execution.
BTW, a clean compile does in no way mean you have an even mildly runnable program, only that the compiler and linker successfully converted your instructions to a binary file. This has the implication that you will have to test your application after it is written, something that comes as a surprise to many developers, newbies and experiences alike
|
|
|
|
|
1) Choose to break (not abort or ignore).
2) View->Debug Window->Call Stack (or ALT+7)
3) Look at what caused the assertion.
4) Trace backward thru the callstack untill you reach the line in your code that made origanal call (checking values as you go).
Note: At this point you can place a break point at the code line in your code and stop the debugging session via the debug menu. The restart the program and single step forward if you want (some time thou it may make serveral call before one of them fails).
Good Luck!
INTP
|
|
|
|
|
|
Hi everyone...
Please i'm getting nuts with this...some activex controls when my project is compiled they don't appears on the dialog, such as Microsoft forms 2.0 (Fm20.dll) and Microsoft Datagrid 6.0 control (msdatgrd.ocx).
I think it's weird cos in another project everything is doing fine, they appears...i think the problem isn't dll's or ocx's files, is there something wrong in my project file?
Please help me with this.
thanks in advance
|
|
|
|
|
Hi,
i have the same problems.
it happens in my programms, when i have more then two windows above each other. dialog1 calls dialog2->DoModal(), dialog2 calls dialog3->DoModal(). The
ActiveX-Elements will not appear in Dialog3.
So, what I did, i put them in a dialog in a dll. then they work.
not really a help, but a information.
|
|
|
|
|
anyway you have a found a way out...i'll follow...
thanks for the hint George.
|
|
|
|
|
how do I make a chat bot with C++
|
|
|
|
|
the way you like...
be more explicit in your question please.
TOXCCT >>> GEII power
|
|
|
|
|
Using your brain!
You set the server that you will make .... that when it will receive certain messages will answer.
And this will way you will configure your virtual bot (the server) the way you want
gabby
|
|
|
|
|
you would need to use WinSock
Bikram Singh
|
|
|
|
|
hi guys,
I m very new to using VC++.Can anybody tell me how can i add property pages to a dialog box, so that all the other controls also remain in place.
Aarti Vimal
Scientist 'B'
Defence research & Development Organisation,
Bangalore,
Karnataka,
India.
|
|
|
|
|
Describe more on what you are trying to accomplish.
Kuphryn
|
|
|
|
|
Hi guys,
I have a CListCtrl control inserted to my dialog app (MFC). I needed to customise the text display on the control and from Michael's suggestion (Thanks, Mr. Dunn!), I tried using LVN_GETDISPINFO message, which calls my OnGetDispInfo function. The problem is that the callback doesn't seem to get call when already using LPSTR_TEXTCALLBACK .
The message map is created as below:
<code>
ON_NOTIFY_REFLECT(LVN_GETDISPINFO, OnGetDispInfo)
and the callback function is decalred in my CMyDlg class.
<code>
afx_msg void OnGetDispInfo(NMHDR* pNMHDR, LRESULT* pResult);
I add items to the control (m_TaskList) using the way below:
<code>
m_TaskList.InsertItem(LVIF_TEXT|LVIF_STATE, itemCount, LPSTR_TEXTCALLBACK, LVIS_SELECTED, LVIS_SELECTED, 0, 0);
and the following callback function is never called,
<code>
void CMyDlg::OnGetDispInfo(NMHDR *pNMHDR, LRESULT *pResult)
{
LV_DISPINFO* pDispInfo = (LV_DISPINFO*)pNMHDR;
if (pDispInfo->item.mask & LVIF_TEXT)
pDispInfo->item.pszText = _T("Testing");
*pResult = 0;
}
Can anyone spot where I have done wrong?
Thanks alot
|
|
|
|
|
What change?
You have to explicitly notify the list control upon a change. One example is LVM_INSERTITEM.
Kuphryn
|
|
|
|
|
Thanks for the reply Kuphryn,
I'm not quite sure if I understand what you mean. In MFC, when I'm calling InsertItem() on the CListCtrl control, it euqally means sending the notification LVM_INSERTITEM to the control. Doesn't it?
Thanks again.
|
|
|
|
|
You're not receiving the LVN_GETDISPINFO message, correct? I'm saying that you have to update the list control via sending its a message if you want to to make the change.
Kuphryn
|
|
|
|
|
Doesn't the call
<code>m_TaskList.InsertItem(LVIF_TEXT|LVIF_STATE, itemCount, LPSTR_TEXTCALLBACK, LVIS_SELECTED, LVIS_SELECTED, 0, 0);
mean sending a message (LVM_INSERTITEM) to the control and update it according to specified information?
LPSTR_TEXTCALLBACK tells the control the text is a callback item, so will call OnGetDispInfo()
Why do I have to explicitly send message to the control again? Am I missing something?
Thanks again
|
|
|
|
|
Don't use ON_NOTIFY_REFLECT. That macro would be used if you were trying to do this in a class that was derived from CListCtrl. Since you are catching this message in a dialog (I suppose, based on the name CMyDlg), use ON_NOTIFY.
Good luck,
Chris Richardson
|
|
|
|
|
Thanks Chris,
that works for me
|
|
|
|
|
How to intercept a WM_LBUTTONDOWN on the drop-down list of a combo box?
Without using sucky MFC.
Bikram Singh
|
|
|
|
|
would have loved to answer, but i dont care to experiment with SDK-programming. SDK-programming sucks big time. Stop using it dude! Give MFC a try, and you'll never come back to SDK-programming for any of your UI-related tasks. Infact, the only reason SDK is good is: none... Thats it. From a professional programmers perspective.
*laughter*
|
|
|
|
|
Good for you. I dont use SDK programming except for "lower-level" tasks such as this. I assure you, if you use C++ Builder once, you would probably know why I think MFC sucks.
Bikram Singh
|
|
|
|
|
Well, you said "without using MFC". Do you think this is a C++ Builder forum?
Now, as you don't seem very experienced, let me explain a few things:
MFC is a framework. You can use MFC with MSCVC++, but also CodeWarrior and the old Borland C++.
C++ Builder is a development environment. I don't know the name of the current underlying framework - in the pre-Builder days, it was OWL. VCL, perhaps?
Comparing the development environments, C++ Builder (which I have not used) was loosely built on Delphi, (which I have used). Delphi is a RAD-tool, and if you have difficulties with other development tools, you might want to stay with C++ Builder, and ask questions in appropriate foras. I'm sure that there are newsgroups targetted specifically to C++ Builder.
But of course, you are what is commonly called a troll, which I am - sad to say - currently feeding.
To summarize, my suggestion is that you either get a life, or haunt foras where you will actually get some answers. I have used more development environment than you can comfortably shake a stick at, so I think I'll leave your puerile suggestion where it belongs
|
|
|
|