Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost Bind
From: Etienne Pretorius (icewolfhunter_at_[hidden])
Date: 2010-03-02 02:30:14


Found the Problem....
> /* Window Procedure */
> ::LRESULT CALLBACK WndProc(
> ::HWND hWnd,
> ::UINT message,
> ::WPARAM wParam,
> ::LPARAM lParam
> ) {
> return WindowProc(hWnd, message, wParam, lParam);
Calling Four paramters here.....
> };
>
> class Window
> : public boost::noncopyable {
> public:
> /* Deconstructor */
> ~Window(
> ) {
> WindowProc.disconnect(m_Connection);
> };
> private:
> friend ::LRESULT CALLBACK WndProc(::HWND, ::UINT, ::WPARAM,
> ::LPARAM);
> virtual ::LRESULT *CALLBACK* WndProc(::UINT, ::WPARAM,
> ::LPARAM) = 0;
CALLBACK calling wrong in class... (removed CALLBACK)
> protected:
> /* Constructor */
> Window(
> ::HINSTANCE hInstance
> ) : m_Window(NULL) {
> m_Connection = WindowProc.connect(
> boost::bind(
> &Window::WndProc, this, _1, _2, _3
Missing ,_4 since I am calling ::HWND, ::UINT, ::WPARAM, ::LPARAM
> )
> );
> m_Instance = hInstance;//Might need some work...
> };
> /* Varibles */
> static ::HINSTANCE m_Instance;
> ::HWND m_Window;
> boost::signals::connection m_Connection;
>
> };



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net