CHtmlView做浏览器,
打开jsp页面,在文本输入框输入中文时,
输入到一定字数后,会出现输入法的白框
就好像页面没有及时刷新,
而且用鼠标点击右键后,也会出现白框(就是右键菜单大小的白框)IMPLEMENT_DYNCREATE(CSampleBrowerView, CHtmlView)BEGIN_MESSAGE_MAP(CSampleBrowerView, CHtmlView)
ON_COMMAND(ID_GO_FORWARD, OnGoForward)
         

END_MESSAGE_MAP()
    
CSampleBrowerView::CSampleBrowerView()
{
// TODO: add construction code here}CSampleBrowerView::~CSampleBrowerView()
{
}BOOL CSampleBrowerView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
//  the CREATESTRUCT cs return CHtmlView::PreCreateWindow(cs);
}/////////////////////////////////////////////////////////////////////////////
// CSampleBrowerView drawingvoid CSampleBrowerView::OnDraw(CDC* pDC)
{
CSampleBrowerDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}void CSampleBrowerView::OnInitialUpdate()
{
CHtmlView::OnInitialUpdate(); // TODO: This code navigates to a popular spot on the web.
//  change the code to go where you'd like.
//GoHome();
}/////////////////////////////////////////////////////////////////////////////
// CSampleBrowerView printing
/////////////////////////////////////////////////////////////////////////////
// CSampleBrowerView diagnostics#ifdef _DEBUG
void CSampleBrowerView::AssertValid() const
{
CHtmlView::AssertValid();
}void CSampleBrowerView::Dump(CDumpContext& dc) const
{
CHtmlView::Dump(dc);
}CSampleBrowerDoc* CSampleBrowerView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSampleBrowerDoc)));
return (CSampleBrowerDoc*)m_pDocument;
}
#endif //_DEBUG

解决方案 »

  1.   

    补充:BOOL CSampleBrowerApp::InitInstance()
    {
    AfxEnableControlContainer(); // 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.#ifdef _AFXDLL
    Enable3dControls(); // Call this when using MFC in a shared DLL
    #else
    Enable3dControlsStatic(); // Call this when linking to MFC statically
    #endif // Change the registry key under which our settings are stored.
    // TODO: You should modify this string to be something appropriate
    // such as the name of your company or organization.
    SetRegistryKey(_T("Local AppWizard-Generated Applications")); LoadStdProfileSettings();  // Load standard INI file options (including MRU) // Register the application's document templates.  Document templates
    //  serve as the connection between documents, frame windows and views. CSingleDocTemplate* pDocTemplate;
    pDocTemplate = new CSingleDocTemplate(
    IDR_MAINFRAME,
    RUNTIME_CLASS(CSampleBrowerDoc),
    RUNTIME_CLASS(CMainFrame),       // main SDI frame window
    RUNTIME_CLASS(CSampleBrowerView)); AddDocTemplate(pDocTemplate); // Parse command line for standard shell commands, DDE, file open
    CCommandLineInfo cmdInfo;
    ParseCommandLine(cmdInfo); // Dispatch commands specified on the command line
    if (!ProcessShellCommand(cmdInfo))
    return FALSE; // The one and only window has been initialized, so show and update it. m_pMainWnd->ShowWindow(SW_SHOW);
    m_pMainWnd->SetWindowText("call center");
    m_pMainWnd->UpdateWindow(); return TRUE;
    }
      

  2.   

    谢谢jiangsheng(蒋晟.Net[MVP]) http://support.microsoft.com/kb/q220021/修改如下
    BOOL CSampleView::PreCreateWindow(CREATESTRUCT& cs)
    {
    // TODO: Modify the Window class or styles here by modifying
    //  the CREATESTRUCT cs
    cs.style |= WS_CLIPCHILDREN;return CHtmlView::PreCreateWindow(cs);
    }就ok了