Click here to Skip to main content
15,914,608 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OnKillFocus question Pin
Paolo Messina13-Aug-01 12:04
professionalPaolo Messina13-Aug-01 12:04 
GeneralRe: OnKillFocus question Pin
Bret Faller13-Aug-01 12:05
Bret Faller13-Aug-01 12:05 
GeneralRe: OnKillFocus question Pin
9-Oct-01 6:53
suss9-Oct-01 6:53 
GeneralPorts Pin
John Uhlenbrock13-Aug-01 11:21
John Uhlenbrock13-Aug-01 11:21 
GeneralRe: Ports Pin
<k>Andreas Hoheisel13-Aug-01 21:06
<k>Andreas Hoheisel13-Aug-01 21:06 
GeneralRe: Ports Pin
13-Aug-01 22:50
suss13-Aug-01 22:50 
GeneralCreateProcess -> illegal instruction Pin
13-Aug-01 11:00
suss13-Aug-01 11:00 
GeneralA CWnd in a view... Re-size... Pin
13-Aug-01 11:00
suss13-Aug-01 11:00 
Hi,
in a simple application using Document/View Architecture:

In My view I have a CWnd Item, I use it to create a very special control, it work very well.

so you can see theses lines in my view definition (.h)

class CBoopView : public CView
{
[.....] //some stuff
public:
CMYSpecialControl MyControl;
[.....] //other stuff
};


//then in the cpp file i create the control itself that way
int CBoopView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
CRect MyRect(10,10,200,30);

if (CView::OnCreate(lpCreateStruct) == -1)
return -1;

//for sure MyControl.Create is an override to simplify his creation
MyControl.Create(MyRect,this,1);
MyControl.ShowWindow(SW_SHOWNORMAL);

return 0;
}

in the CMYSpecialControl, derived from CWnd you can find this override on
the create function

BOOL CGraphScroll::Create(const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
return CWnd::Create(NULL,
_T(""),
WS_CHILD,
rect,
pParentWnd,
nID,
pContext);
}

Now the problem is:
MoveWindow(...) and SetWindowPos(...) did'nt work!! My special control is a CWnd so i'm supposed to be able to replace it anywhere in the parent frame(my view) but it didn't work.

I've try a lot of thing.
who control the client area of my control? his parent(My View)? himself?

It's hard to find the exact way you must create a child window in a view and how deal whit it....


thanks for help or anything who can help me to find the solution



Remi Morin
Remi.Morin@Lyrtech.com

GeneralRe: A CWnd in a view... Re-size... Pin
Paolo Messina13-Aug-01 11:54
professionalPaolo Messina13-Aug-01 11:54 
GeneralRe: A CWnd in a view... Re-size... Pin
14-Aug-01 3:39
suss14-Aug-01 3:39 
GeneralRe: A CWnd in a view... Re-size... Pin
14-Aug-01 4:16
suss14-Aug-01 4:16 
GeneralHTTP Connection question... Pin
Cabadam13-Aug-01 10:31
Cabadam13-Aug-01 10:31 
GeneralRe: HTTP Connection question... Pin
14-Aug-01 4:46
suss14-Aug-01 4:46 
GeneralRe: HTTP Connection question... Pin
Cabadam15-Aug-01 4:47
Cabadam15-Aug-01 4:47 
GeneralClassy question Pin
otvac13-Aug-01 9:47
otvac13-Aug-01 9:47 
GeneralRe: Classy question Pin
Chris Losinger13-Aug-01 10:02
professionalChris Losinger13-Aug-01 10:02 
QuestionWhat to distribute with the final program build? Pin
13-Aug-01 9:00
suss13-Aug-01 9:00 
AnswerRe: What to distribute with the final program build? Pin
Gregg Carlstrom13-Aug-01 9:06
Gregg Carlstrom13-Aug-01 9:06 
AnswerRe: What to distribute with the final program build? Pin
Kuniva13-Aug-01 20:45
Kuniva13-Aug-01 20:45 
GeneralError in GetFieldValue() Pin
Tomas13-Aug-01 8:17
Tomas13-Aug-01 8:17 
GeneralRe: Error in GetFieldValue() Pin
Bret Faller13-Aug-01 8:33
Bret Faller13-Aug-01 8:33 
GeneralRe: Error in GetFieldValue() Pin
Tomas13-Aug-01 8:54
Tomas13-Aug-01 8:54 
GeneralRe: Error in GetFieldValue() Pin
Bret Faller13-Aug-01 9:02
Bret Faller13-Aug-01 9:02 
GeneralRe: Error in GetFieldValue() Pin
Tomas13-Aug-01 9:20
Tomas13-Aug-01 9:20 
GeneralRe: Error in GetFieldValue() Pin
Bret Faller13-Aug-01 11:04
Bret Faller13-Aug-01 11:04 

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.