dtk_make_current_window man page
dtk_make_current_window — Make a window the target of the next draws
void dtk_make_current_window(dtk_hwnd wnd);
dtk_make_current_window() makes the window referenced by wnd as the target of the next drawings. If wnd is NULL then the function unbind the current window for next drawings.
For a sucessfull call to dtk_draw_shape(), a window should be current.
The creation of the window does not make it current.