If you have any large plants or trees near your window, you should trim them back. Cardinals are attracted to trees, bushes, and vines. Second, you need to identify your window. This is a festive season, which should make it a little easier. Get some window decals, or some of that fake snow. Clearly mark your window with these things. A bird won't try to fly through something that appears solid. Next, set up a little bird feeder and maybe a little bird house away from the window, but not too far away. Try to attract the cardinal to the side of your house, instead of near that window. Good luck!