Sorry Mike!
But I have know idea what XLib is and how it differs from standard MFC/Win32/...