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?
LVL 1
lar_jensAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.