How to Scroll windows in MFC application? HELP!!!

M

maggie

Hi, All

I am drawing pictures using "polyline" and "Arc" functions. I opened a
new MFC application, and modified the OnDraw function in CDrawerView.
The OnDraw function read data from files and draw lines and arcs
according to the data.
but the datafile is big, so the lines and arcs can not be displayed in
one window. I need scroll the window. I am stuck on making the window
scrollable.
I tried to change the CREATESTUCT cs 's style in PreCreateWindow
function in CDrawerView. And tried to replace default function
OnHVScroll. It just does not work. Can someone help me, please!!!

Thanks a lot.
 
M

Mike Wahler

maggie said:
Hi, All

I am drawing pictures using "polyline" and "Arc" functions. I opened a
new MFC application, and modified the OnDraw function in CDrawerView.
The OnDraw function read data from files and draw lines and arcs
according to the data.
but the datafile is big, so the lines and arcs can not be displayed in
one window. I need scroll the window. I am stuck on making the window
scrollable.
I tried to change the CREATESTUCT cs 's style in PreCreateWindow
function in CDrawerView. And tried to replace default function
OnHVScroll. It just does not work. Can someone help me, please!!!

This newsgroup is only for discussion of the ISO standard C++
language. Windows, MFC, etc. are not topical here.

Ask about MFC at newsgroup:
microsoft.public.vc.mfc

If your news provider doesn't supply this group, you get
view it on Microsoft's public news server: msnews.microsoft.com

Purpose of comp.lang.c++:
http://www.slack.net/~shiva/welcome.txt

-Mike
 
R

Raymond Martineau

Hi, All

I am drawing pictures using "polyline" and "Arc" functions. I opened a
new MFC application, and modified the OnDraw function in CDrawerView.
The OnDraw function read data from files and draw lines and arcs
according to the data.

You won't get much help for system-specific issues here. You might want to
try the following newsgroups:

MS/Windows: Mice, DLLs, hardware
MS 32-bit API
but the datafile is big, so the lines and arcs can not be displayed in
one window. I need scroll the window. I am stuck on making the window
scrollable.
I tried to change the CREATESTUCT cs 's style in PreCreateWindow
function in CDrawerView. And tried to replace default function
OnHVScroll. It just does not work. Can someone help me, please!!!

When you post on the two newsgroups listed, you should also include a small
bit of code to help people diagnose the problem. Even if I am familiar
with windows, I wouldn't be sure what the context would be, and might give
generic scrolling code that is not efficient on an MFC application.

But in any case, I normally put WS_VSCROLL in the .style field for the
CREATESTRUCT and let the callback procedure handle the WM_VSCROLL function.
From there, I'd have the painting region set the Window and Viewport
mappings before redrawing the invalidated region.
 
M

maggie

Thank you for your kind suggestion though before I read your reply,
posted another one. :8)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top