|
-
April 20th, 1999, 05:42 AM
#1
SetWindowText
I have a window which is an SDI. I want to set the title using SetWindowText("Test"); in the view of the project. I tried giving this in the constructor of the View. It is giving me a GPF. Please suggest me a solution to this problem.
Thank you
Savitha.
Savitha.
-
April 21st, 1999, 12:46 AM
#2
Re: SetWindowText
Hi Savitha,
Try to use SetWindowText() in OnDraw() function of the view window.
Regards,
Kanwardeep
-
April 21st, 1999, 06:56 AM
#3
Problems with the solution that you provided
Hi. Kanwardeep.I tried calling SetWindowText() from OnDraw(). It looked like SetWindowText("Test App"); I did not provide the handle to the main window. Will it recoginze that the title of the main window has to be changed or else should i provide some handle/object along with the SetWindowText(). The solution provided did not work. .Please clarify this doubt.
Thankyou.
Savitha.
-
April 21st, 1999, 01:49 PM
#4
Re: Problems with the solution that you provided
Hi, you can call GetDocument()->SetTitle() in your view's OnDraw() function.
-
April 21st, 1999, 02:19 PM
#5
Re: SetWindowText
in the OnDraw()
call this it will work out... for sure.. i used it....
pDoc->SetTitle("Savitha");
feel free to contact me
at
[email protected]
-
April 30th, 1999, 06:38 AM
#6
Re: SetWindowText
Hi Savitha,
you can use GetDocument()->SetTitle("Title"); in OnInitialUpdate() message handler of View class.
When creating new document it is like this :
CDocument m-pCliDoc = NULL;
m_pCliDoc = pDocTemplateCli->OpenDocumentFile( NULL, TRUE);
if(m_pClidoc)
m_pCliDoc->SetTitle("TestTitle");
Bye,
Dinesh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|