|
If you look at the callstack, please navigate to the call frame just before _CrtDbgBreak() . _CrtDbgBreak() is just the function that invokes the debugger.
--
Pictures[^] from my Japan trip.
|
|
|
|
|
Hello,
Before the call to _crtDgbBreak() I've got this in the callstack :
msvcr71d.dll!_CrtDbgReport(int nRptType=2, const char * szFile=0x7c144c68, int nLine=323, const char * szModule=0x00000000, const char * szFormat=0x00000000, ...)
mfc71d.dll!AfxAssertFailedLine(const char * lpszFileName=0x7c144c68, int nLine=323)
mfc71d.dll!CWnd::FromHandlePermanent(HWND__ * hWnd=0x0026061a)
mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x0026061a, unsigned int nMsg=15, unsigned int wParam=0, long lParam=0)
mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x0026061a, unsigned int nMsg=15, unsigned int wParam=0, long lParam=0)
There is no call to a specific function in my code... only calls to AfxWnd...
Thanks you for your help
|
|
|
|
|
I'm not sure what has happened. It is clearly unrelated to your code. What type of project is it? MFC? You should create a console project, judging by the code you have shown us.
--
Pictures[^] from my Japan trip.
|
|
|
|
|
Hi ;
I'm sorry to have bother you... I just create a simply CDialog with only this code and I've got no assertion... So there is something in my app that bug somewhere...
Thank you very much for your help !!
|
|
|
|
|
I suspect that you have created an MFC project, and added the main() function. MFC apps aren't supposed to work with a main() function. If you test the code with a clean console project, you will have no bugs.
I see no apparent bugs in your code.
--
Pictures[^] from my Japan trip.
|
|
|
|
|
selecta wrote: HWND__ * hWnd=0x0026061a, unsigned int nMsg=15
nMsg=15 is WM_PAINT.
Your app is trying to send a WM_PAINT message to window 0x0026061a but MFC is not able to find that window in its map of window handles (via pMap->LookupPermanent) so it has no idea where to send the message.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks you all of you for your help. I've finally found what was worng in my code ... It was simply a little tab char[x] that was to small :p
|
|
|
|
|
HI
I am an amateur in the field of vc++. i am doing my final year project, in which i am developing a user interface using VB6.0
I need to interface this GUI with some Pc Add on cards via A vc++ layer
could anyone please help me out with this task?
If there are some useful links ,do inform me at sreekanth101@rediffmail.com
tanking you in anticipation
Sreekanth
|
|
|
|
|
I have a Report style CListCtrl and placed it in a CFormView.
I have lots of columns such that not all of the columns appear on the ClistCtrl area so there is automatically a horizontal scrollbar.
Now when i press left or right keyboard keys, I want Report list ctrl is to select previous or next column. I have that code already but it doesn't get called. Instead when i press the arrow keys, the list ctrl just scrolls left or right.
How do I override this behavior? What are the related functions needed?
tnx in advance
maverick
|
|
|
|
|
Hi All
Can anyone let me know how I can publish an Exe over Cluster Servers.
When I am trying to access the exe from Cluster Servers its asking me to Publish the Exe which is because of Security settings of Windows 2003.
Regards,
Aziz Dilwara Wala
Software Programmer/System Consultant
CivilSoft - Dubai.
Tel : (0)4-2955660
Fax : (0)4-2955662
Email : aziz@civilsoft.net
|
|
|
|
|
Can anyone please help me in the following issue
my requirement is to detect if a 3rdparty firewall like Norton/Mcafee is installed. Do any one know of a generic windows api that tells if a 3rd party firewall is installed.THanks for the help in Advance.
-Vinoth.
|
|
|
|
|
In Visual Studio .NET 2003 I could write code like the following without any errors:
std::vector<string>::iterator position;<br />
position = NULL;
However the same code under Visual Studio 2005 produces errors.
Which is the correct way to use NULL's and iterators in VS 2005?
I am the handsome one in the crowd.
|
|
|
|
|
Not done any C++ for ages but I thought iterators could only point to coll.begin(), coll.end() or some position in the collection?
Maybe what you did in VS 2003 was non-standard behaviour and VS 2005 now enforces it?
Kevin
|
|
|
|
|
Hello,
You're right about that, the only valid values an iterator can have are collection.begin() through collection.end() where the latter just points to one element after the last one.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Nice to know that my memory hasn't deserted me yet!
Kevin
|
|
|
|
|
Hello,
The C++ compiler has become more type safe and I think that you have a problem there. There is no implicit conversion anymore from an integer to an iterator. The right way for you to initialize is:
std::vector<int>::iterator position = SomeVector.end();
Hope this helps.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Hello everyone!
OK, look:
<br />
CFileDialog openFile(TRUE, NULL, NULL, OFN_OVERWRITEPROMPT|OFN_EXPLORER,<br />
"Mazzee map groups (*.lmg)|*.lmg|Mazzee maps (*.lmm)|*.lmm|All files (*.*)|*.*||", NULL);<br />
<br />
... ~45 lines later...<br />
<br />
AfxMessageBox((LPCTSTR)openFile.GetFolderPath());
<br />
curMap = (LPCTSTR)openFile.GetFolderPath() + mapsDir + curMap;
Anyone know why it gives me an access violation? I looked at GetFolderPath()'s code, and it's returning a released buffer when this is less than zero:
GetParent()->SendMessage(CDM_GETFOLDERPATH, (WPARAM)MAX_PATH, (LPARAM)strResult.GetBuffer(MAX_PATH))
Anyone know why it's giving me that? Thanks!
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
I have a misbehaving multithreaded application which works so so using CreateThread and associated code ( set priority etc.) I have changed to AfxBeginThread and cannot compile( always fails with 1 parameter not matching required parameters) it without changing my thread processing function to UINT ThreadProcessFunction(... I need this function to be
UINT CALLBACK ThreadProcessFunction(... ! I am monitoring events from COM port. The AfxBeginThread "calls" CreateThread - so why it does not work?
Thanks for reading.
Vaclav
|
|
|
|
|
Post some code, and you might get a better response...
|
|
|
|
|
i'm getting started on an emulator, and have a question about performance. Which is faster, using a game loop type of looping code, or running the cpu in a different thread (with synchronization issues to worry about). i.e.:
GameLoop:
WinMain(...) {
MSG msg;
do {
if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
} else {
RunCpu(100000);
}
} while(msg.message != WM_QUIT)
return msg.wparam;
}
different thread:
void File_StartEmulation() {
DWORD threadId;
if(!CreateThread(NULL, 0, &CpuLoopThread, NULL, 0, &threadId)) {
ShowErrorMessage();
}
}
thanks alot for any help
|
|
|
|
|
Doing your processing in a PeekMessage loop is very 1990's. It will impact on the responsiveness of the app and you won't get predictable performance.
Writing multi-threaded code can be quite challenging, but is the way to go, for anything but the simplist of tasks.
Neville Franks, Author of Surfulater www.surfulater.com "Save what you Surf" and ED for Windows www.getsoft.com
|
|
|
|
|
|
Kixdemp wrote: What will the emulator emulate?
If he uses PeekMessage then it will emulate a multi-threaded program, very badly.
Neville Franks, Author of Surfulater www.surfulater.com "Save what you Surf" and ED for Windows www.getsoft.com
|
|
|
|
|
i'll (hopefully) be emulating a low-powered desktop pc on a high-powered embedded device (a pocket pc), so i'll need as much speed as possible, which probably will involve assembly at some point. it'll be a monster! Though I already had a simple windows prototype, i'll be completely rewriting it for the pocket pc.
anyway, i guess for now i'll be going with the multithreaded version. wish me luck to get it off the ground.
|
|
|
|
|