   Do i need HINSTANCE in my window class?
  in c++,Hi, I''ve created a window class, it works and all, but I realised that i dont use the hinstance from the sub:int WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, INT ){}but some wc value seems to have it but im not sure if it uses it or what. (WNDCLASSEX wc= {..........)Do i need the hinstance in my window class, or what.Thanks,heres parts of the code that has hinstance  in it. hWnd = CreateWindow(name, caption, WS_OVERLAPPEDWINDOW , 0, 0, width, height, GetDesktopWindow(), NULL, wc.hInstance    , NULL );UnregisterClass(name, wc.hInstance ); 
  without it will only run on win2k and xp, 98, me and 95 need the hinstanceT2k ;  If you don't plan to use your class in DLLs you usually have only one HINSTANCE to work with. You can keep it in your window class for convenience, but you can always get the current instance handle with GetModuleFileHandle( 0 ) or from your window via GetWindowLong/GetWindowLongPtr( hwnd, GWL_HINSTANCE ).But, as T2K already said, for CreateWindow simply always use an valid instance handle.   [edited by - Endurion on February 17, 2004 6:41:15 AM];  Ah i see, i do want mine working on 98 etc, so im using GetModuleFileHandle for everything now.Thanks alot. 