我程序是在win2000sever下写的刻录在光盘上,现在在win98下运行刚开始几次没事,多运行几次后,按钮上的字体没了,如果重新装vc,运行有字体的程序,过一阵子又是这样!以前在win2000从来不会出现这种情况!我该怎么办,急!(我按钮是使用一个类,重画其颜色和边框)

解决方案 »

  1.   

    应该是程序中用到了 Win2000 有但 Win98 里没有的 API 函数 .
      

  2.   

    那是不是又要回到win2000下去写呀好象在win98下第一次运行会弹出询问please enter the path for mfcsd42.pdb.我一般按取消!
      

  3.   

    The .PDB file is so-called program database file, the Visual C++ compiler generates this file to allow you debug your application. We you are debugging your application, you will (in most cases) see the source code, and you will be able to go through them line by line by pressing F10 or F11. This file is usually very big and contains the file and line information of the functions you called in your source code. You really don't need to see them, but, just out of curiosity, you can open this file in Visual C++ IDE in binary mode.
      

  4.   

    我是在98下编译的呀!
    好象正如laiyling(最熟悉的陌生人)所说!
    当我按F7出现下面情况:
    RC : fatal error RC1109 : error creating Debug/FMXL1.res
    Error executing rc.exe.:fmxl1\ascill.cpp(4) : fatal error C1033: cannot open program database '
    d:\fmxl1\debug\vc60.pdb'
    当我按运行程序出现下面情况:
    FMXL1.cpp
    d:\fmxl1\fmxl1.cpp(4) : fatal error C1033: cannot open program database '
    d:\fmxl1\debug\vc60.pdb'
    FMXL1Dlg.cpp
    d:\fmxl1\fmxl1dlg.cpp(4) : fatal error C1033: cannot open program database '
    d:\fmxl1\debug\vc60.pdb'
    LOOKDATA.cpp
    d:\fmxl1\lookdata.cpp(4) : fatal error C1033: cannot open program database '
    d:\fmxl1\debug\vc60.pdb'
    Splash.cpp
    d:\fmxl1\splash.cpp(5) : fatal error C1033: cannot open program database '
    d:\fmxl1\debug\vc60.pdb'
    USER.cpp
    d:\fmxl1\user.cpp(4) : fatal error C1033: cannot open program database '
    d:\fmxl1\debug\vc60.pdb'
    XPButton.cpp
    d:\fmxl1\xpbutton.cpp(4) : fatal error C1033: cannot open program database '
    d:\fmxl1\debug\vc60.pdb'
    Generating Code...
    Error executing cl.exe.FMXL1.exe - 7 error(s), 1 warning(s)
    但如果我直接按F5则会弹出询问please enter the path for mfcsd42.pdb.按取消,则程序运行都正常但就是button的字体没有,其它控件字体都有!是不是跟我控件继承的类有关?我该怎么办!
      

  5.   

    把..pdb文件删掉,中间文件也删掉,rebuild all,如果还不行,可能是控件类有问题
      

  6.   

    现在就是找不到pdf文件,怎么删!
      

  7.   

    工程目录下只留dsw,dsp和源代码,资源等文件,其他都删掉,然后rebuild all。
      

  8.   

    请检查你的绘制函数,在循环中创建资源(画刷,字体,画笔等),即使用delteobject删除了,也会产生以上问题,建议你预先创建几中资源样式,然后在绘制函数中用SelectObject选择它,应该不会再有如上问题。
      

  9.   

    增补:
    在响应WM_PAINT的绘制函数中,千万不要试图动态创建资源,即使在出函数时匹配地释放了所有资源,也会引发资源耗尽,只是Win98来得更快,Win2000迟早也会发生,对这种情况,本人也曾吃尽苦头,如有类似情况,请诸位及早回头,绕道而行。