This is not surprising as I believe the HWND may already have been destroyed by this time (I could be wrong about this). ) but the SetWindowLong() API return 0 indicating error 1400 (Invalid window handle). ![]() STDMETHOD(SetClientSite) ( IOleClientSite *pClientSite //Pointer to an embedded object's client site. ![]() In the IOleObject::SetClientSite method overwrite of my control, I used SetWindowLong() to subclass the HWND gotten from the IOleWindow::GetWindow() method using the IOleWindow interface pointer QI()'ed from the IOleClientSite ptr passed into SetClientSite() : // IOleObject::SetClientSite overwrite. The following is a summary of my experiment : 1. ![]() Hello Liu Wei, I subclassed the HWND returned from the IOleWindow::GetWindow() method and managed to subclass this window.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |