Click here to Skip to main content
15,898,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Detect user's language for user interface Pin
Nemanja Trifunovic14-Apr-08 8:21
Nemanja Trifunovic14-Apr-08 8:21 
GeneralRe: Detect user's language for user interface Pin
Moak14-Apr-08 8:38
Moak14-Apr-08 8:38 
GeneralRe: Detect user's language for user interface Pin
Nemanja Trifunovic14-Apr-08 9:29
Nemanja Trifunovic14-Apr-08 9:29 
GeneralRe: Detect user's language for user interface Pin
Randor 14-Apr-08 8:05
professional Randor 14-Apr-08 8:05 
GeneralRe: Detect user's language for user interface Pin
Nemanja Trifunovic14-Apr-08 8:31
Nemanja Trifunovic14-Apr-08 8:31 
GeneralRe: Detect user's language for user interface Pin
Randor 14-Apr-08 9:00
professional Randor 14-Apr-08 9:00 
GeneralRe: Detect user's language for user interface Pin
Randor 14-Apr-08 9:02
professional Randor 14-Apr-08 9:02 
GeneralProblem customizing tree control [modified] Pin
Jim Crafton14-Apr-08 4:31
Jim Crafton14-Apr-08 4:31 
I had wanted to customize the tree control by adding a header. I wanted to do the same thing the list view control does and simply add the header as a child of the tree wnd at the top of it's client rect. I got this to work OK, but when it paints it of course covers the first item of the tree ctrl. No problem I thought, I'll just override the WM_PAINT and use SetViewportOrgEx and shift the HDC's y origin up by the height of the header. That seemed to work OK. But when I clicked on an item, things would not get drawn correctly. It's as if it got shifted down too much or copied from the wrong point. If a full repaint occured then things looked OK, but if a the paint rect for the WM_PAINT was a partial, then there seemed to be nothing I could do to get it to paint correctly.

I overrode the CUSTOM_DRAW callback and verified that the correct items were getting processed. They just don't seem to show up where you would expect them. What am I missing?

Here's the default tree with one item and one child item underneath it:
pic1.PNG[^]

Now if you click on the + to open it up:
pic2.PNG[^] - obviously that's not right! the partial update doesn't seem to get handled correctly.

If you resize the window:
http://www.vcf-online.org/tmp/pic3.PNG[^]


After some experimenting, the problem seems to revolve around the use of the SetViewportOrgEx call. If that is not called, the first item will not show, but the updates will be processed correctly (for example, if you add more items to the tree and try opening/closing them). But if you then adjust the origin with SetViewportOrgEx then the painting gets screwed up.

Note: I have NOT solved this problem - at the moment I'm completely stumped as to why it doesn't work right and what I can do to fix it.

¡El diablo está en mis pantalones! ¡Mire, mire!

Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!

SELECT * FROM User WHERE Clue > 0
0 rows returned

Save an Orange - Use the VCF!
VCF Blog

modified on Monday, April 14, 2008 11:16 AM

GeneralRe: Problem customizing tree control Pin
enhzflep14-Apr-08 5:02
enhzflep14-Apr-08 5:02 
GeneralRe: Problem customizing tree control Pin
Jim Crafton14-Apr-08 5:08
Jim Crafton14-Apr-08 5:08 
GeneralRe: Problem customizing tree control Pin
Jim Crafton14-Apr-08 5:11
Jim Crafton14-Apr-08 5:11 
GeneralRe: Problem customizing tree control [modified] Pin
enhzflep14-Apr-08 5:49
enhzflep14-Apr-08 5:49 
GeneralFind All Window Pin
john563214-Apr-08 3:52
john563214-Apr-08 3:52 
GeneralRe: Find All Window Pin
JudyL_MD14-Apr-08 4:10
JudyL_MD14-Apr-08 4:10 
GeneralRe: Find All Window Pin
john563214-Apr-08 4:14
john563214-Apr-08 4:14 
GeneralRe: Find All Window Pin
JudyL_MD14-Apr-08 4:28
JudyL_MD14-Apr-08 4:28 
QuestionRe: Find All Window Pin
David Crow14-Apr-08 4:13
David Crow14-Apr-08 4:13 
QuestionFont/FontSize Pin
C++NewBe14-Apr-08 2:34
C++NewBe14-Apr-08 2:34 
GeneralRe: Font/FontSize Pin
Cedric Moonen14-Apr-08 2:38
Cedric Moonen14-Apr-08 2:38 
GeneralRe: Font/FontSize Pin
CPallini14-Apr-08 3:27
mveCPallini14-Apr-08 3:27 
QuestionRe: Font/FontSize Pin
David Crow14-Apr-08 3:44
David Crow14-Apr-08 3:44 
GeneralRe: Font/FontSize Pin
C++NewBe14-Apr-08 3:52
C++NewBe14-Apr-08 3:52 
QuestionRe: Font/FontSize Pin
David Crow14-Apr-08 3:56
David Crow14-Apr-08 3:56 
GeneralRe: Font/FontSize Pin
C++NewBe14-Apr-08 4:04
C++NewBe14-Apr-08 4:04 
QuestionRe: Font/FontSize Pin
David Crow14-Apr-08 4:15
David Crow14-Apr-08 4:15 

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.