scrolling of the window in c language graphics

This is a discussion on scrolling of the window in c language graphics within the C Programming forums, part of the General Programming Boards category; I would like some suggestions and if possible the source code
for scrolling like the scrolling we usually do in ...

If you are making a windows program, I think it can be done very easily
Make an edit box the size of your client area, add a menu with all the features you want and it is done. Iíve never done it and there could be some unforeseen difficulties, but I think this is the main thought.

Originally posted by maes If you are making a windows program, I think it can be done very easily
Make an edit box the size of your client area, add a menu with all the features you want and it is done. Iíve never done it and there could be some unforeseen difficulties, but I think this is the main thought.

Better control if over text formatting if you use a HDC. Try getting different fonts, line breaks, right or center justification, colours ect in the edit ctrl.

Use a frame ctrl, get its HWND.
GetDC() on this HWND and create TWO Compatible HDC's with CreateCompatibleDC(), create two bmp's with CreateCompatibleBitmap(), select them into the HDC's with SelectObject() catching the returnsed BMP's to be replaced (re SelectObject()'ed) on exit, before the created HDC's and BMP's are deleted with DeleteObject()

One HDC is to do all the drawing on (Buffer or FrameBuffer). Assemble the text, when you have finished copy to the other (ScreenDC). Then call a paint with InvalidateRect()

The paint function is called in response to a WM_PAINT msg in the callback.
In the paint call BeginPaint() and BitBlt() the ScreenDC to the DC returned from the BeginPaint().
Call EndPaint()