setIcon() problem

This code cannot display Icon in the title bar normally

    juce::File imagefile("D:\PROJECT\MUSIC\JUCE_Project\dna_icon.png");
            juce::Image icon = juce::ImageFileFormat::loadFrom(imagefile);

what should I do

My bad´╝îpath is wrong ,is " / ", not " \ "

Probably it would have worked also with \ if you escaped them correctly.

Remember that \ has special meaning in that context depending on the following character (e.g. \n means a newline character) so if you want an actual \ to appear in your string, you should escape it basically typing it twice, so your path should have looked like: