• <small id='jucst'></small><noframes id='jucst'>

      <bdo id='jucst'></bdo><ul id='jucst'></ul>
    <i id='jucst'><tr id='jucst'><dt id='jucst'><q id='jucst'><span id='jucst'><b id='jucst'><form id='jucst'><ins id='jucst'></ins><ul id='jucst'></ul><sub id='jucst'></sub></form><legend id='jucst'></legend><bdo id='jucst'><pre id='jucst'><center id='jucst'></center></pre></bdo></b><th id='jucst'></th></span></q></dt></tr></i><div id='jucst'><tfoot id='jucst'></tfoot><dl id='jucst'><fieldset id='jucst'></fieldset></dl></div>
    <tfoot id='jucst'></tfoot>
      1. <legend id='jucst'><style id='jucst'><dir id='jucst'><q id='jucst'></q></dir></style></legend>

        为什么简单的控制台应用程序运行,但基于对话框的不在 WIN CE 6.0 中运行?

        Why simple console app runs but dialog based does not run in WIN CE 6.0?(为什么简单的控制台应用程序运行,但基于对话框的不在 WIN CE 6.0 中运行?)
        1. <i id='BuVHF'><tr id='BuVHF'><dt id='BuVHF'><q id='BuVHF'><span id='BuVHF'><b id='BuVHF'><form id='BuVHF'><ins id='BuVHF'></ins><ul id='BuVHF'></ul><sub id='BuVHF'></sub></form><legend id='BuVHF'></legend><bdo id='BuVHF'><pre id='BuVHF'><center id='BuVHF'></center></pre></bdo></b><th id='BuVHF'></th></span></q></dt></tr></i><div id='BuVHF'><tfoot id='BuVHF'></tfoot><dl id='BuVHF'><fieldset id='BuVHF'></fieldset></dl></div>
          • <legend id='BuVHF'><style id='BuVHF'><dir id='BuVHF'><q id='BuVHF'></q></dir></style></legend>
              <bdo id='BuVHF'></bdo><ul id='BuVHF'></ul>

                  <tbody id='BuVHF'></tbody>
              1. <tfoot id='BuVHF'></tfoot>

                <small id='BuVHF'></small><noframes id='BuVHF'>

                • 本文介绍了为什么简单的控制台应用程序运行,但基于对话框的不在 WIN CE 6.0 中运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用嵌入式 Visual C++ 4 为 Windows CE 6.0 开发应用程序.

                  I am developing an application for Windows CE 6.0 in embedded Visual C++ 4.

                  我使用以下简单代码创建了一个简单的控制台应用程序(WCE 应用程序),平台为Pocket PC 2003":

                  I created a simple console application (WCE Application) with platform "Pocket PC 2003" with the following simple code:

                  #include "stdafx.h"
                  #include <stdio.h>
                  
                  int WINAPI WinMain( HINSTANCE hInstance,
                                      HINSTANCE hPrevInstance,
                                      LPTSTR    lpCmdLine,
                                      int       nCmdShow)
                  {
                  
                      FILE * pFile; 
                      char c; 
                      pFile=fopen("alphabet.txt","wt");   
                      for (c = 'A' ; c <= 'Z' ; c++) {
                          putc (c , pFile);
                      }   
                      fclose (pFile); 
                      return 0;
                  }
                  

                  这个简单的代码在我的 WinCE 6.0 设备上正常工作,并创建了alphabet.txt".

                  This simple code works correctly on my WinCE 6.0 device and "alphabet.txt" is created.

                  但是当我创建一个基于对话框的项目(WCE MFC AppWizard(exe))并在我的对话框窗口初始化之前将此代码放在我的项目的主类中时它不起作用并且没有创建alphabet.txt"文件没有任何消息,我的应用程序无法打开.

                  But when I create a dialog based project (WCE MFC AppWizard(exe)) and put this code in main class of my project before the initialization of my dialog window it does not work and no "alphabet.txt" file is created and my app does not open without any messages.

                  BOOL CFffffApp::InitInstance()
                  {
                      // Standard initialization
                      // If you are not using these features and wish to reduce the size
                      //  of your final executable, you should remove from the following
                      //  the specific initialization routines you do not need.
                  
                  
                      FILE * pFile; 
                      char c; 
                      pFile=fopen("alphabet.txt","wt");   
                      for (c = 'A' ; c <= 'Z' ; c++) {
                          putc (c , pFile);
                      }   
                      fclose (pFile); 
                  
                  
                      CFffffDlg dlg;
                      m_pMainWnd = &dlg;
                      int nResponse = dlg.DoModal();
                      if (nResponse == IDOK)
                      {
                          // TODO: Place code here to handle when the dialog is
                          //  dismissed with OK
                      }
                      else if (nResponse == IDCANCEL)
                      {
                          // TODO: Place code here to handle when the dialog is
                          //  dismissed with Cancel
                      }
                  
                      // Since the dialog has been closed, return FALSE so that we exit the
                      //  application, rather than start the application's message pump.
                      return FALSE;
                  }
                  

                  为什么它不起作用,我该如何解决这个问题?

                  Why it does not work and how can I resolve this problem?

                  提前致谢,

                  推荐答案

                  目标设备上是否有 MFC 运行时?它们还必须是您的应用程序所针对的对象.请注意,eVC 4.0 使用了 mfcce400.dll,它根本没有随 Platform Builder 6.0 一起提供(实际上 IIRC MFC 甚至不在 CE 6.0 操作系统目录中,Studio '08 为设备使用了更新的 MFC 版本).您必须将 mfcce400 二进制文件(它们在 eVC SDK 中)与您的应用程序一起分发.

                  Does the target device have the MFC runtimes on it? They also have to be the ones your app is built for. Be aware that eVC 4.0 used mfcce400.dll, which did not ship with Platform Builder 6.0 at all (in fact IIRC MFC isn't even in the CE 6.0 OS catalog and Studio '08 used a newer MFC version for devices). You'll have to distribute the mfcce400 binaries (they're in the eVC SDKs) along with your app.

                  这篇关于为什么简单的控制台应用程序运行,但基于对话框的不在 WIN CE 6.0 中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to print vector#39;s data(如何打印矢量的数据)
                  Visual C++ appends 0xCC (int3) bytes at the end of functions(Visual C++ 在函数末尾附加 0xCC (int3) 字节)
                  How to use a variable inside a _T wrapper?(如何在 _T 包装器中使用变量?)
                  MSVC++ warning flags(MSVC++ 警告标志)
                  How to read file which contains uxxxx in vc++(如何在vc++中读取包含uxxxx的文件)
                  stack overflow error in C++ program(C++程序中的堆栈溢出错误)

                      <legend id='tmQVK'><style id='tmQVK'><dir id='tmQVK'><q id='tmQVK'></q></dir></style></legend>

                        <tbody id='tmQVK'></tbody>
                      • <small id='tmQVK'></small><noframes id='tmQVK'>

                        • <bdo id='tmQVK'></bdo><ul id='tmQVK'></ul>
                          <tfoot id='tmQVK'></tfoot>
                          <i id='tmQVK'><tr id='tmQVK'><dt id='tmQVK'><q id='tmQVK'><span id='tmQVK'><b id='tmQVK'><form id='tmQVK'><ins id='tmQVK'></ins><ul id='tmQVK'></ul><sub id='tmQVK'></sub></form><legend id='tmQVK'></legend><bdo id='tmQVK'><pre id='tmQVK'><center id='tmQVK'></center></pre></bdo></b><th id='tmQVK'></th></span></q></dt></tr></i><div id='tmQVK'><tfoot id='tmQVK'></tfoot><dl id='tmQVK'><fieldset id='tmQVK'></fieldset></dl></div>