I actually don't know what this message is or how to handle it.
Then you are definitely going to have problems, especially if you are trying to paint the controls at other times. If you do not understand how Window painting works in Windows then you will continue to have problems. I suggest you look for some tutorials on how it is done.
I was looking to intercept a Rich Edit controls keystrokes, seems I have call CRicheditctrl::SetEventmask with ENM_KEYEVENTS> this lead me to a article about notification When a Rich Edit is resized
The Author Thales P. Carvalho has the notification method OnRequestResize in the parent window. I cannt seem to find this method in either Cdialog or CWnd maybe he was referring to OnNotify ?
If you have a question about an article, use the forum at the bottom of that article. That way, the author will be notified of your question, and you're not relying on them stumbling across your question in a completely different part of the site.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
at best, i would think the behavior is undefined. the function is going to try to find a parameter, somewhere. maybe it pulls some random garbage off the stack where it expects a parameter to be, or maybe your compiler puts variables into certain registers (and so the function will just grab random garbage out of a register).
You shoud correct your caller.h to have the correct prototype for A(). Then #include caller.h in both where you define A() and where you invoke it.
This "works", due to C calling conventions, where the caller is responsible for pushing and popping arguments off the stack. In your case the caller doesn't push anything on the stack. When A() executes it will use whatever values are on the stack as its parameters, which in this case could be any value at all.
Further to this, in C the declaration void f(); does not declare a function with no parameters, but declares a function with an unknown number of parameters. If you know that a function takes no arguments, you should prototype it as void f(void);. Otherwise, the compiler will happily let you do the following:
Using gcc I can compile the above with -Wall -Wextra, and get no warnings. If I add -Wstrict-prototypes, I do get the warning "function declaration isn’t a prototype [-Wstrict-prototypes]. If you're using MS-VSC, there's probably a similar warning flag that you can use.
As I told - I'm not sure OP knows the difference between C and C++ and what language is the project in (a leftover from someone else probably)...
Taking in count, that it is part of code from a working system, and that the mentioned compiler can compile both C and C++, and the abilities of C and C++ I put my bet on OP's mistake...
In fact if we stick to the C version, it can not work at all (C has only the varargs option, but that forces at least one named parameter, which we have not)...
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
Last Visit: 31-Dec-99 18:00 Last Update: 7-Aug-22 20:49