   OGL and multiple windows in MFC
  HiI'm using Visual .NET and MFC (WinXP pro).I have no problems rendering things in OGL as long as I use the same window in my appilcation. Now I want to preview textures in a different window, but they wont show up.To my knowledge this is due to the fact that they are "registered" with the rendering context of the main window. I have tried various combinations of:wglCreateContext, wglGetCurrentContext, wglGetCurrentDC, wglMakeCurrentbut I can't figure it out. If I create a new context I may draw things, but I cant use my previously registered texture handles to preview the textures.I would rather not reregister the textures in the new context since it feels like a waste...Any ideas?Thanks// Javelin   
  You need to use wglShareLists to share display lists, textures, and other context-specific things.   ;  Thanks, that is exactly what I've been looking for. However, I can't get that to work either...  :\ OR more exact, any call to wglMakeCurrent after the call to wglSharedLists results in an access violation. Even wglMakeCurrent(NULL,NULL);* I have the same pixel format in the 2 windows. * I have googled for examples, but haven't found any yet...void c_page_imptextures::OnPaint(){CClientDC dc(this);HGLRC ogldc1 = ::wglGetCurrentContext();HGLRC ogldc2 = ::wglCreateContext(dc.m_hDC);if(!::wglShareLists(ogldc2,ogldc1)){  DDEBUG("SharedLists failed!");return;} // This call will chrash the appif(!::wglMakeCurrent(dc.m_hDC,ogldc2)){DDEBUG("Could not make the OGLDC to current!");return;} ... yada yada yada ...}More input, anyone?Thanks// Javelin;  Solved: I switched the parameters to wglSharedLists()I blame MSDN since it is a wonder of clarity...  :]Parametershglrc1 Specifies the OpenGL rendering context with which to share display lists. hglrc2 Specifies the OpenGL rendering context to share display lists with hglrc1. The hglrc2 parameter should not contain any existing display lists when wglShareLists is called. // Javelin