1) open settings.cfg in the game folder:
There found the following settings:
0 # Display mode: 0 = full screen, 1 = windowed
change to
1 # Display mode: 0 = full screen, 1 = windowed
2) Go to the .exe file of the game and right click to change the Compatibility settings (click on the Compatibility tab):
In the "Settings" box below select "Reduced color mode" and pick 16-bit (65536) color
Just in case, also click "Run this program as an administrator"
Try it if it works.
These settings were tested by me on the Darkest Hour settings and executable, which should be similar to HOI2.