Can't size window

What would override the ability to size my SDI's window?  This is what I 
have:

 cs.style = WS_OVERLAPPED | WS_CAPTION
  | WS_THICKFRAME | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX;

When I restore down and click, the cursor changes to size the border, but 
there is otherwise no effect.  I am thinking that I may have done something 
a few years back to prevent sizing, but I do not see what that would be. 


0
srussell2458 (497)
9/11/2006 4:20:00 PM
vc.mfc 33608 articles. 0 followers. Follow

5 Replies
298 Views

Similar Articles

[PageSpeed] 19

http://msdn2.microsoft.com/en-us/library/h464d4f3.aspx

Also, look under:

Window Size and Position

http://msdn2.microsoft.com/en-us/library/b5wzwdk7.aspx#_mfc_window_size_and_position_cwnd

Tom

"Steve Russell" <srussell@removethisinnernet.net> wrote in message 
news:upp8a4b1GHA.4228@TK2MSFTNGP06.phx.gbl...
> What would override the ability to size my SDI's window?  This is what I 
> have:
>
> cs.style = WS_OVERLAPPED | WS_CAPTION
>  | WS_THICKFRAME | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX;
>
> When I restore down and click, the cursor changes to size the border, but 
> there is otherwise no effect.  I am thinking that I may have done 
> something a few years back to prevent sizing, but I do not see what that 
> would be.
> 


0
tserface (3861)
9/11/2006 4:26:55 PM
>  cs.style = WS_OVERLAPPED | WS_CAPTION
>   | WS_THICKFRAME | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX;
>
> When I restore down and click, the cursor changes to size the border, but
> there is otherwise no effect.  I am thinking that I may have done something
> a few years back to prevent sizing, but I do not see what that would be.

See if OnNcHitTest is changing the return value of HT?? Thats one way
to change/prevent resizing.

---
Ajay

0
ajaykalra (6840)
9/11/2006 4:56:16 PM
Thanks alot, Tom and Ajay.  After considering your replies without a 
solution, I was able then to see more clearly what I had done some years 
back:

 pSystemMenu->DeleteMenu(SC_MOVE,MF_BYCOMMAND); // remove Restore option
 pSystemMenu->DeleteMenu(SC_SIZE,MF_BYCOMMAND); // remove Size option
----------
"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:1157993776.002034.109150@m73g2000cwd.googlegroups.com...
>>  cs.style = WS_OVERLAPPED | WS_CAPTION
>>   | WS_THICKFRAME | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX;
>>
>> When I restore down and click, the cursor changes to size the border, but
>> there is otherwise no effect.  I am thinking that I may have done 
>> something
>> a few years back to prevent sizing, but I do not see what that would be.
>
> See if OnNcHitTest is changing the return value of HT?? Thats one way
> to change/prevent resizing.
>
> ---
> Ajay
> 


0
srussell2458 (497)
9/11/2006 5:37:38 PM
"Steve Russell" <srussell@removethisinnernet.net> wrote in message
news:#G1Uzjc1GHA.4176@TK2MSFTNGP06.phx.gbl...
> Thanks alot, Tom and Ajay.  After considering your replies without a
> solution, I was able then to see more clearly what I had done some years
> back:
>
>  pSystemMenu->DeleteMenu(SC_MOVE,MF_BYCOMMAND); // remove Restore option
>  pSystemMenu->DeleteMenu(SC_SIZE,MF_BYCOMMAND); // remove Size option


This certainly was the easy way to do it.

--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com


0
ajaykalra (6840)
9/12/2006 2:30:13 AM
I think I understood the problem wrong.  I thought Steve was trying to do 
special handling for these messages, not preclude them from happening.  I'm 
glad he got it to work the way he wanted though.

Tom

"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:ey8rfNh1GHA.5048@TK2MSFTNGP05.phx.gbl...
>
> "Steve Russell" <srussell@removethisinnernet.net> wrote in message
> news:#G1Uzjc1GHA.4176@TK2MSFTNGP06.phx.gbl...
>> Thanks alot, Tom and Ajay.  After considering your replies without a
>> solution, I was able then to see more clearly what I had done some years
>> back:
>>
>>  pSystemMenu->DeleteMenu(SC_MOVE,MF_BYCOMMAND); // remove Restore option
>>  pSystemMenu->DeleteMenu(SC_SIZE,MF_BYCOMMAND); // remove Size option
>
>
> This certainly was the easy way to do it.
>
> --
> Ajay Kalra [MVP - VC++]
> ajaykalra@yahoo.com
>
> 


0
tserface (3861)
9/12/2006 5:21:39 PM
Reply:

Similar Artilces:

Page Size Sheet Size Not The Same
Hi - I'm having trouble with printing in Publisher 2007. I have a 5.5x8.5 page size and I want to print that size paper. I've tried to set the sheet to custom size in the printer setup, but Publisher still want a 5.5x8.5 Publisher size printing on a full 8.5x11 sheet. I don't get it. I never had this problem with the Publisher 2003 or anyother MS product including the other Office 2007 programs. Can anyone help clue me in? Even if I create a document as 5.5x8.5 size it will publish a 8.5x11 .pdf file. Please Help! Jerry The new Publisher page setup is not user friendly. ...

windows mail
I am not receiving e-mail. When I click send/receive, it goes through very fast and says successful. I know there is mail to receive. I can send e-mail. ANY IDEAS?? Send yourself a test e-mail. Does it appear in Sent Items? Can you see it on your server's Webmail site? Is this a POP3 account? -- Bruce Hagen MS-MVP [Mail] Imperial Beach, CA "Steve B" <Steve B@discussions.microsoft.com> wrote in message news:D6348301-9C20-4ABF-B2DE-1011BE6E39E0@microsoft.com... >I am not receiving e-mail. When I click send/receive, it go...

Screen Size
Dear All, I don't know if anyone can help but when I compose a message, the view of the message is huge! The font looks as though it's size 20 and it's driving me absoultely mad...... However, the emails in my sent / deleted files are normal size. Does anyone know why the view is so huge on my composing view and how I can get it back to normal? I've tried everything to no avail..... Many thanks! Sarah Grange, you wrote on Tue, 7 Oct 2008 02:05:00 -0700: > I don't know if anyone can help but when I compose a message, the view of > the message is huge! ...

Root / Child Windows 2003 SP1 Exchange 2003 Permission Problem -- What permission is my account missing?
I have a root and child domain (root.company.com and child.company.com). Both root and child servers are running Windows 2003 SP1. I created a user account in the Root domain called "ROOT\SuperAdministrator". This user account a member of: - Administrators - Domain Admins - Domain Users - Enterprise Admins - Exchange Domain Servers - Exchange Enterprise Servers - Schema Admins Exchange 2003 is installed on a Windows 2003 SP1 box in the child domain. Using Exchange System Mananger, we delegated control so that "ROOT\SuperAdministrator" is a "Full Exchange Adminis...

Windows NT Integrated Security
I have an Access ADP project which uses "Windows NT Integrated Security" to connect to the SQL server. On occasion, me or some of my users may be logged on to Windows with an account that does not have access to the SQL database. Can I add code to Access that will prompt me for another set of Windows credentials to logon to the database ? thanks Not as far as I'm aware. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "chuck" <chuck@no.where> wrote in message news:f75hj8$i53$1@nrc-news.nrc.ca... >I have an...

Mailbox size
Hi, for some time i noticde that my live mail doesn't receive new messages unless i delete some old messages. i would leik to know if ther eis a maximum mailbox size in Live Mail. thank you. The mail box capacity is controlled by your isp. Check your account in the web interface to ensure you have not maxed out = your isp limit for your account If your account in WLM and a prior email client is/was configured to = never delete from the server, you may have over an extended=20 period of time reached your limit -- ....winston ms-mvp mail "Mirogzy" wrote...

speed up mailbox size increases
we have an AD structure with a NLB EXCH 2003 FE and a clustered 2003 BE. We have a developed application that manages mailboxes, assigns the mailbox quota, and manages the email addresses. If a user asks for a larger mailbox quota, we change it within the application, and the application immediately changes it in AD. Unfortunately it seems like quite a lengthy process between when AD knows about the change and the Exchange server starts to act on the new quota amount. Is there a way I can tweak either AD or Exchange so that the changes occur on a more regular basis. Typically it tak...

How do I increase font size in the reading pane in Outlook 2007?
Previous versions had a command button to cycle through font sizes tiny > small > normal > big > tiny > ... The nearest I can get in Outlook 2007 is to open the received email in edit mode and then select all and then choose a font size via a font dialog. Silicon.Com sends a weekly newsletter out in HTML using a very small font, which I need to enlarge for comfortable reading. Surely I've missed a very simple command button, but searching local and on-line help for "increase font size" etc. brings no help. ...

Backup file size
I run a script to backup my databases. The critical lines of code are: OSQL -U sa -P password -S ServerName -Q "BACKUP DATABASE StoreOps TO DISK = 'C:\RMS Backup\DailyBackup1.bck' WITH FORMAT, STATS And a second line just like the first for database HQ and filename DailyHQBackup.bck The files generated are 107MB (Store Ops) and 196MB (HQ). Recently I executed a 'no going back' query so I manually backed up my database. I don't normally check the file size when I do this sort ofthing, but last night my backup media (DVD-RW) ran out of space... The HQ Admin-ge...

priv1.edb still has large size even no mailbox on it
Dear all, I have an Exchange 2000 mailbox store on W2K SP4 which has priv1.edb file size is 27 GB. Last month I create new mailbox store with the database name is priv2.edb and move the mailbox on the old mailbox store to the new one. But after there is no mailbox anymore on the old mailbox store, I wonder because priv1.edb file size still have the same size. Please help. Thanks. regards, Nita A priv.edb file will not dynamically shrink when you delete or move mailboxes from it. If you want to recover the saved space immediately you will need to run eseutil in defrag mode to compact...

Refresh problem for the size grip with Windows XP style
Hi, We have an dialog application with a scrollbar size grip. On Windows XP with visual style, there is a refresh problem for the size grip region. Without the XP style, everything is OK. I have noticed the same behavior with Notepad. Any ideas will be appreciated, Thanks ...

Excel file very large in size?
I have made excel workbook with 10 sheets. It is simple and has one sheet with graph, and also 4 pictures of size 300Kb. Why excel file is over 3100 Kb in size, or this is ok? Thanks in advance Marc Excel is noted for over-estimating the actual used range on a sheet. See Debra Dalgleish's site for info and instructions for resetting. http://www.contextures.on.ca/xlfaqApp.html#Unused Gord Dibben Excel MVP On Mon, 25 Apr 2005 22:37:45 +0200, "Marc" <marc5@hotmail.com> wrote: >I have made excel workbook with 10 sheets. It is simple and has one sheet >with gra...

using Windows XP on other PCs
I bought Windows 7 and wanted to use my old Windows XP CD to install a new system at a friends computer. He lost his install CD. Do I have to deregister my licence? The problem is that my pc crashed due to viruses. So do I have to install it first on my computer, deregister and then install it on the other pc? There is no de-registration process. You can only transfer winxp to another PC if its a retail version. If your version of winxp was an oem version supplied with the old PC, it died with that PC "itfreak" <itfreak@discussions.microsoft.com> wrote in mess...

Exchange 5.5 import/export of mailbox size limits
I need to do an import/export of an Ex5.5 directory that would change the mailboxes size limits. Basically, I need to replace whatever is in the Issue Warning Prohibit Send Prohibit send and Receive .... account fields, and change these "manually" via a spreadsheet. I have several 100's of these to do and would like to do it via a CSV file in the Exchange admin export/import. What should the header of csv file be ? obj-class,directory name,Issue Warning?,Prohibit Send? Prohibit Send Receive? Thank You, SRP 2 of the column headers will be: Issue warning storage limit...

SOP Inquiry Windows
Hello All - We just upgraded from 7.5 to 8.0. For some reason, the Sales Order Processing Document Inquiry window doesn't sort the lines by any fields at all. Same thing happens to Sales Order Processing Item Inquiry window. When we put the CustomerID as the restriction in the Sales Order Processing Document Inquiry window for historical transactions, it doesn't sort the details by any field - I looked at the dexSQL log and looks like it is creating a SQL statement on the fly - and there is no stored proc that is getting executed. The SQL statement is sorting it by only 2 fields Cus...

SP3 for Windows XP Failed
In reviewing my Windows Update History, I find that Windows XP Service Pack 3 Failed on 08 21 2008, but several Service Pack 3 Updates have downloaded since that date. Two Questions: 1) Why did the SP3 Update Fail, and 2) Why are the updates downloading and installing even though the Service Package Failed? This does not make sense. I just tried again to install it and it stopped downloading. Why? tkb656 wrote: > In reviewing my Windows Update History, I find that Windows XP > Service Pack 3 Failed on 08 21 2008, but several Service Pack 3 > Updates have downloaded sinc...

Sizing Tool for CRM 3.0
A partner would like to submit suggestion for Sizing Tool for CRM 3.0. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?mid=e9792a1a-1a3d-4d82-b56d-7ce8909368c3&dg=micros...

Personal folder size
Hi, I have moved my personal folder to a server, and in the move it has increased in size from 26mb to 103mb. I've tried compacting it, but this has made no difference. Is there anything else I can do to reduce the size? Thanks Barry Nope, since it sounds like you have used the tools that are provided and removed any items from the pst that you just don't want. "Barry K" <bnk@cvl.uk.com> wrote in message news:c50il2$4tl$1@news.netkonect.net... > Hi, > I have moved my personal folder to a server, and in the move it has > increased in size from 26mb to 103m...

Remove Message Size Limiter
Dear All, im getting bounces to my exchanger server due to attachment size. Mail in question is a 5Mb message (Becomes 6.8 when in message format) commining from a hotmail account. I Know it isnt a Hotmail limitation, as ive sent the message to another organisations EX server. I need there to be absoloutly NO limitations within exchange AT ALL for the sending receiving or delivery of mail. I have been through exchange with a fine tooth comb and cannot find any such restrictors but im obviously missing somthing ive also checked the AD account in question to see if a limit has been plac...

have all forms open in window of main form
I would like to have some commnand buttons and or toolbar buttons on a main form which open a number of different forms and have them all open up in the main form whilst retaining the view of the command buttons etc. Not sure if this is feasible or relativley straightforward but if it is would appreciate some guidance or direction on how to accomplish this. Each new form would overlay the previous form opened which would become invisible. Thanks ChrisP Hi Chris, One easy way to do this is to add tabs on your main form. Then in each tab you can place a subform. You will only see t...

IE Problem related to Windows Live
I uninstalled the Windows Live programs yesterday, and now Internet Explorer will not connect to the internet. Message says "not responding." I tried to download and reinstall IE8, but the installation will not complete because it says I have a "more recent version" already installed. I also cannot uninstall IE, because it does not show up on the programs list on the Control Panel. I'm running Vista with all updates current. Any help will be appreciated. Always state your full Windows version (e.g., Vista SP1; Vista 64-bit SP2) when posting in a for...

blank page size
HI I am using MS Publisher 2003 and I go to a blank page, then page setup and select A3 size, however, the blank page shown is still showing as a4. If I go to Print preview, then it shows the A3 page. This has only happened recently (not used A3 size for a while). As I have an A3 Printer, I want to be able to see the correct size when I am setting teh page up. Can anyone help please? Barry The first step is to set the Print setup. The would be the size of the paper stock in the printer and the way it sets in the supply tray, portrait or landscape. Then, set the File, Page setup. -- ...

Open and close Dialog windows
Hello, I've got a dialog based application which performs a long lasting task for which the user has to wait. I would like to show the user a message that something is happening and I would like to close the message automatically when the task is finished. Because I've little experience with mfc I would like to ask how I can manage this and if there is an example for doing it ? Is there a faq for this group ? Thanks in advance, Ralf. "Ralf Erdmann" <ralf.erdmann@web.de> wrote in message news:403f7fa8.14652421@news.t-online.de... > Hello, > I've got a di...

control textboxes keep changing size
Hi, I've got several control-based textboxes in my worksheet but everytime the user clicks in out of them more than 5 or so times then the textboxes either change size, font size or just mess up the formating of the page completely. What is going on here and is there a fix? I really hope there is because otherwise I've wasted 6 hours setting up this spreadsheet. :) James I had that problem (xl'03) and it turned out to be changing the screen resolution while the wb was open. I'd click on a button and it would expand (and keep on growing every time I clicked it. The only w...

Windows XP Pro error message on completion of boot into GUI
At end of bootup I have started getting following message for the last 10 days: Windows Registry Recovery: One of the files conataining the system's registry data had to be recovered by use of a log or alternate copy. The recovery was successful. I click OK and I'm alright. But this is distracting and new. Any suggestions on how to proceed? Is there a way to fix the registry so that this will not recur? Thanks, CMA CMA6 wrote: > At end of bootup I have started getting following message for the last 10 days: > Windows Registry Recover...