Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Resize CListCtrl while dialog resizing

Posted on 2003-03-18
Medium Priority
Last Modified: 2013-11-20
I create a dialog based project. And I want to resize a CListCtrl while the dialog resizing. If the CListCtrl has LVS_OWNERDRAWFIXED style, the height of each CListCtrl row will become very big when dialog resize. But if it doesn't have LVS_OWNERDRAWFIXED style, resize will be properly. I want to know why this will happen? LVS_OWNERDRAWFIXED style will have this phenomenon or maybe my code has problem?

My project my need LVS_OWNERDRAWFIXED CListCtrl style, because I want to draw things in cells.

Question by:wjm9430
  • 2

Author Comment

ID: 8163826
This problem is because of CListCtrl style or drawcell problem?
LVL 48

Accepted Solution

AlexFM earned 225 total points
ID: 8164426
The problem is possibly in WM_DRAWITEM message handler.
LVS_OWNERDRAWFIXED means that the list view control sends a WM_DRAWITEM message to paint each item; it does not send separate messages for each subitem.
LVL 31

Expert Comment

ID: 8164749
Could you paste the code of your WM_DRAWITEM message handler?

Author Comment

ID: 8172128
I get it.
Thanks a lot!

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question