Click here to Skip to main content
16,004,836 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to call matlab using c++ builder Pin
tikoon27-Mar-06 21:47
tikoon27-Mar-06 21:47 
AnswerRe: how to call matlab using c++ builder Pin
Rage28-Mar-06 2:33
professionalRage28-Mar-06 2:33 
QuestionRegarding Menu's Pin
Waldermort27-Mar-06 21:32
Waldermort27-Mar-06 21:32 
AnswerRe: Regarding Menu's Pin
S Douglas27-Mar-06 21:36
professionalS Douglas27-Mar-06 21:36 
GeneralRe: Regarding Menu's Pin
Waldermort27-Mar-06 21:43
Waldermort27-Mar-06 21:43 
GeneralRe: Regarding Menu's Pin
toxcct27-Mar-06 23:08
toxcct27-Mar-06 23:08 
AnswerRe: Regarding Menu's Pin
David Crow28-Mar-06 4:42
David Crow28-Mar-06 4:42 
QuestionBlank rows getting added in CListCtrl Pin
Chioo27-Mar-06 21:21
Chioo27-Mar-06 21:21 
Hi all,

I need your help for a problem.

I am working with an owner-drawn, report view CListCtrl.

In the OnCustomDraw event I am drawing the list. Sometimes 2 blank
rows are getting added at the start. The first row does not take any
event but if I click on second row, actual first row (By actual first
row I mean where I can see the text of first row) gets selected. So I
think, I can't say it as rows. It is a space with height of 2 rows.

To make this clear, let's assume bottom of header is 13 and first row
starts at 15. The height of each row is 15. After debugging I noticed,
1. The whole list is drawn properly.
2. Then, from 15 to 30 blank space is added.
3. Then, form 15 to 45 blank space is added.

That means actual rows start from 45.

I tried to solve this in following ways:
1. Take rectangle of each item by GetItemRect() and then check if any
row is added. If added then change the co-ordinates accordingly. But
this is not making windows understand that the list is shifted.
Finally, for windows rows start from 45 and thats why any clicking is
giving miserable results.

2. Take top-left point using GetItemPostion() and if any row is added
do SetItemPosition(). But SetItemPosition doesn't work for report
view.

3. I am handling CDDS_ITEMPREPAINT | CDDS_SUBITEM event. In this switch block, I just changed background color and textcolor and rows are inserted using InsertItem() and SetItem() while creating the list.
Here I am unable to see list. And in the debug log, I can check first row is starting from 45 i.e. after two blank rows.

4. I am again handling CDDS_ITEMPREPAINT | CDDS_SUBITEM event, but instead of just changing colors I have merged Drawitem() here and then DrawSubItem is called. I have eliminated for loop in DrawItem() and the rectangle passed to DrawSubItem() is taken as GetSubItemRect().
Here again I am getting both above mentioned problem and in addition to that, when subitem index is '0', GetSubItemrect() gives rectangle for whole item.

I am not able to understand whatever approach I take, first row is starting after two blank rows. Even I am not able to see list, I can get its position is log. How can I make understand windows that first rows should start from perticular position? What can I do with this? Frown | :(



Chioo.
AnswerRe: Blank rows getting added in CListCtrl Pin
Rage28-Mar-06 2:37
professionalRage28-Mar-06 2:37 
GeneralRe: Blank rows getting added in CListCtrl Pin
Chioo28-Mar-06 2:49
Chioo28-Mar-06 2:49 
Questiongetting to know stack size at runtime? Pin
T.T.H.27-Mar-06 21:15
T.T.H.27-Mar-06 21:15 
AnswerRe: getting to know stack size at runtime? Pin
David Crow28-Mar-06 4:49
David Crow28-Mar-06 4:49 
GeneralRe: getting to know stack size at runtime? Pin
T.T.H.29-Mar-06 0:53
T.T.H.29-Mar-06 0:53 
QuestionReading Excel files using ODBC Pin
pjmvn27-Mar-06 21:06
pjmvn27-Mar-06 21:06 
AnswerRe: Reading Excel files using ODBC Pin
Wes Aday28-Mar-06 8:12
professionalWes Aday28-Mar-06 8:12 
GeneralRe: Reading Excel files using ODBC Pin
pjmvn28-Mar-06 13:42
pjmvn28-Mar-06 13:42 
Questiondisplaying bitmaps Pin
Amr Shahin27-Mar-06 20:49
Amr Shahin27-Mar-06 20:49 
AnswerRe: displaying bitmaps Pin
Hamid_RT27-Mar-06 21:04
Hamid_RT27-Mar-06 21:04 
AnswerRe: displaying bitmaps Pin
Ștefan-Mihai MOGA28-Mar-06 1:16
professionalȘtefan-Mihai MOGA28-Mar-06 1:16 
GeneralRe: displaying bitmaps Pin
Amr Shahin29-Mar-06 1:31
Amr Shahin29-Mar-06 1:31 
GeneralRe: displaying bitmaps Pin
Ștefan-Mihai MOGA1-Apr-06 4:55
professionalȘtefan-Mihai MOGA1-Apr-06 4:55 
QuestionA very big problem Pin
Waldermort27-Mar-06 20:25
Waldermort27-Mar-06 20:25 
AnswerRe: A very big problem Pin
lastgen27-Mar-06 20:34
lastgen27-Mar-06 20:34 
AnswerRe: A very big problem Pin
lastgen27-Mar-06 20:35
lastgen27-Mar-06 20:35 
AnswerRe: A very big problem Pin
lastgen27-Mar-06 20:37
lastgen27-Mar-06 20:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.