How to declare WindowProc function
-
In my Form1 (VC++ .NET framework), I first need to add prototype of WindowProc in header file. Which section shall it be added private, protect, or public?? Is following prototype correct?? LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); Is following implementation function header correct?? LRESULT CALLBACK Form1::WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { }
-
In my Form1 (VC++ .NET framework), I first need to add prototype of WindowProc in header file. Which section shall it be added private, protect, or public?? Is following prototype correct?? LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); Is following implementation function header correct?? LRESULT CALLBACK Form1::WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { }
if the function is a member of a class, you must declare it static, so that it wont have the implicit
this
parameter... by the way, i may be wrong (i see you're talking about the .NET Framework) but the C++/CLI forum may be more appropriate for your question.
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-
In my Form1 (VC++ .NET framework), I first need to add prototype of WindowProc in header file. Which section shall it be added private, protect, or public?? Is following prototype correct?? LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); Is following implementation function header correct?? LRESULT CALLBACK Form1::WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { }
it should be either global or public static of a class. SaRath. "Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
Last modified: Wednesday, August 09, 2006 9:20:41 AM --
-
it should be either global or public static of a class. SaRath. "Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
Last modified: Wednesday, August 09, 2006 9:20:41 AM --
Sarath. wrote:
either
nope. it should be both !!!
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-
Sarath. wrote:
either
nope. it should be both !!!
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
ooops.. sorry man.. it was a mistake I meant either in global or in public static scope. :) I shall correct it
SaRath.
_"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
-
In my Form1 (VC++ .NET framework), I first need to add prototype of WindowProc in header file. Which section shall it be added private, protect, or public?? Is following prototype correct?? LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); Is following implementation function header correct?? LRESULT CALLBACK Form1::WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { }
It should be a static function.
-
It should be a static function.
i think answering something that was posted about 2 hours before is not the best thing to do, especially if you don't provide much info...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-
i think answering something that was posted about 2 hours before is not the best thing to do, especially if you don't provide much info...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
hehe, I did not read the other answers :)
-
hehe, I did not read the other answers :)
I'm writing VC++ .net framework code. I need to retrieve the windows WM_DEVCHANGE message Shall I use virtual void WndProc( Message* m ) override function or LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) function?? How shall I add either of them to my Form class??? May you write down the format?