Click to See Complete Forum and Search --> : __stdcall & subclassing problem


sbubis
June 10th, 2004, 08:37 AM
Dear experts!
I make subclassing to add some functionality to Edit box.
(Very simple dialog consisting only of this Edit box)
Compiled and linked w/o problem. Run the program and got MBox saying that stack was not properly released. (This box shown by _chkesp routine after cmp ESI,ESP registers)
It happens after calling the original WinProc of Edit box.
I look at assembly code and understood that my WinProc expects that the stack ptr (ESP) will be restored by the original proc (and it is correct since all WinAPI must be __stdcall) but the original Edit box proc doesn't do that!!!
The same code works just fine when compiled on another computer.
I'm using Visual C++. The compiler option initially was _cdecl (default), I changed it to __stdcall but it didn't change (as I expeced) anything.
Does somebody knows about such strange problem?
Any clue will be very appreciated.
Thanks in advance.