Window Procedure

Started by
0 comments, last by Gage64 15 years, 8 months ago
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
Advertisement
Link.

This topic is closed to new replies.

Advertisement