|
How come? MessageBox cannot fail in MFC module wincore.cpp , as it has nothing to do with MFC.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
That's what I thought. I tried using ::MessageBox(m_hWnd, "Error message...", "MyApp", MB_OK|MB_ICONEXCLAMATION). My application is an MFC dialog application and I get the following stack
AfxCallWndProc(CWnd * 0x00000000 {CWnd hWnd=???}, HWND__ * 0x01c305c0, unsigned int 134, unsigned int 0, long 21629170) line 215 + 3 bytes
AfxWndProc(HWND__ * 0x01c305c0, unsigned int 134, unsigned int 0, long 21629170) line 368
AfxWndProcBase(HWND__ * 0x01c305c0, unsigned int 134, unsigned int 0, long 21629170) line 220 + 21 bytes
USER32! UserCallWinProc@20 + 24 bytes
USER32! DispatchClientMessage@20 + 47 bytes
USER32! __fnDWORD@4 + 34 bytes
NTDLL! KiUserCallbackDispatcher@12 + 19 bytes
USER32! DispatchClientMessage@20 address 0x77e13974
USER32! MB_DlgProcW@16 + 23 bytes
USER32! UserCallWinProc@20 + 24 bytes
USER32! DefDlgProcWorker@20 + 129 bytes
USER32! DefDlgProcA@16 + 33 bytes
USER32! UserCallWinProc@20 + 24 bytes
USER32! CallWindowProcAorW@24 + 61 bytes
USER32! CallWindowProcA@20 + 25 bytes
_AfxActivationWndProc(HWND__ * 0x014a08f2, unsigned int 272, unsigned int 38734006, long 15133252) line 405
USER32! UserCallWinProc@20 + 24 bytes
USER32! SendMessageWorker@20 + 188 bytes
USER32! InternalCreateDialog@28 + 2472 bytes
USER32! InternalDialogBox@24 + 161 bytes
USER32! SoftModalMessageBox@4 + 1399 bytes
USER32! MessageBoxWorker@4 + 302 bytes
USER32! MessageBoxExW@20 + 82 bytes
USER32! MessageBoxExA@20 + 111 bytes
USER32! MessageBoxA@16 + 36 bytes
MyFunc() calls messagebox here!
|
|
|
|
|
Never thought about it! This (fascinating) stack dump shows that MessageBox is executed in the context of the local message pump. If one considers it carefully, it makes a lot of sense after all.
Well, if it's lack of memory what's causing the error in AfxCallWndProc (which I'm far from sure), you might try reserving some safeguard memory that is released on the catch block just before calling AfxMessageBox . Please tell us if this works (in case you decide to test it.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
Just a thought here - I think it might not be a good idea to use a messagebox in this context. I've worked on code that had some very strange things happen when message boxes were invoked 'asynchronously' wrt the main user gui.
Consider what would happen if a 'proper' message box were on screen (by 'proper' I mean used in response to a user 'action' - validation etc) and another thread popped up a message box. First, neither mb will have proper app modality, allowing the user to do all manner of 'things they shouldn't do'. Also, the serialization of messages in the queue seems to get messed up with in ways that are almost impossible to trace.
You could ship a 'debug' app - which would enable you to use an assert dialog, but I think its better to have some designated status bar or dialog for this type of alert.
Just my 2 cents, and I could be missing something.
|
|
|
|
|
Hi,
Does anyone now how to debug a VC++ COM component that is a Pipeline component in a Commerce Server 2000 pipeline
Cheers
Ollie
|
|
|
|
|
Create an application that will call the pipeline. That is what we do with our pipeline.
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
Hello, not sure where to ask this and it's probably a stupid question but here goes:
I currently use Visual c++ 6.0.
If I purchase and install Visual Studio .net will my projects still compile in vc 7 or will I need to make changes?
I really don't want to have to learn C# or anything else at this point so is there any other advantage to using VC 7?
Ground Zero Tech-Works
http://www.ayanova.com
|
|
|
|
|
J Cardinal wrote:
f I purchase and install Visual Studio .net will my projects still compile in vc 7
Yes,there is no problem.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Yes,there is no problem.
This is simply not true. There are reports of numerous projects that don't convert/compile. The problems range from project not converting as it should and MFC changes, to display of (terminal) compiler bugs in MSVC7.
This is not something I'm making up, MS themselves acknowledge these problems.
Not to mention the MSVC7 bug in ATL that makes it uncompilable. :->
|
|
|
|
|
hmmmmmm,Can you tell me some of them or show me the link?
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
|
Thank you,I'll check it soon.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
J Cardinal wrote:
If I purchase and install Visual Studio .net will my projects still compile in vc 7 or will I need to make changes?
Depends on your code. I've had relatively few problems; most of the code i've had to change was code that *should* have been changed anyway, but wasn't caught under VC6 (message map function prototypes are a huge culprit). Your milage may vary.
--------
Well actually they are sort of interesting Nish, on Nudes
|
|
|
|
|
I bought Vs.net pro and uninstall it today.
To much problems with MFC , OLE , Windows 95/NT.
I'll be back only after service pack 1/2.
Pavel Sokolov,
CEZEO software,
LanTalk Network,
http://www.cezeo.com
http://www.lantalk.net
|
|
|
|
|
i need to access the frame extracted from an avi and deal with it as it was a bmp.
and i was wondering if this function AVIStreamGetFrame returns a DIB, how can i deal with it to have the bmp that i want.
Thanx.
|
|
|
|
|
What happened to reading documentation?
From the documentation for that function it reads:
Return Values
Returns a pointer to the frame data if successful or NULL otherwise. The frame data is returned as a packed DIB.
|
|
|
|
|
really!!!!
i'm impressed...
|
|
|
|
|
i have to create 3, source,filter and sink.
source write data to filter using a pipe the filter reads that from the pipe and write it to the sink using the pipe.
question how do i do that
(1) creating the process
(2) creating pipe and the buffers
|
|
|
|
|
From a command-prompt:
source.exe | filter.exe | sink.exe
No need to worry about creating your own pies, buffers, preocesses or any of that stuff.
|
|
|
|
|
There is an article on CP by Joseph Newcomer on this subject. It helped me on one of my projects.
Ted
|
|
|
|
|
Hello
I would like to write a C function that find the first prime number above a given number (the number is a parameter of the function). The function I have written so far is not very fast and I would like any help you can offer me.
Thank you very much.
|
|
|
|
|
Let's make a deal... stop with the anon posting and you'll get one. IMHO, people that have to secretly ask for help are the ones that'll steal it and gank the credit.
Jeremy L. Falcon
"The One Who Said, 'The One Who Said...'"
<nobr>
Homepage : Sonork = 100.16311 01000010011011110110001000100000011101110110000101110011 00100000011010000110010101110010011001010010111000000000
|
|
|
|
|
If you can live with a C++ implementation, you could have a look at a snipped from SourceForge.
Note that this implementation only works with relatively small numbers, up to 2^32-1 (I believe). If you want larger integers you should probably have a look at something like the GNU MP library or NTL (linked from the GMP homepage).
|
|
|
|
|
Aw man, ya ruined it for me. I was having fun.
Jeremy L. Falcon
"The One Who Said, 'The One Who Said...'"
<nobr>
Homepage : Sonork = 100.16311 01000010011011110110001000100000011101110110000101110011 00100000011010000110010101110010011001010010111000000000
|
|
|
|