Article View: borland.public.cppbuilder.nativeapi
Article #13955Re: Windows wierdness (SendMessage, Win98, Win2000) repeat
From: Keith
Date: Sun, 31 Aug 2003 07:23
Date: Sun, 31 Aug 2003 07:23
23 lines
2138 bytes
2138 bytes
* Above post refers to settings for your original problem app.
If you will make this compiler option change, then debug across the prior shown call to SendMessage
then what you will observe is that while the code generated in your file WinComboBox.cpp doesn't
change, the action of SendMessageA does, in that the contents of the ESP register are correctly
updated across the call to SendMessageA, as the four parameters are pitched off of the stack before
returning control to you in the add() method, whereas with the C-calling convention, the ESP is not
updated since the four parameters are left on the stack by SendMessageA.
If, instead of changing the calling convention option, you were to add the following after EVERY
SendMessage() call (at least in your WinComboBox.cpp file), then it would also work correctly:
asm {
pop ebx
pop ebx
pop ebx
pop ebx
}
So that you would be manually removing the four parameters from the stack. Hokey? Somewhat, but not
really, because it's a machine, and you make it do as you wish.
keith
Technical Details
Message-ID:
<3F51A27B.1A59EF47@sbcglobal.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3F50A23C.1090706@anonymous_one.com> <3F50C002.901B2CC9@sbcglobal.net> <3F5164FE.8000803@anonymous_one.com> <3F519DFF.B2345F35@sbcglobal.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,d5c2d7b43b5c1d37 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-31 00:32:18 PST Message-ID: <3F51A27B.1A59EF47@sbcglobal.net> Date: Sun, 31 Aug 2003 02:23:39 -0500 From: Keith <kdopson@sbcglobal.net> X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Windows wierdness (SendMessage, Win98, Win2000) repeat References: <3F50A23C.1090706@anonymous_one.com> <3F50C002.901B2CC9@sbcglobal.net> <3F5164FE.8000803@anonymous_one.com> <3F519DFF.B2345F35@sbcglobal.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 65.71.227.85 X-Trace: newsgroups.borland.com 1062314616 65.71.227.85 (31 Aug 2003 00:23:36 -0700) Lines: 24 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail