The source code for the examples was compiled under MSC 6.0 and the Windows SDK 3.0. I do not guarantee that they will work for Windows 3.1, I don't have access currently to 3.1 to test it out.