Click here to Skip to main content
15,912,977 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Disabled a MFC control Pin
Juan Antonio Bermejo11-Nov-03 22:45
Juan Antonio Bermejo11-Nov-03 22:45 
GeneralError in COmpilation of VC++ Code Pin
RaajaOfSelf11-Nov-03 22:32
RaajaOfSelf11-Nov-03 22:32 
GeneralRe: Error in COmpilation of VC++ Code Pin
François Gasnier12-Nov-03 1:26
François Gasnier12-Nov-03 1:26 
GeneralRe: Error in COmpilation of VC++ Code Pin
Rajesh match12-Nov-03 2:13
Rajesh match12-Nov-03 2:13 
GeneralHarddisk Number Pin
BoudewijnEctor11-Nov-03 22:32
BoudewijnEctor11-Nov-03 22:32 
GeneralRe: Harddisk Number Pin
Elias Bachaalany11-Nov-03 22:41
Elias Bachaalany11-Nov-03 22:41 
GeneralAdjusting setup projects Pin
BoudewijnEctor11-Nov-03 22:16
BoudewijnEctor11-Nov-03 22:16 
Generalextend treectrl Pin
locutusenterprises11-Nov-03 21:34
locutusenterprises11-Nov-03 21:34 
Hi all I am trying to extend a treectrl to add a preview window and button on the bottom of it. It has been subclassed and I have overridden the onPaint WM_MESSAGE where I have drawn... here is a code snippet that better explains what I have done.

void MyTreeCtrl::OnPaint()
{
CPaintDC dc(this); // device context for painting
CRect rc;

// First let the control do its default drawing.
CWnd::DefWindowProc( WM_PAINT, (WPARAM)dc.m_hDC, 0 );

GetClientRect(&rc);
rc.top = rc.bottom-30;
dc.FrameRect(rc,&CBrush( RGB(0,0,0)));
rc.left = rc.right - ::GetSystemMetrics(SM_CXHSCROLL);
dc.DrawFrameControl(rc, DFC_SCROLL, DFCS_SCROLLRIGHT);
}

This draws the preview window and the button at the bottom but inside the client area and leaves artifacts when items are expanded etc. I am trying to get something similar to this.

_____
| |
| |
-----
| |>|
-----

where the top is the actual treelist and the bottom is a preview window (showing a bitmap) and a button to call another dialog box.

Thanks in advance.
GeneralRe: extend treectrl Pin
Roger Allen12-Nov-03 2:15
Roger Allen12-Nov-03 2:15 
GeneralRe: extend treectrl Pin
locutusenterprises12-Nov-03 20:59
locutusenterprises12-Nov-03 20:59 
GeneralRe: Detect number of com port in the system Pin
yklim11-Nov-03 21:23
yklim11-Nov-03 21:23 
GeneralRe: Detect number of com port in the system Pin
soltari_knight11-Nov-03 22:21
soltari_knight11-Nov-03 22:21 
GeneralRe: Detect number of com port in the system Pin
soltari_knight11-Nov-03 22:23
soltari_knight11-Nov-03 22:23 
GeneralRe: Detect number of com port in the system Pin
Abhishek Srivastava11-Nov-03 22:25
Abhishek Srivastava11-Nov-03 22:25 
Generallistview control Pin
vhunghl11-Nov-03 20:55
vhunghl11-Nov-03 20:55 
GeneralRe: listview control Pin
Johnny ²11-Nov-03 21:34
Johnny ²11-Nov-03 21:34 
GeneralRe: listview control Pin
vhunghl14-Nov-03 20:40
vhunghl14-Nov-03 20:40 
GeneralA Challenge Pin
styve11-Nov-03 20:40
styve11-Nov-03 20:40 
GeneralDoubt in GDI Pin
P. Gnana Prakash11-Nov-03 19:56
P. Gnana Prakash11-Nov-03 19:56 
GeneralRe: Doubt in GDI Pin
Roger Allen12-Nov-03 2:20
Roger Allen12-Nov-03 2:20 
GeneralStacked Dialog Pin
Sakusys11-Nov-03 19:09
Sakusys11-Nov-03 19:09 
GeneralRe: Memory leak in srand, rand Pin
Joe Woodbury11-Nov-03 18:53
professionalJoe Woodbury11-Nov-03 18:53 
GeneralChange String Table ID Pin
vancouver77711-Nov-03 15:38
vancouver77711-Nov-03 15:38 
GeneralRe: Change String Table ID Pin
Dave Bryant11-Nov-03 16:16
Dave Bryant11-Nov-03 16:16 
GeneralRe: Change String Table ID Pin
vancouver77711-Nov-03 16:24
vancouver77711-Nov-03 16:24 

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.