Click here to Skip to main content
16,005,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Header File required Pin
Henry miller21-Sep-04 3:31
Henry miller21-Sep-04 3:31 
GeneralProblem with a IDirectDraw object! Pin
Dani10000121-Sep-04 1:48
Dani10000121-Sep-04 1:48 
GeneralRe: Problem with a IDirectDraw object! Pin
Alexander M.,21-Sep-04 3:12
Alexander M.,21-Sep-04 3:12 
GeneralRe: Problem with a IDirectDraw object! Pin
Dani10000121-Sep-04 3:29
Dani10000121-Sep-04 3:29 
GeneralDisabling the minimize / Maximize button Pin
Sujan Christo21-Sep-04 1:41
Sujan Christo21-Sep-04 1:41 
GeneralRe: Disabling the minimize / Maximize button Pin
David Crow21-Sep-04 2:59
David Crow21-Sep-04 2:59 
GeneralA bug with CListCtrl? Or am I being stupid... Pin
m_dale21-Sep-04 1:28
m_dale21-Sep-04 1:28 
GeneralRe: A bug with CListCtrl? Or am I being stupid... Pin
RChin21-Sep-04 4:43
RChin21-Sep-04 4:43 
m_dale wrote:
Would you agree that bit of code should set the text color for each row in the report based on the return value of the COLORREF function?

Well..no! The SetTextColor() / SetBkColor() functions applies to the entire control, not just to an individual item within.
If you require individual control over the color and/or fonts used by row and column then have a look at Custom Drawing techniques. This[^] is a good starting article.

m_dale wrote:
Just to prove to myself I wasn't going mad and that you CAN use settextcolor for individual entries in the list, I added a button which, when clicked, inserts an item into the list in green. It works fine (and the rest of the list stays in the color it was).

Beats meSigh | :sigh: This should not happen, but see below:

m_dale wrote:
I had the app open on one monitor while stepping through it on the other, and the list control only shows the items once they've all been added.

Makes sense as the drawing routine would not have been called while tracing through your code.

m_dale wrote:
In other words, setting the redraw flag to true should mean the list control updates each time something is inserted. Not so. It appears both of those statements are simply ignored.

Although I cannot be sure, I would guess that while you are in debugging mode, the usual process of pumping and processing the usual windows messages (that are responsible for your control window updates), are in stasis; therefore you cannot expect normal window actions to be performed while this is happening.

m_dale wrote:
Only once have I been able to get it to do what I want, under very specific conditions. If:
* I call myList.SetColumnWidth(someCol, LVSCW_AUTOSIZE);
and
* The data width in someCol requires the column to be resized

THEN it will work.
Obviously this is useless, as it requires each entry in someCol to be longer than the last in order to get the desired effect.


As I said above, once the window has been allowed to process its usual messages, then you will get the results you expect, but while tracing through your frozen program, one line at a time, this is expected.





I Dream of Absolute Zero

GeneralRe: A bug with CListCtrl? Or am I being stupid... Pin
m_dale22-Sep-04 0:31
m_dale22-Sep-04 0:31 
GeneralGDI+ Pin
FridaVega21-Sep-04 1:10
FridaVega21-Sep-04 1:10 
GeneralMFC ISAPI Redirection Filter Problem Pin
raed21-Sep-04 0:51
raed21-Sep-04 0:51 
GeneralDetect Modem Connection Pin
ftosteve21-Sep-04 0:44
ftosteve21-Sep-04 0:44 
GeneralRe: Detect Modem Connection Pin
vcplusplus21-Sep-04 1:55
vcplusplus21-Sep-04 1:55 
GeneralRe: Detect Modem Connection Pin
ftosteve21-Sep-04 4:07
ftosteve21-Sep-04 4:07 
GeneralDisable Network Adapter Pin
ftosteve21-Sep-04 0:42
ftosteve21-Sep-04 0:42 
GeneralRe: Disable Network Adapter Pin
ThatsAlok7-May-05 0:42
ThatsAlok7-May-05 0:42 
Generalactivex events in a dll Pin
macmac3821-Sep-04 0:10
macmac3821-Sep-04 0:10 
Generalinpout32.dll expert help needed Pin
JBMW20-Sep-04 23:35
JBMW20-Sep-04 23:35 
GeneralTreeView in a virtual CListCtrl Pin
H0nger20-Sep-04 23:28
H0nger20-Sep-04 23:28 
GeneralASCII to HEX conversion Pin
wendy_wong20-Sep-04 23:02
wendy_wong20-Sep-04 23:02 
GeneralRe: ASCII to HEX conversion Pin
RChin21-Sep-04 0:18
RChin21-Sep-04 0:18 
GeneralRe: ASCII to HEX conversion Pin
David Crow21-Sep-04 2:54
David Crow21-Sep-04 2:54 
GeneralRe: ASCII to HEX conversion Pin
wendy_wong21-Sep-04 14:15
wendy_wong21-Sep-04 14:15 
GeneralPath of Application Pin
Neelesh K J Jain20-Sep-04 22:56
Neelesh K J Jain20-Sep-04 22:56 
GeneralRe: Path of Application Pin
Graham Bradshaw20-Sep-04 23:01
Graham Bradshaw20-Sep-04 23:01 

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.