Domanda

I have an MFC application which is used frequently and works well, it has become an important part of client work and downtime is not at all tolerable. Problem is that there is change in hardware and old monitors are replaced by LCD monitors so MFC application which is not fitting into size of all monitors, is there a way where in I can simply change MFC settings and recompile without much code change as that will trigger a lengthy test-fix-test cycle.

I would be happy to use a third party tools which would act as an container to this MFC application needing fixed resolution and give me scroll-bars like virtual monitor

Thanks

È stato utile?

Soluzione

Two ideas without code change:

1) Just set the resolution of the desktop to another value, such that it's the same as on older monitors.

2) Change the font size in the dialog resources. This will change the size of the whole dialog.

With code change:

1) Use CDC::SetWorldTransform(const XFORM& rXform) to scale the CDC before you paint onto the CDC.

2) Use CDC::SetViewportExt(..), enable the scrollbars in CreateWindow(..), and handle the scroll events by using CDC::SetViewportOrg(..) to move the content of the window.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top