Sign in to follow this  

Window Procedure

Recommended Posts

Hi, How can I pass a member of class as window procedure function. I try this but it has error. ////////////////////////////////////////////////////////////////// class A { A(){}; ~A(){}; msgproc(); } //some code // Register the window class HICON icon=LoadIcon( hInstance, MAKEINTRESOURCE(IDI_ASL_BALL)); HCURSOR cursor=LoadCursor( NULL, IDC_ARROW ); HBRUSH brush=(HBRUSH)GetStockObject( BLACK_BRUSH )); A tmp; WNDCLASS wndClass = { CS_DBLCLKS,tmp->msgproc , 0, 0, hInstance, icon, cursor, brush, NULL, s}; RegisterClass( &wndClass ); // Create our main window WndMain = CreateWindowEx( 0, s, AppName, WS_POPUP|WS_CAPTION|WS_SYSMENU, 0, 0, Width, Height, 0, NULL, hInstance, NULL ); if( WndMain == NULL ) { return E_FAIL; } //some code //////////////////////////////////////////////////////////////////////// Thanks

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this