Jump to content
  • Advertisement
Sign in to follow this  

Window Procedure

This topic is 3570 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!