Click here to Skip to main content
15,922,427 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHelp.Transfer data. Pin
Svin1-Jul-03 23:00
Svin1-Jul-03 23:00 
GeneralRe: Help.Transfer data. Pin
AlexO2-Jul-03 3:30
AlexO2-Jul-03 3:30 
GeneralRe: Help.Transfer data. Pin
basementman2-Jul-03 5:00
basementman2-Jul-03 5:00 
GeneralAgain:Transmit files by Serial Ports Pin
Angel Kid1-Jul-03 22:03
Angel Kid1-Jul-03 22:03 
GeneralRe: Again:Transmit files by Serial Ports Pin
Eugene Pustovoyt1-Jul-03 22:27
Eugene Pustovoyt1-Jul-03 22:27 
GeneralRe: Again:Transmit files by Serial Ports Pin
Angel Kid1-Jul-03 23:42
Angel Kid1-Jul-03 23:42 
GeneralRe: Again:Transmit files by Serial Ports Pin
Eugene Pustovoyt2-Jul-03 0:38
Eugene Pustovoyt2-Jul-03 0:38 
GeneralRich edit vertical scroll bar not working Pin
insanely4201-Jul-03 19:39
insanely4201-Jul-03 19:39 
Greetings

I have a Rich Edit control for my app which I am using to Syntax Colorize SQL language whenever one SQL is opened in the editor.

On every EN_CHANGE, i am lexing the SQL and colorizing it accordingly.

The code I am using are -

code:
----------------------------------------------------------------------------- if ( HIWORD ( pWPARAM ) == EN_VSCROLL ) {

if ( pCQueryWnd->pCQueryEdit->uHiliting )
return 0;

PostMessage ( pCQueryWnd->pCQueryEdit-uHWND, UM_CONTENT_CHANGE, 0, 0 );

}
-----------------------------------------------------------------------------

This is written in its Parent Window WndProc.

In the WM_VSCROLL message of the window I am having the following code snippet -


code:
------------------------------------------------------------------------
case WM_VSCROLL:
if ( !pCQueryEdit->uHiliting )
PostMessage ( pCQueryEdit->uHWND, UM_CONTENT_CHANGE, 0, 0 );
break;
-----------------------------------------------------------------------------

I need to process VScrolling as I am doing only screenfull of highlighting for optimizations. Therefore whenever a user is pressing the Scroll button I am again Lexing screenful of text and colorizing it.

Before highlighting I am using the following functions


code:
----------------------------------------------------------------------------- pDoc->Undo( tomSuspend, NULL ); // dont record this into the undo stack
pDoc->Freeze(&f);
-----------------------------------------------------------------------------

After highlighting I am using

code:
----------------------------------------------------------------------------- pDoc->Unfreeze(&f);
pDoc->Undo( tomResume, NULL );
-----------------------------------------------------------------------------

In between I am highlighting part of text using the following method

code:------------------------------------------------------------------------ ITextRange * textrange;
ITextFont * font;

pDoc->Range ( pStart, pEnd, &textrange );
textrange->GetFont ( &font );

font->SetForeColor( pColor );

font->Release();
textrange->Release();
-----------------------------------------------------------------------------

The problem is that VScroll does not work properly. IF I stop colorizing everything starts working.

If I use the Mousewheel everything is working perfectly

Note : This problem only happens when the screen is in the first line. I cant seem to scroll the first line up the edit client window. After I have moved the first line up using some other method ( keys or mousewheel ), everything seems to work fine and scrolling is done as expected.

Any ideas....
GeneralRe: Rich edit vertical scroll bar not working Pin
Rage1-Jul-03 22:47
professionalRage1-Jul-03 22:47 
GeneralModal dialog removes my App from Alt+Tab windows... Pin
insanely4201-Jul-03 19:36
insanely4201-Jul-03 19:36 
GeneralRe: Modal dialog removes my App from Alt+Tab windows... Pin
basementman2-Jul-03 5:02
basementman2-Jul-03 5:02 
GeneralRe: Modal dialog removes my App from Alt+Tab windows... Pin
insanely4202-Jul-03 5:42
insanely4202-Jul-03 5:42 
GeneralRe: Modal dialog removes my App from Alt+Tab windows... Pin
insanely4202-Jul-03 7:41
insanely4202-Jul-03 7:41 
GeneralRe: Modal dialog removes my App from Alt+Tab windows... Pin
insanely4202-Jul-03 7:43
insanely4202-Jul-03 7:43 
Generalcrystal reports in VC++ Pin
modular1-Jul-03 19:05
modular1-Jul-03 19:05 
GeneralShockwave Flash in dialog Pin
Andrew Allen1-Jul-03 18:59
Andrew Allen1-Jul-03 18:59 
GeneralRe: Shockwave Flash in dialog Pin
Mil102-Jul-03 0:40
Mil102-Jul-03 0:40 
GeneralRe: Shockwave Flash in dialog Pin
Andrew Allen2-Jul-03 5:32
Andrew Allen2-Jul-03 5:32 
GeneralAdvice Needed: MFC List Control Format Problem Pin
spaced_out1-Jul-03 18:10
spaced_out1-Jul-03 18:10 
GeneralRe: Advice Needed: MFC List Control Format Problem Pin
FlyingDancer1-Jul-03 18:55
FlyingDancer1-Jul-03 18:55 
GeneralRe: Advice Needed: MFC List Control Format Problem Pin
spaced_out1-Jul-03 19:20
spaced_out1-Jul-03 19:20 
GeneralRe: Advice Needed: MFC List Control Format Problem Pin
spaced_out1-Jul-03 19:45
spaced_out1-Jul-03 19:45 
GeneralRe: Advice Needed: MFC List Control Format Problem Pin
FlyingDancer1-Jul-03 22:00
FlyingDancer1-Jul-03 22:00 
GeneralA book or tutorial to help beginner... Pin
code-frog1-Jul-03 18:10
professionalcode-frog1-Jul-03 18:10 
GeneralRe: A book or tutorial to help beginner... Pin
Toni781-Jul-03 18:36
Toni781-Jul-03 18:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.