注册 登录
编程论坛 C图形专区

Cannot find or open the PDB file?

有容就大 发布于 2012-02-21 19:27, 1410 次点击
程序代码:
#include <windows.h>

LRESULT CALLBACK  WndProc(HWND, UINT, WPARAM, LPARAM);

int WINAPI  WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR iCmdLine, int iCmdShow)
{
    static  TCHAR  szAppName[] = TEXT("Draw a point!");
    HWND  hwnd;
    MSG   msg;
    WNDCLASS wndclass;

    wndclass.style = CS_HREDRAW | CS_VREDRAW;
    wndclass.lpfnWndProc = WndProc;
    wndclass.cbClsExtra = 0;
    wndclass.cbWndExtra = 0;
    wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
    wndclass.hInstance = hInstance;
    wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
    wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
    wndclass.lpszClassName = szAppName;
    wndclass.lpszMenuName = NULL;

    if (!RegisterClass(&wndclass))
    {
        MessageBox(NULL, TEXT("This program requires windows NT!"), szAppName, MB_ICONERROR);
        return 0;
    }

    hwnd = CreateWindow (szAppName, TEXT("One Point"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT,
                        CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);

    if(hwnd == NULL)
    {
        MessageBox(NULL, TEXT("No more memory for CreateWindow!"), szAppName, MB_ICONERROR);
        return 0;
    }

    ShowWindow(hwnd, iCmdShow);
    UpdateWindow(hwnd);

    while (GetMessage(&msg, NULL, 0, 0))
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }

    return msg.wParam;
}

LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    static int cxClient, cyClient;
    HDC  hdc;
    PAINTSTRUCT ps;
    int i;

    switch (message)
    {
    case WM_CREATE:
        cxClient = LOWORD(lParam);
        cyClient = HIWORD(lParam);
        return 0;
    case  WM_PAINT:
        hdc = BeginPaint(hwnd, &ps);
        MoveToEx(hdc, 0, cyClient/2, NULL);
        LineTo(hdc,cxClient, cyClient/2);
        MoveToEx(hdc, cxClient/2, 0, NULL);
        LineTo(hdc, cxClient/2, cyClient);
        EndPaint(hwnd,&ps);
    case  WM_DESTROY:
        PostQuitMessage(0);
        return 0;
    }
    return DefWindowProc(hwnd, message, wParam, lParam);
}
这个是画个十字交叉的两条直线的程序,运行后屏幕一闪而过?
“画点004.exe”: 已加载“D:\project\C++\画点004\Debug\画点004.exe”,已加载符号。
“画点004.exe”: 已加载“C:\WINDOWS\system32\ntdll.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\kernel32.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\user32.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\gdi32.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\msvcr100d.dll”,已加载符号。
“画点004.exe”: 已加载“C:\WINDOWS\system32\imm32.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\advapi32.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\rpcrt4.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\secur32.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\lpk.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\usp10.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\uxtheme.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\msvcrt.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\Program Files\360\360Safe\safemon\safemon.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\shell32.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\shlwapi.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\ole32.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\oleaut32.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\msvcp60.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\wininet.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\crypt32.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\msasn1.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\psapi.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\ws2_32.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\ws2help.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\version.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\WinSxS\x86_Microsoft.\comctl32.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\comctl32.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\MSCTF.dll”,Cannot find or open the PDB file
“画点004.exe”: 已加载“C:\WINDOWS\system32\msctfime.ime”,Cannot find or open the PDB file
程序“[3320] 画点004.exe: 本机”已退出,返回值为 0 (0x0)。
什么原因,怎么弄。
2 回复
#2
有容就大2012-02-22 12:24
。。。。。。。
#3
有容就大2012-02-23 18:19
return 0;
  没人啊,好冷啊,借个火啊,点支烟啊。
1