wxFrame 不能直接进行窗体的坐标改变,而是通过其父类wxWindow的Move()方法进行坐标改变。 创建一个config.h #ifndef CONFIG_H_INCLUDED #define CONFIG_H_INCLUDED //ttFrame为窗体类,声明一个全局的指针frm便于在其他地方对该指针所对应的窗体进行Move ttFrame* frm; #endif // CONFIG_H_INCLUDED 主程序中:ttApp.cpp bool ttApp::OnInit() { //创建frm为新的ttFrame对象 frm= new ttFrame(0L); //显示窗体 frm->Show(); //从当前坐标开始移动 frm->Move(100,500); return true; }