Click here to Skip to main content
15,890,506 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: in dialog dll because of App class instance application being crashed Pin
Code-o-mat4-Apr-12 21:31
Code-o-mat4-Apr-12 21:31 
GeneralRe: in dialog dll because of App class instance application being crashed Pin
appollosputnik5-Apr-12 0:31
appollosputnik5-Apr-12 0:31 
GeneralRe: in dialog dll because of App class instance application being crashed Pin
Code-o-mat5-Apr-12 0:49
Code-o-mat5-Apr-12 0:49 
AnswerRe: in dialog dll because of App class instance application being crashed Pin
Stephen Hewitt6-Apr-12 1:37
Stephen Hewitt6-Apr-12 1:37 
QuestionTool to identify Controls Pin
john56324-Apr-12 18:29
john56324-Apr-12 18:29 
AnswerRe: Tool to identify Controls Pin
Code-o-mat4-Apr-12 21:16
Code-o-mat4-Apr-12 21:16 
AnswerRe: Tool to identify Controls Pin
yu-jian6-Apr-12 18:22
yu-jian6-Apr-12 18:22 
Questionwin32, Treeview inside tool window Pin
jkirkerx4-Apr-12 11:54
professionaljkirkerx4-Apr-12 11:54 
I made a tool window, and then made a treeview, with the tool window being the parent.
I also have a class, that populates the treeview with folder contents.

How do I access the treeview, to populate it?. What I mean is when I make the treeview in the main window, I can just call the HWND to connect to it, but when the treeview is a child of the tool window, I can't access it.

My goal is to have the treeview a child of the tool window, so they always stay together.

I had trouble creating the tool window successfully for awhile, and then I moved the code below to the main window cpp page. The tool window has it's own WndProc.

// Create the Project Explorer Window
tbProjectExplorer = CreateWindowEx(
	WS_EX_TOOLWINDOW,
	szProjectExplorer_Class,
	TEXT( "Project Explorer" ),
	WS_POPUP | WS_SYSMENU | WS_THICKFRAME | WS_CAPTION | WS_VISIBLE,
	winWidth - tvWidth, 1,
	tvWidth, tvHeight, 
	hWnd, 
	NULL, 
	GetModuleHandle(0),
	NULL
);
ShowWindow( tbProjectExplorer, SW_SHOW);
		
tvProjectExplorer = CreateWindowEx( 
	WS_EX_TRANSPARENT, 
	WC_TREEVIEW,
	TEXT( "Project Explorer" ),
	WS_VISIBLE | WS_CHILD | WS_BORDER | TVS_DISABLEDRAGDROP | TVS_TRACKSELECT | TVS_HASBUTTONS | TVS_EDITLABELS | TVS_SHOWSELALWAYS | TVS_SINGLEEXPAND, 
	0, 0,
	tvWidth, tvHeight, 
	tbProjectExplorer,
	(HMENU) IDM_PROJECT_EXPLORER,
	GetModuleHandle(NULL),
	NULL
);
SendMessage( tvProjectExplorer, WM_SETFONT, (WPARAM) hFont_lbl, FALSE);
ShowWindow( tvProjectExplorer, SW_SHOW);

AnswerNevermind Pin
jkirkerx4-Apr-12 13:08
professionaljkirkerx4-Apr-12 13:08 
GeneralRe: Nevermind Pin
enhzflep4-Apr-12 13:22
enhzflep4-Apr-12 13:22 
GeneralRe: Nevermind Pin
jkirkerx4-Apr-12 15:27
professionaljkirkerx4-Apr-12 15:27 
QuestionSorting CMFCListCtrl on multiple columns Pin
David Crow4-Apr-12 10:53
David Crow4-Apr-12 10:53 
QuestionMemory Leaks Pin
ITISAG4-Apr-12 9:23
ITISAG4-Apr-12 9:23 
QuestionRe: Memory Leaks Pin
David Crow4-Apr-12 10:42
David Crow4-Apr-12 10:42 
AnswerMemory Leaks Pin
ITISAG4-Apr-12 10:48
ITISAG4-Apr-12 10:48 
AnswerRe: Memory Leaks Pin
David Crow4-Apr-12 10:55
David Crow4-Apr-12 10:55 
GeneralMemory Leaks Pin
ITISAG4-Apr-12 10:56
ITISAG4-Apr-12 10:56 
AnswerRe: Memory Leaks Pin
Chuck O'Toole4-Apr-12 14:10
Chuck O'Toole4-Apr-12 14:10 
GeneralMemory Leaks Pin
ITISAG5-Apr-12 3:28
ITISAG5-Apr-12 3:28 
AnswerRe: Memory Leaks Pin
Chris Losinger5-Apr-12 1:10
professionalChris Losinger5-Apr-12 1:10 
GeneralMemory Leaks Pin
ITISAG5-Apr-12 3:27
ITISAG5-Apr-12 3:27 
AnswerRe: Memory Leaks Pin
Iain Clarke, Warrior Programmer8-Apr-12 6:22
Iain Clarke, Warrior Programmer8-Apr-12 6:22 
QuestionBSTR to DWORD ? Pin
MrKBA4-Apr-12 3:28
MrKBA4-Apr-12 3:28 
AnswerRe: BSTR to DWORD ? Pin
Rajesh R Subramanian4-Apr-12 3:48
professionalRajesh R Subramanian4-Apr-12 3:48 
GeneralRe: BSTR to DWORD ? Pin
MrKBA4-Apr-12 3:56
MrKBA4-Apr-12 3:56 

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.