Run full size window application

How should I set an MFC application to run on full size window (as
maximized) when application does start?
I tried to set as a predefined size on MainFrm, in PreCreateWindow()
but does not doing what I need (e.g.
::SetWindowPos(m_hWnd,HWND_TOP,x1,y1,x2,y2,NULL);

Thanks,
Chris
0
chris5558 (6)
7/12/2004 2:12:07 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
789 Views

Similar Articles

[PageSpeed] 28

On Mon, 12 Jul 2004 10:12:07 -0400, Chris <chris@ca.ca> wrote:

>How should I set an MFC application to run on full size window (as
>maximized) when application does start?
>I tried to set as a predefined size on MainFrm, in PreCreateWindow()
>but does not doing what I need (e.g.
>::SetWindowPos(m_hWnd,HWND_TOP,x1,y1,x2,y2,NULL);
>
>Thanks,
>Chris
pMainFrame->ShowWindow(SW_MAXIMIZE)
0
chris5558 (6)
7/12/2004 2:24:51 PM
"Chris" <chris@ca.ca> skrev i meddelandet
news:4p75f0pei6e550qf2skqj2o0ghnlg0hac8@4ax.com...
> On Mon, 12 Jul 2004 10:12:07 -0400, Chris <chris@ca.ca> wrote:
>
> >How should I set an MFC application to run on full size window (as
> >maximized) when application does start?
> >I tried to set as a predefined size on MainFrm, in PreCreateWindow()
> >but does not doing what I need (e.g.
> >::SetWindowPos(m_hWnd,HWND_TOP,x1,y1,x2,y2,NULL);
> >
> >Thanks,
> >Chris
> pMainFrame->ShowWindow(SW_MAXIMIZE)


You should also consider if this is *always* appropriate for your app.

What if some users have HUGE screens, or several?


Bo Persson


0
bop (114)
7/12/2004 5:04:16 PM
To set it without any code, you can do so in the advanced tab when creating
your MFC app in the wizard.  It is the 4th step in the MFC(.exe) app wizard.

Select it and it gives you several options as to how the app runs.

Venn


0
venn_syii (5)
7/12/2004 9:29:38 PM
Reply:

Similar Artilces:

Second window for second excel file
How to open second excel fine in seperate window Hi goto 'Tools - Options - View' and check 'Windows in taskbar' -- Regards Frank Kabel Frankfurt, Germany Murthy wrote: > How to open second excel fine in seperate window ...

Moving mailboxes to a new exchange server; size limit.
We currently have one exchange server in our company. We saw the need for another one so we created a new exchange server and added it to our current forest. <h3>We are trying to move mailboxes from the old exchange server to the new one. Some of the mailboxes we are moving are over 2GB's, the question will there be any problems doing this?</h3> it will take some time, but if there are no limits on either server, prohibiting send or send/receive, you should be able to move the mailboxes... -- Susan Conkey [MVP] "Heber" <Heber@discussions.microsoft.com&g...

reducing file size
In an excel file, I just deleted a picture. When saving the fil again, I noticed that the file size grew instead of being reduced. Does anyway know if excel "save" things you delete, and if so how can you permantly delete things to reduce file size? Your used range has probalby gotten messed up. Look for any sheet where the scroll bars take you well past the end of the data. Hitting Ctrl + End on these sheets will also take you out the the data range. Here is a link on fixing the used range. http://www.contextures.com/xlfaqApp.html#Unused -- HTH... Jim Thomlins...

WINDOWS 7 NEWSGROUP(s) IS/ARE HERE
Where is 'Windows7" Newsgroup? This question is being asked here (on microsoft.public.windows.vista.general): methodically, weekly (if not more often), so it became a "sticky note" everyone is tired of answering. Some of us feel that the question is repeated by people too lazy to Google or learn for themselves. Let's answer this question once & for ALL, only problem I can't make this Article a "sticky note" also (unlike the question - ironically), let's hope these people can SEARCH & LOCATE my answer, here it goes: ********************...

Mail Message window position
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: pop When opening a mail message it positions itself in the upper left corner of my monitor. Can this be set to a new default postion? This is a multi-part message in MIME format. ------=_NextPart_000_005E_01CA93E5.598E43D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable What Entourage update you have on your Mac? Entourage --> about = Entourage. <19ertim@officeformac.com> wrote in message = news:59bb0bde.-1@webcrossing....

File info from Windows Explorer to Excel?
I need to create a list of the file information from Windows Explorer to MS Excel. I used to have a dos command to do this. Please advise how this can be done. Thank you Regards I assume you mean the Dir command. This is still possible from the command prompt. Go to Start|Run and enter cmd. -- Ian -- "Wordgeek" <Wordgeek@discussions.microsoft.com> wrote in message news:ACE32060-668D-4A76-B901-1AEB70925A47@microsoft.com... >I need to create a list of the file information from Windows Explorer to MS > Excel. I used to have a dos command to do this. Please advise ho...

Outlook - Application Error
Errors come from two different machines. Symptoms are same; Outlook closes on them instantly. It doesn't occur all the time but periodically it'll happen. Outlook 2007 has two addins. 1) MSCRMAddin, 2) PST Backup Has anyone experienced something like this? All help is needed. Thanks in advance. Event Type: Error Event Source: Application Hang Event Category: (101) Event ID: 1002 Date: 20/11/2008 Time: 3:51:22 PM User: N/A Computer: ADNBK0022 Description: Hanging application OUTLOOK.EXE, version 12.0.6316.5000, hang module hungapp, version 0.0.0.0, hang address 0x00000000. F...

Runtime error 1004 application-defined or object-defined error
I tried to pose this on another group, MS Excel and VBA, but it still has not been posted, and I realize now that this group is much more active and accessible. . . . I am getting the error: "Runtime error 1004 application-defined or object-defined error" in the code provided below at this line of code: .Cells(StartRow + n - 1, 5).Value = _ WordDoc.Comments(n).Scope It is processing comments in a Word document and outputting them into Excel cells. It works fine on another document, but not on this particular document. However, the de...

Windows server 2003 R2
Hi, I'm new to dfs, and I would like to know if it is possible to have under 1 dfs root 4 servers that are in replication ? So you have one dfs root with under it 2 servers in replication and 2 other servers that are also in replication. How should I set this up ? Thanks a lot, GM ...

can't add my True Type Windows Fonts
I have tried loading my Font files to C:/Windows/Fonts, they do appear inside the directory when viewing thru my File Manager, but when using my programs, they don't show up in any of my Font menu pulldowns; only the default fonts that come with the machine. I'm using Windows XP Pro ?? chumley Try loading them via Control Panel > Fonts > File > Install New Fonts. -- Rey "chumley" wrote: > I have tried loading my Font files to C:/Windows/Fonts, they do appear > inside the directory when viewing thru my File Manager, but when using > my...

Resource management application
Hi, I guess this has been asked before, but wondering if anyone can recommend a Resource management ( ex : Conference rooms or Projectors ) product ( 3rd party ) for Exchange 2003 SP2... A client of mine is migrating from 5.5 to 2003, and they were using an in-house script with 5.5, but it's messy and hard to maintain... I know Microsoft has the new auto-accept agent tool, but we need a bit more functionality and want to manage 50 to 100 conference rooms.. Thanks very much ! Swinc's ERM? http://www.swinc.com/products/erm/ -- Neil Hobson Exchange MVP "Thinkpad21"...

Running a mcro based on value of a cell
I have a spreadsheet that performs End Of Day calculations on Financia Market instruments. I have a large macro that runs at the end of every day,part way throug the macro i need to collect data from a column in a worksheet based o the text that appears in cell T1. In the YEARLY sheet i have columns of data that have the end of yea prices of various Financial instruments. In row 1 across the worksheet are the names,e.g Vodafone,Do Jones,Nasdaq,GBP/USD etc.Below each name is a column of 20 year data,i.e A2:A21,B2:B21,C2:C21 etc. The macro needs to look at the text in T1 and then find the a...

Body of email size
when I receive email with a picture , or email of a flyer from a store thie body of the email is very small. The header is fine. I can't find a way to correct this. any ideas? thank you Do you mean the text is small? What about the body of the email is small? "Michael" <Michael@discussions.microsoft.com> wrote in message news:9ADB34FF-62F5-4955-9B35-6F9ED363B1EB@microsoft.com... > when I receive email with a picture , or email of a flyer from a store > thie > body of the email is very small. The header is fine. I can't find a way to > cor...

running total #2
Is there a way to create a running total? A new entry is made in a "input" cell. This entry needs to be added to the already existin total. This is a repeated task. I ultimately want to be able to ente different numbers at different times and have them added to the tota of previous entries. Any help will be greatly appreciated. This is for a Scout Troo fundraising spreadsheet. Larry Chalmers 110th Toronto Scout Grou -- Larry ----------------------------------------------------------------------- Larry C's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=...

Newsgroup for Windows 7
Is there a newsgroup for Windows 7? I want to create shortcuts to a program but it doesn't show the program location. I want to change icons for a program but it won't do it. I know this one is for XP, but I can't find a Windows 7 one. -- Steve Hayes from Tshwane, South Africa Web: http://hayesfam.bravehost.com/stevesig.htm Blog: http://methodius.blogspot.com E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk On 14/06/2010 12:16, Steve Hayes wrote: > Is there a newsgroup for Windows 7? > > I want to create shortcuts to a...

Windows 7 FTP firewall
Hi, Setup a new client on W7 enterprise on a SBS 2003 ISA 2004 network. When I try to use Filezilla to upload some webpages it times out. Added filezilla to excluded programs on Windows firewall and opened port 21. Tried a different FTP program same problem. No joy. Another client running XP Pro works fine with Filezilla. Any suggestions would be welcomed. Thanks, Lyj Changing the firewall on W7 probably made no difference, since all outbound ports are open by default. Your problem probably lies with ISA. What does the realtime monitoring screen show in ISA? Have you inst...

Workflow and GP10 Install
Hi, I have a Windows 2003 Server that has (according to me) all the pre-requisites installed needed for Dynamics GP 10 Workflow including Windows 2003 Server, IIS, Sharepoint, Web Services e.t.c. The problem I am having is after completing the install screens e.g. specifying web services URL and security admin service URL e.t.c. When I click on Install, it comes up with an error that 'Workflow needs to be installed on a Windows 2003 Server' - which is ludicrous as we are on one. Any ideas please. Thanks Neil Neil, Workflow will only install on the following versions of Windo...

size of window upon opening a spreadsheet
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel When I open my spreadsheet, sometimes it opens to a window that only shows the cells I want to see. Other times it opens showing those cells plus several rows and columns larger. Why does it not always show the area that was shown when it was last saved? I'm not sure I have the 'absolute' answer because I experience the same sort of thing once in a while � not just with Excel or Office, but a variety of file types. However, the way it reputedly works is that the window size retained should be whateve...

Unable to install IE8 on Windows XP
When I try to install IE8 it tells me my computer needs an update before installing. When I try to install the suggested update (KB932823) it tells me the service pack is newer than the update and I don't need it. I am on version 5.1 (build 2600.xpsp.071130-1427:Service Pack 3, v.3264). How do I get out of this catch-22? cf. your thread from 30 October: http://groups.google.com/group/microsoft.public.internetexplorer.general/browse_frm/thread/899139a333c52f85 I still think that's a fishy-looking winver. Yes, it is: That's WinXP SP3 RC1. 1. Uninstall WinXP SP...

It can't run on a windows2003 server after made it on a VC++.net PC
I did a project on a VC++.net PC. But it can't run on a windows2003 server. I checked it using dependency walker.There is no prblems showing.Look the log below. Thanks for any help. ---------------------------------------------------------- ---------------------- Starting profile on 7/7/2003 at 3:11:51 PM Operating System: Microsoft Windows NT/2000/XP based Server (32-bit), version 5.02.3718 Program Executable: c:\inetpub\ftproot\VCTERM.EXE Program Arguments: Starting Directory: C:\Inetpub\ftproot\ Search Path: C:\Program Files\Support Tools\;C:\Perl\bin\;C:\WINDOWS\system32;C:\WIND...

Problems installing PowerShell on Windows Server 2008 R2.
Hello! I am trying to install Microsoft SQL Server 2008 Developer on Windows Server 2008 R2, and am having some trouble with the PowerShell aspect. I had never heard of PowerShell before today, and it's been quite an education. ;-) SQL Server 2008 installed somewhat successfully, but I got errors during the PowerShell installation. I didn't think much of it because the installation looked successful otherwise, but when I try to install the SQL Server 2008 Service Pack 1, it fails, citing the invalid PowerShell installation (SQL_PowerShell_Engine_CNS and SQL_Power...

Repost: Error running Report in an Access 2003 db from Access 2007
Ok, clarification - ignore the code from my original post, some of the reports do work. The ones that don't are reports that I have being filtered. Here is the code from one of those buttons: Private Sub Ok_Click() On Error GoTo Ok_Click_Err 'using the customer sub form for customer state report to filter the report, clicking ok will open report for selected state Dim stDocName As String Dim stLinkCriteria As String If Not IsNull(Me.Search_Results) Then stLinkCriteria = "[StateOrProvince] = """ & Me![Search Results] & """"...

how to make cells automatically format to entered text size?
hello, i am new to excel and i would like to have it resize the cells automatically to the size of the text i entered. i know if i click on a cell and do format - line break it does it for one cell. but how can i have excel do this automatically for every cell in every workbook? thanks Frank Barenhorst email: frank.barenhorst@mailshelter.de Frank Hit CRTL + A to select all cells. Format>Alignment>Wrap Text. To make this the default for all new workbooks and sheets.... Open a new workbook. Customize as you wish. File>Save As Type: scroll down to Excel Template(*.XLT) and...

Setting the focus on another application's window...
I would like to set the focus to the window of another application, then close that window. As a test I open the standard Windows "Calculator" application then execute the following code. When I step through it the code does close the window properly but it never sets the focus to it. In the MSDN documentation it says that for SetFocus to work, "The window must be associated with the calling thread's message queue.". I assume it is not in my case. I then looked up the "AttachThreadInput" function but I'm not sure how to get what it expects fo...

Size of Excel file keeps getting bigger
I have a fairly small Excel file (~300K), that I update frequently. Mostly I am just replacing some text data, on which a lot of calculations are done. The text is being copied from a web page, so there is some HTML formatting and graphics data associated that make it about 30K in size The text being replaced is the same size as the new text, but when I close the file the size of the file goes up 30K or so. I can't figure out why it keeps increasing. The data is actually replaced, in that the cells have been overwritten. Any ideas? Is it keeping the old data around somehow, even ...