Click here to Skip to main content
16,007,472 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: developing a ms-paint like application Pin
Christian Graus3-Apr-01 18:12
protectorChristian Graus3-Apr-01 18:12 
GeneralCString::ReleaseBuffer() Pin
3-Apr-01 16:52
suss3-Apr-01 16:52 
GeneralRe: CString::ReleaseBuffer() Pin
Michael Dunn3-Apr-01 18:39
sitebuilderMichael Dunn3-Apr-01 18:39 
GeneralRe: CString::ReleaseBuffer() Pin
Kannan Kalyanaraman3-Apr-01 20:44
Kannan Kalyanaraman3-Apr-01 20:44 
GeneralDEBUG vs. RELEASE Pin
Manfred Ramosch3-Apr-01 14:21
Manfred Ramosch3-Apr-01 14:21 
GeneralRe: DEBUG vs. RELEASE Pin
Christian Graus3-Apr-01 15:06
protectorChristian Graus3-Apr-01 15:06 
GeneralRe: DEBUG vs. RELEASE - closer description... Pin
Manfred Ramosch3-Apr-01 19:33
Manfred Ramosch3-Apr-01 19:33 
GeneralCan anyone believe this...??? Pin
Manfred Ramosch4-Apr-01 5:24
Manfred Ramosch4-Apr-01 5:24 
I followed your advice, Chris - and went to your CodeGuru link.

http://codeguru.earthweb.com/debug/ReleaseMode.shtml

There was one comment by Kelly Beyer: 'Incorrect Message Map Function Signatures'
which referred to a MSDN-KnowledgeBase article.

http://support.microsoft.com/support/kb/articles/Q195/0/32.ASP

So I changed the handler macro of my User-defined message from
afx_msg void OnMyMessage(void);
to
afx_msg LRESULT OnMyMessage(WPARAM, LPARAM);

And my handler-function from
void MyDialog::OnMyMessage(void);
to
LRESULT MyDialog::OnMyMessage(WPARAM, LPARAM);


And now it works.

In all my books showing how to write User-defined messages it is done the wrong way.
No explanation that the signatures have to be exactly like the ones above. They all
used 'void' instead - and as, when being a beginner, you seldomly switch to release-mode
you never realize that there is a little bug in your application. And when you do
it once than you'll never find out when this bug silently came into your app.
Though it's hard to put the blame on a User-defined message that worked for months in DEBUG-MODE.

Believe me: You would take everything else under consideration before this...

But at least I think it is a very bad behaviour that the compilor doesn't give you
at least a warning when working in DEBUG-MODE (I'm only working in 'Warning-Level 4').

I would never have found the bug in my app without that articles on the net.


There is one little question still bugging me as I got a little paranoid now.

Do you think that this is the real solution to my problem or is it just a temporary
workaround that is hiding another surprise for me now for the future???
Does it sound like 'there must be something else' to you ???


Thanks again for your help - this time a hit, not only a try...


Manfred


---

Programming is knowing...(and having better friends than the MicroSofties)
GeneralRe: Can anyone believe this...??? Pin
Chris Losinger5-Apr-01 8:59
professionalChris Losinger5-Apr-01 8:59 
QuestionAre there performance issues(resource or otherwise) in using CStatic controls to display bitmaps? Pin
eric kaminski3-Apr-01 8:13
eric kaminski3-Apr-01 8:13 
GeneralUsing the system image list with CImageList Pin
3-Apr-01 8:09
suss3-Apr-01 8:09 
GeneralRe: Using the system image list with CImageList Pin
Michael Dunn3-Apr-01 8:46
sitebuilderMichael Dunn3-Apr-01 8:46 
GeneralRe: Using the system image list with CImageList Pin
3-Apr-01 9:43
suss3-Apr-01 9:43 
GeneralRe: Using the system image list with CImageList Pin
Michael Dunn3-Apr-01 12:59
sitebuilderMichael Dunn3-Apr-01 12:59 
QuestionHow to get the button click message ??? Pin
Vistac3-Apr-01 5:18
Vistac3-Apr-01 5:18 
AnswerRe: How to get the button click message ??? Pin
Masaaki Onishi3-Apr-01 6:18
Masaaki Onishi3-Apr-01 6:18 
GeneralRe: Hummmm. Pin
Masaaki Onishi3-Apr-01 16:35
Masaaki Onishi3-Apr-01 16:35 
AnswerRe: How to get the button click message ??? Pin
PJ Arends3-Apr-01 10:23
professionalPJ Arends3-Apr-01 10:23 
QuestionDirectX 8 information??? Pin
t_hamel3-Apr-01 5:17
t_hamel3-Apr-01 5:17 
GeneralLoading a Word Document Pin
3-Apr-01 3:38
suss3-Apr-01 3:38 
GeneralRe: Loading a Word Document Pin
Masaaki Onishi3-Apr-01 16:49
Masaaki Onishi3-Apr-01 16:49 
GeneralRe: Loading a Word Document Pin
3-Apr-01 23:13
suss3-Apr-01 23:13 
GeneralHostNames Pin
Furer Alexander3-Apr-01 3:24
Furer Alexander3-Apr-01 3:24 
GeneralRe: HostNames Pin
Anders Molin3-Apr-01 9:00
professionalAnders Molin3-Apr-01 9:00 
GeneralVS C++ help needed Pin
3-Apr-01 1:31
suss3-Apr-01 1:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.