为什么我无法复制并粘贴到编辑控件中

为什么我无法复制并粘贴到编辑控件中

本文介绍了为什么我无法复制并粘贴到编辑控件中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!



我想首先感谢所有花时间查看此主题并尝试提供帮助的人。



我的问题很容易描述:



我用资源编辑器创建了一个编辑控件(我使用ResEdit,因为Visual Studio Express Edition没有提供一个),并试图粘贴我从记事本复制的一些文本,但没有任何反应。



如果我输入一些文字进入编辑控件,然后选择该文本,然后突出显示,并尝试粘贴,文本消失,只有闪烁的插入符号仍然存在。



我试过检查ResEdit中的Accept Files标志,但它也没有用,正如我所料......



编辑#2:

************************************************** ************



我发现了问题的原因:

Mozilla Firefox阻止粘贴操作跑步的时候。

我不认为它是Firefox,但 当我打开它时问题就开始了



在Firefox上工作一段时间后关闭它,问题仍然存在。



所有其他程序(记事本,Word ......)工作正常,它只是我的有问题。



顺便说一句,编辑控件是在对话框中创建的,但是当我通过CreateWindowEx(..)创建编辑控件时,问题仍然存在。



仅在我重新启动计算机后重新启动我的申请,粘贴工作正常。



重要提示:



这种行为对我写的所有程序都很典型。



这是我设法收集的所有重要信息如果我发现其他任何问题,我会发布更多信息。



*********************** ********************************************* >


以下是资源文件的片段:



Hello everyone!

I would like to start by saying thanks to everyone who takes some time to view this thread and try to help.

My problem is quite simple to describe:

I have created an edit control with resource editor ( I use ResEdit, since Visual Studio Express Edition doesn't provide one ), and have tried to paste some text that I have copied from Notepad, but nothing happens.

If I type some text into edit control, then select that text, so it is highlighted, and try to paste, the text disappears and only flashing caret remains.

I have tried with checking the "Accept Files" flag in ResEdit, yet it didn't work either, as I expected...

EDIT #2:
**************************************************************

I have discovered the cause of the problem:
Mozilla Firefox blocks paste operation when running.
I don't think it is Firefox, but the problem starts when I turn it on.

After working in Firefox for a while, and closing it, the problem remains.

All other programs ( Notepad, Word ... ) work fine, it is just mine that has problems.

By the way, edit control was created in dialog box, yet when I create edit control via CreateWindowEx( .. ), the problem still persists.

Only after I restart my computer, and restart my application, does paste work fine.

IMPORTANT:

This behavior is typical for ALL programs that I write.

That is all important information I have managed to gather, I will post more if I find anything else.

********************************************************************

Here is the snippet from the resource file:

// Generated by ResEdit 1.5.11
// Copyright (C) 2006-2012
// http://www.resedit.net

#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "resource.h"



LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG13 DIALOG 0, 0, 506, 329
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_GROUP | WS_POPUP | WS_SYSMENU
CAPTION "Нови Објекат"
FONT 8, "Microsoft Sans Serif"
{
    EDITTEXT        IDC_EDIT1, 25, 24, 100, 13, ES_AUTOHSCROLL
    LTEXT           "Улица", IDC_STATIC, 25, 15, 30, 8, SS_LEFT
    LTEXT           "Број", IDC_STATIC, 26, 69, 15, 8, SS_LEFT
    EDITTEXT        IDC_EDIT2, 45, 67, 30, 13, ES_AUTOHSCROLL
    COMBOBOX        IDC_COMBO1, 141, 24, 70, 15, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Општина", IDC_STATIC, 141, 15, 40, 8, SS_LEFT
    LTEXT           "X", IDC_STATIC, 92, 68, 8, 8, SS_LEFT
    LTEXT           "Y", IDC_STATIC, 151, 68, 8, 8, SS_LEFT
    EDITTEXT        IDC_EDIT3, 100, 66, 35, 13, ES_AUTOHSCROLL
    EDITTEXT        IDC_EDIT4, 160, 66, 35, 13, ES_AUTOHSCROLL
    GROUPBOX        "Координате", IDC_STATIC, 85, 54, 126, 34, BS_CENTER
    GROUPBOX        "ЛОКАЦИЈА", IDC_STATIC, 10, 5, 215, 91, BS_CENTER
    CONTROL         "", IDC_SPIN1, UPDOWN_CLASS, UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_WRAP, 135, 65, 11, 15
    CONTROL         "", IDC_SPIN2, UPDOWN_CLASS, UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_WRAP, 195, 65, 11, 15
    LTEXT           "Назив ", IDC_STATIC, 20, 114, 35, 8, SS_LEFT
    EDITTEXT        IDC_EDIT5, 20, 123, 100, 13, ES_AUTOHSCROLL
    LTEXT           "Површина", IDC_STATIC, 128, 150, 35, 8, SS_LEFT
    EDITTEXT        IDC_EDIT6, 166, 149, 34, 13, ES_AUTOHSCROLL
    CONTROL         "", IDC_SPIN3, UPDOWN_CLASS, UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_WRAP, 200, 148, 11, 14
    LTEXT           "Намена геотермалне енергије", IDC_STATIC, 20, 139, 110, 8, SS_LEFT
    COMBOBOX        IDC_COMBO2, 20, 149, 100, 15, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Алтернативна енергија", IDC_STATIC, 20, 165, 92, 8, SS_LEFT
    COMBOBOX        IDC_COMBO3, 20, 175, 100, 12, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Енергетски  пасош", IDC_STATIC, 126, 114, 66, 8, SS_LEFT
    COMBOBOX        IDC_COMBO4, 126, 123, 85, 12, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    AUTORADIOBUTTON "Да", IDC_RADIO1, 140, 177, 25, 8, WS_GROUP
    AUTORADIOBUTTON "Не", IDC_RADIO2, 180, 177, 20, 8
    AUTORADIOBUTTON "Домаћинства", IDC_RADIO3, 40, 213, 60, 8, WS_GROUP
    AUTORADIOBUTTON "Индустрија", IDC_RADIO4, 140, 213, 50, 8
    AUTORADIOBUTTON "Пољопривреда", IDC_RADIO5, 40, 228, 70, 8
    AUTORADIOBUTTON "Саобраћај", IDC_RADIO6, 140, 228, 50, 8
    AUTORADIOBUTTON "Јавна и Комунална предузећа", IDC_RADIO7, 40, 243, 125, 8
    GROUPBOX        "КАРАКТЕРИСТИКЕ ОБЈЕКТА", IDC_STATIC, 10, 101, 215, 170, BS_CENTER
    CTEXT           "Тип\nунутрашњих инсталација", IDC_STATIC, 251, 205, 86, 17, SS_CENTER
    COMBOBOX        IDC_COMBO5, 251, 221, 85, 12, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    CTEXT           "Доступна топлотна снага", IDC_STATIC, 356, 205, 55, 15, SS_CENTER
    EDITTEXT        IDC_EDIT8, 356, 221, 44, 12, ES_AUTOHSCROLL
    CTEXT           "Инсталисана топлотна снага", IDC_STATIC, 429, 205, 55, 20, SS_CENTER
    EDITTEXT        IDC_EDIT9, 430, 221, 44, 12, ES_AUTOHSCROLL
    CONTROL         "", IDC_SPIN4, UPDOWN_CLASS, UDS_ARROWKEYS, 400, 221, 11, 13
    CONTROL         "", IDC_SPIN5, UPDOWN_CLASS, UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_WRAP, 474, 221, 11, 13
    AUTORADIOBUTTON "Хидрогеотермална", IDC_RADIO8, 262, 27, 81, 8, WS_GROUP
    AUTORADIOBUTTON "Литогеотермална ", IDC_RADIO9, 403, 27, 79, 8
    GROUPBOX        "Тип геотермалне енергије", IDC_STATIC, 250, 16, 235, 25, BS_CENTER
    GROUPBOX        "Тип објекта", IDC_STATIC, 20, 201, 190, 59, BS_CENTER
    PUSHBUTTON      "", IDC_BUTTON7, 461, 288, 25, 20, BS_ICON
    LTEXT           "Тип издани", 3009, 339, 58, 45, 8, NOT WS_VISIBLE | SS_LEFT
    COMBOBOX        IDC_COMBO6, 340, 67, 135, 12, NOT WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Ознака ресурса", 3002, 392, 250, 56, 8, NOT WS_VISIBLE | SS_LEFT
    COMBOBOX        IDC_COMBO7, 455, 249, 30, 12, NOT WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Хидрогеотермални систем", 3003, 251, 240, 105, 8, NOT WS_VISIBLE | SS_LEFT
    COMBOBOX        IDC_COMBO8, 250, 158, 105, 12, NOT WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Диспозиција подземних вода", 3004, 251, 148, 100, 8, NOT WS_VISIBLE | SS_LEFT
    COMBOBOX        IDC_COMBO9, 250, 248, 105, 12, NOT WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS
    COMBOBOX        IDC_COMBO10, 395, 158, 91, 12, NOT WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS
    PUSHBUTTON      "", IDC_BUTTON6, 361, 245, 25, 21, NOT WS_VISIBLE | BS_ICON
    GROUPBOX        "Потрошна топла вода", IDC_STATIC, 125, 165, 85, 26, BS_CENTER
    GROUPBOX        "ПРИМЕНА ГЕОТЕРМАЛНЕ ЕНЕРГИЈЕ", IDC_STATIC, 240, 5, 256, 266, BS_CENTER
    GROUPBOX        "Карактеристике изворишта", 3012, 250, 46, 235, 96, NOT WS_VISIBLE | BS_CENTER
    COMBOBOX        IDC_COMBO11, 261, 67, 70, 12, NOT WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Тип изворишта", 3005, 262, 58, 70, 8, NOT WS_VISIBLE | SS_LEFT
    CONTROL         "", IDC_LIST2, WC_LISTVIEW, NOT WS_VISIBLE | WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_EDITLABELS | LVS_SINGLESEL | LVS_REPORT, 260, 85, 185, 51
    CONTROL         "", IDC_LIST3, WC_LISTVIEW, NOT WS_VISIBLE | WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_EDITLABELS | LVS_SINGLESEL | LVS_REPORT, 365, 150, 120, 53
    PUSHBUTTON      "+", IDC_BUTTON9, 455, 90, 18, 18, NOT WS_VISIBLE | BS_ICON
    PUSHBUTTON      "-", IDC_BUTTON10, 455, 113, 18, 18, NOT WS_VISIBLE | BS_ICON
    PUSHBUTTON      "+", IDC_BUTTON11, 270, 175, 22, 22, NOT WS_VISIBLE | BS_ICON
    PUSHBUTTON      "-", IDC_BUTTON12, 314, 175, 22, 22, NOT WS_VISIBLE
}





************************************************** *************



我使用纯WIN32 API在MS Visual Studio Express 2008,Windows XP,C ++中工作。



如果需要任何其他信息(源代码或类似的东西),请提出要求,我将非常乐意提供。



***************************************************************

I work in MS Visual Studio Express 2008, on Windows XP, in C++, using pure WIN32 API.

If any other information is required ( source code or something similar ), please ask for it, I will more than gladly supply it.

推荐答案



这篇关于为什么我无法复制并粘贴到编辑控件中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 19:40