似乎不应该的样子,OnInitDialog是在DoModal/Create/CreateIndirect的时候才会被调用的。你是在DoModal之前设置的值,看似没有问题。建议你debug一下吧