My teacher read this story aloud in elementary school (mid 90s). I'm not sure if it was a short story or a chapter book. What I remember is that a boy is in his bedroom, which has no windows, and decides to paint a window onto his wall. After he paints the scene, it actually becomes a real place that he can travel to by climbing through the window. I also remember that the scene he painted was of a maple tree farm, and that when he climbed through he tasted some of the maple syrup that was coming from the trees.
This might be Bailey’s Window by Anne Lindbergh.
Sounds like it has some elements in common with Bailey’s Window, by Anne Lindbergh. There’s a whole longer story though, with Bailey escaping through his paintings from cousins; could your teacher have only read a few chapters?