From: "DudeSan" <[EMAIL PROTECTED]> > Hey there! > > I've had some problems trying to make a function pointer to a specific > windows callback function. It's defined as "LRESULT CALLBACK WndProc( > HWND > hWnd, UINT message, WPARAM wParam, LPARAM lParam )", however, any sore > attempt I try to get the boost::bind working with it seems to fail > miserably. > > My latest attempt (which seems to generate the least number of errors) > is > this: > > wcex.lpfnWndProc = ( WNDPROC ) boost::bind( &WndProc, _1, _2, _3, _4 ); > > wcex is an instance of WNDCLASSEX (which is a windows specific function > pointer). > > WNDPROC is defined as "typedef LRESULT __pascal* WNDPROC (HWND, UINT, > WPARAM, LPARAM)"
No, this won't work. boost::bind returns a function object, an object with operator() defined, not a function pointer. You can't use bind() to create a function pointer. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost