|
On x86 platforms the stack contains the following:
- Return addresses.
- Function parameters.
- Local variables.
- Registers pushed on the stack (and later popped to restore them).
- SEH information.
Steve
|
|
|
|
|
good morning
CTreeEditorView is a CView in which we create the treeView
To let the tree control occupy all the space of the client area :
void CTreeEditorView::OnSize(UINT nType, int cx, int cy)
{
CRect r;
GetClientRect(&r);
m_etc.MoveWindow(r);
}
but if I want that it occupied the left side of the client area how this code must be modified
|
|
|
|
|
adjust the rect members to better define an area you want the tree view to be displayed
|
|
|
|
|
You can set location of treeview with MoveWindow and new size now what problem?
|
|
|
|
|
I tried this but it doesn't work
CRect r(20,20,120,120);
GetClientRect(&r);
m_etc.MoveWindow(r);
|
|
|
|
|
No its not true when you use GetClientRect it gets coordinate and fill a RECT structure but when you want to use new rect like your message you dont need to use GetClientRect.
<br />
CRect r(20,20,120,120); <br />
m_etc.MoveWindow(r);
|
|
|
|
|
Hi all,
I would like to create single document interface something like notepad. Now my problem is i created the basic display. but in the display i couldnt see the cursor and if i enter anything in the keyboard, the display will not show that character.
Can you please tell me some ideas or refer me some articles?
Thanks in advance.
Regards,
Ram
|
|
|
|
|
Ram Murali wrote: Now my problem is i created the basic display
Did you create an Edit/Richedit control on your window?
Ram Murali wrote: the display will not show that character.
It's the window of the application that you create.
You would need a richedit control or an edit box to start typing the text as we do it in notepad.
Here's the code for you:
In your Window Procedure you can create two variables as follows:
<br />
static HWND hWndEdit;<br />
static POINT pt;<br />
In the WM_CREATE message:OnCreate() of SDI Application.
<br />
hWndEdit =CreateWindow("EDIT","",WS_CHILD|WS_VISIBLE|WS_BORDER,<br />
0,0,pt.x,pt.y,m_hWnd,NULL,<br />
GetModuleHandle(NULL),0);<br />
in WM_SIZE: (OnSize() of the SDI Application)
<br />
pt.x=LOWORD(lParam);
pt.y =HIWORD(lParam);
MoveWindow (hWndEdit,0,0,pt.x,pt.y,true);<br />
This is for WIN32 application. You can apply the same logic for MFC Application.
And now you can compile and run the application and type something in the window that we just created.
I hope this helps.
-- modified at 4:24 Thursday 28th September, 2006
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I didnt create anything. I jus followed the MFC wizard to create a single document interface. thatsall. after that i didnt do anything. the output of my design is same as NOTEPAD, But i dont get the blinking cursor and if i press any key in the keyboard, its not displayed in the Notepad text area.
( I am trying to create a application same as notepad in window).
Regards,
Ram
|
|
|
|
|
I have provided a basic logic. You can build on this. You can also take a rich edit control instead of the edit window as I do.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Sorry, I dont find any link or information in your previous post.
Regards,
Ram
|
|
|
|
|
Ram Murali wrote: Sorry, I dont find any link or information in your previous post.
Can't you see the code in my first post to this thread. See the post that I have modified.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
ya, sorry i saw ur code snippet and trying to execute it. But got so many errors. i am trying to debug it. anyway thanx for ur help.
Regards,
Ram
|
|
|
|
|
May i know what is this lparam in the code?
the compiler showing error on lparam as a undefined identifier.
thanks.
Regards,
Ram
|
|
|
|
|
Ram Murali wrote: the compiler showing error on lparam as a undefined identifier.
instead of (LOWORD)lParam ; //use cx
instead of (HIWORD)lParam ; //use cy
Sorry to say but even you should give it a try to sort these kind of errors. I already have modified my post to say this that what you need to place instead of the above two lines....
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
sorry to disturb u again. after i change and execute it again i got this error.
error C2661: 'MoveWindow' : no overloaded function takes 6 parameters
may i noe wats this?
Regards,
Ram
|
|
|
|
|
Ram Murali wrote: 'MoveWindow' : no overloaded function takes 6 parameters
Use ::MoveWindow(/*parameter's go here*/);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Wowwwwwwwww thats gr8. its working perfectly now. thanx a lot for ur help.
Regards,
Ram
|
|
|
|
|
I think that you can find a good example on MSDN examples(Im not sure but I think its in VC6.0)
|
|
|
|
|
But that gives me an error
'Use' : is not a class or namespace name
|
|
|
|
|
waldermort wrote: But that gives me an error
:->That's just great....
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
you can use without use
|
|
|
|
|
Ram Murali wrote: Sorry, I dont find any link or information in your previous post.
Perhaps you should read his post again. Unless my eyes are deceiving me he gave you some example code for what you needed to do, aswell as advice on things you can do.
|
|
|
|
|
in the wizard, did you select the CEDitView as the view ? or did you simply kept the defaut CView ?
|
|
|
|
|
What class did you derive your view from?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|