Have you tried it? It will work just fine.
All 64-bit versions of Windows have a 32-bit compatibility layer, known as the Windows on Windows 64 subsystem (or WoW64 for short), specifically designed for running 32-bit applications.
When you compile your own application, you need to make sure that you compile it as a "Win32" application. That will compile it as a 32-bit application, ensuring that it can run on both 32-bit and 64-bit versions of Windows. If you compile it as a 64-bit application, it will only run on 64-bit versions of Windows, and you will need to distribute two versions of your app.