C语言这里哪出错了,对话框出不来,加printf调试也输出不了?
请大佬们看看,资源文件设置妥当了,但是对话框出不来!我是新手,总感觉代码没问题程序代码:
#include<windows.h> #include<stdio.h> #include"resource.h" HINSTANCE hInstance; BOOL CALLBACK DlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_INITDIALOG: printf("1111111"); return TRUE; } return FALSE; } int main() { hInstance=GetModuleHandleA(NULL); DialogBoxA(hInstance, (char*)IDD_DIALOG1, NULL, DlgProc); return 0; }