Search Results

Search found 11 results on 1 pages for 'cedit'.

Page 1/1 | 1 

  • How to get CEdit to scroll properly?

    - by CSharperWithJava
    I have a CEdit control that's used to display a diagnostics output. Sometimes the data overflows the screen size, so naturally I set the Vertical Scroll property to true (MFC dialog editor). But then, when I tried to scroll the text that was in the window before isn't cleared and the new text is written over it. The result is a big mess of everything I have scrolled past. I've looked for a draw background property or something similar that will erase everything in the window while scrolling (before redrawing the new data). Any suggestions?

    Read the article

  • How to change the text color in a disabled edit box using MFC?

    - by anand.arumug
    Hello all, I have a dialog in which the edit box is disabled but the text should be displayed in red instead of the default grey. I tried the following: void CMyEdit::OnEnable(BOOL bEnable) { CEdit::OnEnable(bEnable); if (bEnable) { m_BackGroundColor = kRGBWhite; } else { m_BackGroundColor = kRGBDefaultGray; } m_TextColor = kRGBRed; m_BackgroundBrush.DeleteObject(); m_BackgroundBrush.CreateSolidBrush(m_BackGroundColor); Invalidate(); } But its still displaying the text in grey only. But if I remove the base class call CEdit::OnEnable(bEnable); then new text color takes effect. Can anyone explain whats wrong in the code? Thanks for your time. cheers...

    Read the article

  • Doing extra initialisations on a MFC Dialog in Visual Studio 2008 Pro

    - by theunanonim
    How do I make extra initializations on a modal dialog before calling DoModal(); ? I have a main Dialog (the one that is created automatically when I select new MFC Application in Visual Studio 2008 Professional). When I click a button on this dialog I want to open another dialog and set a CString value into a CEdit control. my code: ... void OnClickedButtonX(){ SecondDialogClass Dlg2; Dlg2.asocVar2Cedit.SetWindowTextW(L"my text"); Dlg2.DoModal(); } //asocVar2Cedit is the associeted control variable to the //CEdit control on the second Dialog (Right Click > Add Variable.. in VSC++) ... this code generates a "Debug Assertion" error in winocc... Any ideas ? Thank you in advance.

    Read the article

  • Doing extra initialisations on a MFC Dialog in Visual Studio C++ 2008 Pro

    - by theunanonim
    How do I make extra initializations on a modal dialog before calling DoModal(); ? The whole application is created using VS wizards. I have a main Dialog (the one that is created automatically when I select new MFC Application in Visual Studio 2008 Professional). When I click a button on this dialog I want to open another dialog and set a CString value into a CEdit control. my code: ... void MainDlg::OnClickedButtonX(){ SecondDialogClass Dlg2; Dlg2.asocVar2Cedit.SetWindowTextW(L"my text"); Dlg2.DoModal(); } //asocVar2Cedit is the associeted control variable to the //CEdit control on the second Dialog (Right Click > Add Variable.. in VSC++) ... this code generates at runtime a "Debug Assertion" error in winocc... Any ideas ? Thank you in advance.

    Read the article

  • C++ LPTSTR to int (but memory overwrite problem using atoi)

    - by Dexter
    I have the following code, m_edit is a MFC CEdit (I know I would never use MFC but project demanded it). It's a simple loop, that gets the text from a text edit, converts it to integer after getting the first line, then stores it in m_y vector. LPTSTR szTemp; vector<int> m_y; for(int i = 0; i < m_edit->GetLineCount(); i++){ szTemp = s_y.GetBuffer(0); m_edit->GetLine(i, szTemp); // get line text store in szTemp y = atoi(szTemp); m_y.push_back(y); szTemp = ""; y = 0; } IMPORTANT EXAMPLE: So let's say the CEdit has 6 numbers: 0 5 2 5 18 6 If you use Visual Studio's debugger you will notice an anomaly!! Here's what it shows: y = 0 y = 5 y = 2 y = 5 y = 18 y = 68 Do you see that? szTemp when inserted into atoi, it returns the number 6, but concatenates the 2nd digit of the last number!!! This is why I did szTemp = "";, but the problem persists. Also, let's say the last number was 17 (not 18), then this time debugger would say y = 67, so it is definitely this problem. However, Visual Studio debugger, when you hover over szTemp during this iteration, it says '6' <--- not '68' inside szTemp. So somehow atoi is ruining it. Am I suppose to concatenate a \0 into szTemp before putting it into atoi? How do I solve this easily?

    Read the article

  • How to disable dragging from a Rich Edit Control

    - by John
    I use a subclass of CRichEditCtrl to provide a CEdit+ type control. One thing I want is to disable drag-drop functionality, which the base class provided by default. Disabling dropping is easy: ::RevokeDragDrop(m_hWnd); But I can't see a simple way to disable the control being a drag-source. Is there an easy way?

    Read the article

  • sudo midnight commander

    - by mit
    I sometimes start midnight commander as superuser with the command sudo mc to do some operations on the current working directory as superuser. But this results in ~/.mc having the wrong permissions, which I need to fix manually. Any solution? Edit: I accepted an answer. I want to further add, that .mc is a directory, so my solution goes like this: $ cd ~ ~$ sudo chown -R mit.mit .mc ~$ chmod 775 .mc ~$ cd .mc ~$ chmod -R 664 .mc ~/.mc$ chmod 775 cedit It seems not to be a good idea after installing mc to use sudo on its first start .

    Read the article

  • Debugging matchit plugin in vim (under Cygwin)

    - by system PAUSE
    The "matchit" plugin for vim is supposed to allow you to use the % key to jump between matching start/end tags when editing HTML, as well as /* and */ comment delimiters when editing other kinds of code. I've followed the exact instructions in ":help matchit", but % still doesn't work for me. It seems silly to ask "Why doesn't this work?" so instead I'm asking How can I diagnose the problem? Pointers to references are welcome, but specific vim-plugin-debugging techniques are preferred. Here is the ~/.vim directory: $ ls -ltaGR ~/.vim /cygdrive/y/.vim: total 0 drwxr-xr-x 1 spause 0 Sep 17 13:20 .. drwxr-xr-x 1 spause 0 Sep 16 13:59 doc drwxr-xr-x 1 spause 0 Sep 16 13:58 . drwxr-xr-x 1 spause 0 Sep 16 13:58 plugin /cygdrive/y/.vim/doc: total 24 -rw-r--r-- 1 spause 1961 Sep 16 13:59 tags drwxr-xr-x 1 spause 0 Sep 16 13:59 . -rw-r--r-- 1 spause 19303 Sep 16 13:58 matchit.txt drwxr-xr-x 1 spause 0 Sep 16 13:58 .. /cygdrive/y/.vim/plugin: total 32 drwxr-xr-x 1 spause 0 Sep 16 13:58 .. -rw-r--r-- 1 spause 30714 Sep 16 13:58 matchit.vim drwxr-xr-x 1 spause 0 Sep 16 13:58 . I am running vim 7.2 under Cygwin (installed Fall 2008). cygcheck shows: 1829k 2008/06/12 C:\cygwin\bin\cygwin1.dll Cygwin DLL version info: DLL version: 1.5.25 DLL epoch: 19 DLL bad signal mask: 19005 DLL old termios: 5 DLL malloc env: 28 API major: 0 API minor: 156 Shared data: 4 DLL identifier: cygwin1 Mount registry: 2 Cygnus registry name: Cygnus Solutions Cygwin registry name: Cygwin Program options name: Program Options Cygwin mount registry name: mounts v2 Cygdrive flags: cygdrive flags Cygdrive prefix: cygdrive prefix Cygdrive default prefix: Build date: Thu Jun 12 19:34:46 CEST 2008 CVS tag: cr-0x5f1 Shared id: cygwin1S4 In vim, :set shows: --- Options --- autoindent fileformat=dos shiftwidth=3 background=dark filetype=html syntax=html cedit=^F scroll=24 tabstop=3 expandtab shelltemp textmode viminfo='20,<50,s10,h Notably, the syntax and filetype are both recognized as HTML. (The syntax colouring is just fine.) If additional info is needed, please comment. UPDATE: Per answer by too much php: After trying vim -V1, I had changed my .vimrc to include a line set nocp so the compatible option is not on. :let loadad_matchit loaded_matchit #1 :set runtimepath? runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim72,/usr/share/vim/vimfiles/after,~/.vim/after (~ is /cygdrive/y) Per answer by michael: :scriptnames 1: /cygdrive/y/.vimrc 2: /usr/share/vim/vim72/syntax/syntax.vim 3: /usr/share/vim/vim72/syntax/synload.vim 4: /usr/share/vim/vim72/syntax/syncolor.vim 5: /usr/share/vim/vim72/filetype.vim 6: /usr/share/vim/vim72/colors/evening.vim 7: /cygdrive/y/.vim/plugin/matchit.vim 8: /cygdrive/y/.vim/plugin/python_match.vim 9: /usr/share/vim/vim72/plugin/getscriptPlugin.vim 10: /usr/share/vim/vim72/plugin/gzip.vim 11: /usr/share/vim/vim72/plugin/matchparen.vim 12: /usr/share/vim/vim72/plugin/netrwPlugin.vim 13: /usr/share/vim/vim72/plugin/rrhelper.vim 14: /usr/share/vim/vim72/plugin/spellfile.vim 15: /usr/share/vim/vim72/plugin/tarPlugin.vim 16: /usr/share/vim/vim72/plugin/tohtml.vim 17: /usr/share/vim/vim72/plugin/vimballPlugin.vim 18: /usr/share/vim/vim72/plugin/zipPlugin.vim 19: /usr/share/vim/vim72/syntax/html.vim 20: /usr/share/vim/vim72/syntax/javascript.vim 21: /usr/share/vim/vim72/syntax/vb.vim 22: /usr/share/vim/vim72/syntax/css.vim Note that matchit.vim, html.vim, tohtml.vim, css.vim, and javascript.vim are all present. :echo b:match_words E121: Undefined variable: b:match_words E15: Invalid expression: b:match_words Hm, this looks highly relevant. I'm now looking through :help matchit-debug to find out how to fix b:match_words.

    Read the article

1