Click here to Skip to main content
15,921,959 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDebugging functions placed in the header file... Pin
Joan M6-Feb-03 5:19
professionalJoan M6-Feb-03 5:19 
GeneralRe: Debugging functions placed in the header file... Pin
Ian Darling6-Feb-03 5:41
Ian Darling6-Feb-03 5:41 
GeneralRe: Debugging functions placed in the header file... Pin
Joan M6-Feb-03 5:51
professionalJoan M6-Feb-03 5:51 
GeneralRe: Debugging functions placed in the header file... Pin
Ian Darling6-Feb-03 6:03
Ian Darling6-Feb-03 6:03 
Generalwhy? Pin
Joan M6-Feb-03 6:17
professionalJoan M6-Feb-03 6:17 
GeneralRe: why? Pin
Joaquín M López Muñoz6-Feb-03 7:12
Joaquín M López Muñoz6-Feb-03 7:12 
GeneralRe: why? Pin
Joan M6-Feb-03 21:25
professionalJoan M6-Feb-03 21:25 
GeneralRe: why? Pin
Joaquín M López Muñoz6-Feb-03 21:30
Joaquín M López Muñoz6-Feb-03 21:30 
GeneralRe: why? Pin
Joan M6-Feb-03 22:03
professionalJoan M6-Feb-03 22:03 
GeneralRe: Debugging functions placed in the header file... Pin
-=jarl=-6-Feb-03 10:13
-=jarl=-6-Feb-03 10:13 
GeneralRe: Debugging functions placed in the header file... Pin
Joan M6-Feb-03 20:16
professionalJoan M6-Feb-03 20:16 
GeneralDoubts printing Pin
doctorpi6-Feb-03 5:18
doctorpi6-Feb-03 5:18 
GeneralRe: Doubts printing Pin
Roger Allen6-Feb-03 5:44
Roger Allen6-Feb-03 5:44 
GeneralSimulating ToolBar Press Pin
Jawache6-Feb-03 4:43
Jawache6-Feb-03 4:43 
GeneralRe: Simulating ToolBar Press Pin
Roger Allen6-Feb-03 5:46
Roger Allen6-Feb-03 5:46 
GeneralRe: Simulating ToolBar Press Pin
Jawache6-Feb-03 5:58
Jawache6-Feb-03 5:58 
Generalprogram too big for mem Pin
stv6-Feb-03 4:29
stv6-Feb-03 4:29 
GeneralRe: program too big for mem Pin
Willem B6-Feb-03 4:33
Willem B6-Feb-03 4:33 
GeneralRe: program too big for mem Pin
AlexO6-Feb-03 4:48
AlexO6-Feb-03 4:48 
GeneralRe: program too big for mem Pin
stv6-Feb-03 17:24
stv6-Feb-03 17:24 
GeneralRe: program too big for mem Pin
Ted Ferenc6-Feb-03 7:46
Ted Ferenc6-Feb-03 7:46 
GeneralEncrypting technique for simple CString Pin
Willem B6-Feb-03 4:29
Willem B6-Feb-03 4:29 
GeneralRe: Encrypting technique for simple CString Pin
Chris Losinger6-Feb-03 5:01
professionalChris Losinger6-Feb-03 5:01 
GeneralRe: Encrypting technique for simple CString Pin
Miguel Ortiz6-Feb-03 8:43
Miguel Ortiz6-Feb-03 8:43 
GeneralCSplitterWnd is evil! Pin
SomeUser6-Feb-03 3:47
SomeUser6-Feb-03 3:47 
Hi
I'm trying to create a CSplitterWnd within a CFrameWnd, but I have some problems with that... or MFC. I'm creating the CFrameWnd by calling the Create function, and passing a NULL to the pContext parameter because i don't know how to fill the CCreateContext with valid data.
But my problems starts in the OnCreateClient of the CFrameWnd, when i'm trying to create the CSplitterWnd.

Doing something like this:

<br />
BOOL CMyFrameWnd::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)<br />
{<br />
 <br />
 <br />
	m_MySplitterWnd.CreateStatic (this, 2, 1);<br />
<br />
  	m_MySplitterWnd.CreateView (0, 0, RUNTIME_CLASS(CMyView), CSize(100,100), pContext);<br />
	m_MySplitterWnd.CreateView (1, 0, RUNTIME_CLASS(CMyView), CSize(100,100), pContext);<br />
  <br />
<br />
	return TRUE;<br />
}<br />


As expected, the pContex is NULL and apparently i'm not allowed to call CreateView and pass NULL to the pContext. CreateView returns FALSE, and after that i'm getting a bunch of assertions and an access violation. So what am i supposed to do to get this to work?

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.