• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

Screen size...

How do I set a window to it's maximal size during startup, and how do I create a frame that does not have a border nor a title bar?

Is there some way to get the screen resolution without using DirectDraw?
0
lar_jens
Asked:
lar_jens
  • 6
  • 4
  • 2
1 Solution
 
syedhsCommented:
During design time, you can set the property Startup of the form to Maximized. You will find other option such as Normal or Minimize. Actually i dont remember exactly the what property is it but it is Startup *something*..
Reply back if you cannot find the property.  Again, for the frame doesnt hava border nor title bar, set the Border property to none and for not having title bar.. there is another property also which i believe is Frame (again reply if you cannot find).. set it to none (you can also set to dialog, toolwindow)

Screen resolution:

width : screen.Width (will return in twips)
height: screen.height (twips)
0
 
syedhsCommented:
Opss sorry..
i thought it was for visual basic..
now it is mfc..
i have got to get my MSDN back..
sorry
0
 
lar_jensAuthor Commented:
Thats OK, I will await some other answer. Please get back 2 me if you figger it out, OK?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Vinayak KumbarSr Program ManagerCommented:
Hi,

I assume that it is SDI. Do the following
In mainframe.cpp at the end of OnCreate() before return put the following code
this->ShowWindow(SW_MAXIMIZE);
this->SetTimer(1, 20, NULL);

Then map the WM_TIMER message to the mainframe class and the code will look like
void CMainFrame::OnTimer(UINT nIDEvent)
{
    this->ModifyStyle( WS_CAPTION, 0, SWP_FRAMECHANGED );
      this->KillTimer(1);
      CFrameWnd::OnTimer(nIDEvent);
}

That will give u the window without title and it will maximised initially.

Hope this helps.
VinExpert
0
 
lar_jensAuthor Commented:
Thats OK, I will await some other answer. Please get back 2 me if you figger it out, OK?
0
 
Vinayak KumbarSr Program ManagerCommented:
Hi,

I forgot,

To get resolution, try using GetSystemMetrics(), with
SM_CXSCREEN and SM_CYSCREEN.

Try it out.
VinExpert
0
 
Vinayak KumbarSr Program ManagerCommented:
Hi,

I forgot,

To get resolution, try using GetSystemMetrics(), with
SM_CXSCREEN and SM_CYSCREEN.

Try it out.
VinExpert
0
 
Vinayak KumbarSr Program ManagerCommented:

Rejected without any comments?....

VinExpert
0
 
lar_jensAuthor Commented:
Look, I'm sorry.. I only rejected the VB answer.. I'm still trying out your proposal.. =)

Hang on in there..
0
 
lar_jensAuthor Commented:
Thank you...

It works all right.. =)
0
 
Vinayak KumbarSr Program ManagerCommented:
HI,

Ok. If u face any probs, tell me.

VinExpert
0
 
Vinayak KumbarSr Program ManagerCommented:
HI,

Ok. If u face any probs, tell me.

VinExpert
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 6
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now