David's right - you didn;t read my suggestion fully.
I could spell things out a bit more though.
I assume you need a frame to get the floating-ness, or dockaability. Or look at (eg) CControlBar, or CDialogBar.
Rather than just a Frame window, create a child window inside that frame. That child window should be an EDIT window, or a CEdit. ES_READONLY would be applicable then.
I hope that is clearer.
You can;t just use things blindly. If you don't know about ES_READONLY, then you should have looked it up on MSDN. There, it will tell you that it is an edit style. It's at best meaningless when used with another window. At worst, it could do something bad.
I hope that helps?
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[^]
Thanks for the response. I tried using the class CEditView in a small test program and the small test program broke. As I understand it, the class CEditView is part of the Document / View model. The test examples that I have tried with the Document / View model did not seem to work or had issues. I am thinking that to change my code to use CEditView is going to be a major change. Do I have that right?
Do you ever turn the read-only style off? If so, have you considered using a static control instead? What if you disabled the control instead of making it read-only? Have you tried setting the focus to the next control?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Can we append the _RecordsetPtr with another _RecordSetPtr . Suppose my recordset is having data for 2 rows . There are such 3 recordset. Can we create a new recordsetPtr which will be used to traverse through all these recordsets...is it possible..??
Thanks in advance..
I'm working on an MFC application. For reasons I cannot fathom, there seems to be a problem with inconsistent display of the icons of an icon style CListCtrl between versions of Windows (XP and Vista). On Vista, one of the icons (Debtor statement) is omitted. This only occurs sometimes. When it actually occurs varies from build to build of the application, where changes between builds ought to have no bearing on this at all.
Why might this be? How can the problem be fixed? Here is the relevant code:
I seem to have isolated the problem somewhat (It still erratically tends to swing between omitting and not omitting the icon between builds, I guess).
By commenting out:
I can make the problem disappear (although I have a new problem, which is that the icons are displayed as one big column). Commenting out anything else of note doesn't have the effect of suppressing the problem, so I guess that's progress.
That seems like a reasonable explanation. I've found that moving the initialisation of the icons into OnIntialUpdate seems to fix the problem, but I'm not overly confident that it hasn't just temporarily concealed the problem.
Where is imgl declared? Is its lifetime longer than the lifetime of the list control?
It's a good idea to always zero-init structs, like LVITEM, so that you aren't accidentally sending garbage data in the members that you don't explicitly set.
Dunder-Mifflin, this is Pam
Last Visit: 31-Dec-99 18:00 Last Update: 23-Sep-23 12:06