简体   繁体   中英

Make a CStatic not scrollable MFC

I have an MFC dialog class inheriting from another one already having a scroll implementation.

In this class I'm displaying several CStatics and would like to know if it would be possible to "freeze" one or make it unscrollable.

I have already tried making a child window of the first one so I could create a CStatic in it with no scroll but it's not really what I'm looking for, I need to do it on the same dialog.

Please check if your CStatic controls have WS_HSCROLL or WS_VSCROLL styles. You can see those styles with Spy++ tool.

If they are there, simply removing them will do the job.

If they are not (some custom scrolling implementation?), we would need more details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM