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
659 Views

Similar Articles

[PageSpeed] 56

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:

Windows 2003 SBS Max connections / users
I've read some of the previous posts regarding max # of users, unavailable connections, etc however I think I've got a slightly different twist on the issue. I'm running SBS 2003, SP2 - patches up to date, etc. We have 5 original CALs plus an additional 5 DEVICE CALs installed. It is rare for 10 users to be logged in at any one time, but it does happen. The issue I'm having is that occasionally a user will get a message that they can't connect, or their Outlook won't be able to connect to Exchange or something similar. If I go in to Computer Manag...

SOAP Server Application Faulted 08-10-04
Hi! When i execute an asp.net code for MS CRM, i get the following error message : ERREUR SOAP: SOAP Server Application Faulted <detail><error> <code>80040225</code> <description> The specified user is either disabled or is not a member of any business unit. </description> <file>d:\crm\build\3297 \src\platform\security\crmsecurity\secmain.cpp</file><line> 2281</line></error></detail> Source: System.Web.Services 'The lines that create the CRM user object : Dim BizUser as new Microsoft.CRM.Proxy.BizUser bizUser.C...

Huge document size
Hi, I have a 8 page Excel xp (2002) document that after save shows 10mb, which is overkill. Most of the data is between A-K and 1-56, simple alphanumeric. How do I troubleshoot this or how can I make it smaller, it's impossible to e-mail. I can zipp it but that doesn't resolve the file size issue. Sincerely, Chris Hi check out the following site http://www.contextures.com/xlfaqApp.html#Unused to clear your used range -- Regards Frank Kabel Frankfurt, Germany Chris wrote: > Hi, > > I have a 8 page Excel xp (2002) document that after save shows 10mb, > which is ov...

credentials to run this report are not stored
Hi all, I'm getting this problem when I try and create a timed subscription. Error: ...credentials to run this report are not stored..... ok I created another folder under the same folder where I'm having this problem. loaded the report and I have no problem. I even moved the current folder with that report in it. Creted another folder with the same name and still the same problem with that named folder. With a different name for the folder I have no problem??? I'm stuck here.. almost all post just talk about storing the credentials, Already done and works...

RMS PO Window sizing, organization, label printing is (also) annoying (several suggestions made)
It never seems to fail that the PO window, whether in edit or receive mode is drawn poorly in terms of user need. Overall design is also sorely lacking, especially considering how much time Manager is used by retailers. For instance, the Item Description column is far too big for what RMS itself limits you to in terms of # of characters. The other columns are too wide also, which wastes prcious (PO window) space. The window itself is too narrow to accomodate all the columns, which is super annoying, plus there is no control over what columns do and don't display (boo!). And if you t...

Need only one DLL instance to run...
Hi all, 1: if two apps load the same DLL - LoadLibrary(...) - system will create to different instance of the DLL... Now, in my DLL i've a CList and i need it to be visible to all instance and all apps!!!! Is there a way!? 2: I need the dll to remain loaded till machine reboot!!! Is it possible!? Thanks Ale >if two apps load the same DLL - LoadLibrary(...) - system will create to >different instance of the DLL... >Now, in my DLL i've a CList and i need it to be visible to all instance and >all apps!!!! > >Is there a way!? It'll be difficult to share a ...

MDI and Dialog based applications show different performance
Hello all, I have created three versions of obstensibly the same application. Two of these versions are multi-threaded; the main worker thread of these applications is very compute intensive. The third version is a console application and is not multi-threaded The first applicaton is Dialog based and the second is an MDI (multi document) application. The only real diffenence between the two is in the user interface. The user interface is obstensibly These two applications share a common code base for the worker thread. The code for this worker theard is virtually identical to that code...

Auto Archive in Mailbox Size Warnings
My question is easy enough - can the AutoArchive option be removed from the Exchange default warning that gets sent when a user approaches their mailbox size limit? We would like to have that removed if it's possible. Thanks for any Reply - Jon On Wed, 13 Jan 2010 12:59:57 -0600, "Jon" <lanmanjs@comcast.net> wrote: > My question is easy enough - can the AutoArchive option be removed >from the Exchange default warning that gets sent when a user approaches >their mailbox size limit? We would like to h...

Size of buttons in toolbar
Hi; I want to have different size of buttons in the same toolbar. The default size is 16x15, but I want to have buttons of this size and some other of 32x15. I've read the article in MSJ, but what I understand is that this way tou change all the buttons to the same size. I even downloaded the source and all the buttons have the same size, so, that is not what I'm looking for. Any idea, or anyone who let me know if I'm wrong? Thanks Dalton Could you just resize the other buttons, but leave bitmaps towards one side or the other? Or, could you have two toolbars (one with smal...

run time error 10-22-03
I am having a lot of trouble when I open up word I get run time error 52 in VB. I have tried uninstalling word and reinstalling it. WE have tried deleting the macro but still to no avail can someone help me please? ...

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] & """"...

Automatically run macro
My name is Mike and i have a question about microsoft excel macro's. Attached is a copy of the excel sheet im working on. Below the excel sheet is the macro I built. Some of the cells contain given values and some cells are calculated from formulas. Cell (G4) is my given value...it is related to cell (C32). The point is, I plug a value into cell (C10) and it runs through the rest of the calcs in the other cells and gives me a value to cell (C32). I built a macro that works as a goal seek pretty much. The macro makes cell (C32) equal to cell (G4) and gives me the value for cell (C10). I wan...

Excel Continuous Running Total
I posted a message earlier and have received a partial solution. I want to keep track of how much stock prices go up or down with a running total of how much they go up or down over several days until the direction changes. For example, if price go up 10 on Mon, 20 on Tues, 30 on Thurs and down 10 on Fri I want my running total column to show a positive number of 60 and then a red number of 10 and continue adding the amount of the total of the down days until the market shows an up day. The formula I am now using total the first and second day but does not do a running total count if t...

display changing label caption on form as sub runs w/o screen flic
let's say i have this routine Sub Test label1.caption = "Starting ... " 'do events label1.caption = "Getting there ... " 'do events label1.caption = "Finished! ... " End Sub on my form, i have label1 right in the middle what happens is sometimes the message will change, and then sometimes it wont, or it will show the first one, skip the second and jump to the third etc etc etc so it is inconsistent. is there a way to make sure the label caption displays consistently, on time, wh...

Money 2006 Windows Mobile 5 Support
Does anybody know when Microsoft will release a mobile version of Money 2006 that supports Windows Mobile 5? Call me crazy, but I think it's a little ridiculous that you can only use Money 2006 on older PDAs.... Probably not until M2007 now. -- Regards Bob Peel, Microsoft MVP - Money For UK tips & fixes see http://support.microsoft.com/default.aspx?scid=fh;EN-GB;mny. I do not respond to any emails that I have not specifically asked for. <jbigelow@gmail.com> wrote in message news:1150398000.962168.91340@h76g2000cwa.googlegroups.com... > Does anybody know when Microsof...

Exchange Mailbox Size #2
A request of 1GB mailbox size limit for each user was requested of me for over 10,000 users. We are using the enterprize version 2003; This seems like a foolish request since I've seen how a 250MB inbox re-acts using Outlook, DOG Slow... My question is, is this supported and what issues do you see given a request like this? -Charles "sacredheartu@hotmail.com" <anonymous@discussions.microsoft.com> wrote: >A request of 1GB mailbox size limit for each user was >requested of me for over 10,000 users. We are using the >enterprize version 2003; This seems lik...

Size options for attached images
Hi, Using Outlook 2003, there is the new resampling option for attached images. I really applaud that innovation, saves time and space when sending images that comes straight from the camera. Really good. However, I miss a 800x600 pixels option. Is it possible to have that one? 640x480 is almost too small these days and 800x600 could be just right for a small sample. I have not found any settings for this function, neither size nor compression. Are those settings just hard-coded? Regards, -- Lars Forslin "Doing time on earth" ************************** ...

Windows installer error
I'm tryingto down load new software, System Suite10, and my computer keeps giving me the pop up errorsaying, windows is in safe mode or windows installer is not correctly installed. This computer is about 2yrs old and has never done this till recently, =?Utf-8?B?Y2Nn?= <ccg@discussions.microsoft.com> wrote in news:40B819EE-39C8-4DFB-99F9-ED8E1EBE1DCD@microsoft.com: > I'm tryingto down load new software, System Suite10, and my computer > keeps giving me the pop up errorsaying, windows is in safe mode or > windows installer is not correctly installed. ...

how to set up for the Windows Mail??
anyone can tell me by how i can set up the email account, checking with the Windows Mail?? Windows Mail: Setting up an account from start to finish http://windows.microsoft.com/en-US/windows-vista/Windows-Mail-setting-up-an-account-from-start-to-finish -- Bruce Hagen MS-MVP [Mail] Imperial Beach, CA "JuniorBoy" <JuniorBoy@discussions.microsoft.com> wrote in message news:30E1D13E-3A13-493F-95DC-AE5FE645B6EF@microsoft.com... > anyone can tell me by how i can set up the email account, checking with > the > Windows Mail?? ...

Money 2002 will not run
I had been using Money 2002 for approx. 3 yrs on my home pc (Dell Dim 2100, XP Home Ed. w/SP2). Last year, it simply would not launch. No error message, no splash screen, no app opening, no process listed in Task Manager. Just.... nothing.... The only change that was made to the system since M2k2 last ran was upgrading my a/v solution from Trend Micro PC-Cillin to TM Internet Security. I have tried disabling every aspect of the Internet Security product, as well as completely un-installing the app, and then attempting to run Money, but the same thing (nothing) happens. I was considerin...

Re: Workflow just wont run automatically, i have to run them manually
Yes, but i realized what i was doing wrong. I assumed [bad idea] that if i create a case and hit Save & Close the first time, taht the rule will run. In order for the rule to run automatically, it has to be Save, once it saves it, then Save & Close. Thanks for your reply. "Hi, Did you check the workflow monitor to see if the rules get triggered correctly and complete sucessfully ? Have a nice day, St=E9phane Dorrekens " --------------= Posted using GrabIt =---------------- ------= Binary Usenet downloading made easy =--------- -= Get GrabIt for free from http://...

Windows Vista & Publisher Font problems
Two problems: 1. I created a document on a computer with MS PUblisher 2003 and windows xp using a font called Aquiline Two. I try to open this file on my Windows Vista computer using MSPUB 2003 and the font does not display at all. I installed it to the fonts folder, restarted, still wont display. I cant even use the font in any publisher program. I can however, use it in word and other programs on my vista computer. Is there anyway I can get this file to work?? 2. another font issue with Windows Vista using font TSP of the mourning. When i open files created on an XP computer on my vi...

Outlook Still Running
I am running XP Pro with Office 2003 Pro and sometimes when I exit out of Outlook, Outlook.exe and Winword.exe stay as processes still running. Does anyone else have this problem and what can do to make sure this does not happen? Thanks for your help -- Neil Remove ABCD from Email address to reply <neil154ABCD@earthlink.net> wrote: > I am running XP Pro with Office 2003 Pro and sometimes when I exit > out of Outlook, Outlook.exe and Winword.exe stay as processes still > running. Does anyone else have this problem and what can do to make > sure this does not happ...

Windows cannot obtain the domain controller name for your computer network. (The specified domain either does not exist or could not be contacted. ). Group Policy processing aborted.
Hi This problem has been driving me nuts for two days now. I'm receiving the following error in the event log when a user tried to login. Event Type: Error Event Source: Userenv Event Category: None Event ID: 1054 Date: 10/01/2010 Time: 18:37:28 User: NT AUTHORITY\SYSTEM Computer: PC6 Description: Windows cannot obtain the domain controller name for your computer network. (The specified domain either does not exist or could not be contacted. ). Group Policy processing aborted. For more information, see Help and Suppor...

Change paper size w/ WinXP
I recently updated to Win XP. In Excel 2000, I just noticed that when I do page setup, the paper size can't be selected. It is grayed out. I'd still guess that printer driver. Don wrote: > > I recently updated to Win XP. In Excel 2000, I just > noticed that when I do page setup, the paper size can't be > selected. It is grayed out. -- Dave Peterson ec35720@msn.com ...