Can' get rid of scroll bars in a CView derived class !

Hi there
Altough I changed window styles in CMainFrame, CChildFrame and in CMyView
directly derived from CView, by
modifying the CREATESTRUCT in PreCreateWindow(CREATESTRUCT& cs ) with :

    cs.style &= ~WS_VSCROLL;
    cs.style &= ~WS_HSCROLL;

both scroll bars always appear !
My understanding was that this is sufficient to get rid of scrollbars.
Wat's wrong ?
thanks


0
Alain
11/28/2003 11:45:32 AM
vc.mfc 33608 articles. 0 followers. Follow

5 Replies
732 Views

Similar Articles

[PageSpeed] 45

hi,
   I dunno how much this would help, but if you dont want scrollbars 
then why dont use a CView instead of a CScrollView ?
gangadhar npk
Alain Redlinger wrote:
> Hi there
> Altough I changed window styles in CMainFrame, CChildFrame and in CMyView
> directly derived from CView, by
> modifying the CREATESTRUCT in PreCreateWindow(CREATESTRUCT& cs ) with :
> 
>     cs.style &= ~WS_VSCROLL;
>     cs.style &= ~WS_HSCROLL;
> 
> both scroll bars always appear !
> My understanding was that this is sufficient to get rid of scrollbars.
> Wat's wrong ?
> thanks
> 
> 


0
11/28/2003 2:33:13 PM
Hi, I DO use a CView object, NOT a CScrollView :
My view class has CView for a (direct) base class.
May I add that if I try to change other window styles by  modifying
the CREATESTRUCT parameter from PreCreateWindow the way I show
for scrollbars (for example, minimize box, ...) it works fine.



"gangadhar npk" <npkatgoogle@rediffmail.com> a �crit dans le message de
news:3FC75CA9.2040900@rediffmail.com...
> hi,
>    I dunno how much this would help, but if you dont want scrollbars
> then why dont use a CView instead of a CScrollView ?
> gangadhar npk
> Alain Redlinger wrote:
> > Hi there
> > Altough I changed window styles in CMainFrame, CChildFrame and in
CMyView
> > directly derived from CView, by
> > modifying the CREATESTRUCT in PreCreateWindow(CREATESTRUCT& cs ) with :
> >
> >     cs.style &= ~WS_VSCROLL;
> >     cs.style &= ~WS_HSCROLL;
> >
> > both scroll bars always appear !
> > My understanding was that this is sufficient to get rid of scrollbars.
> > Wat's wrong ?
> > thanks
> >
> >
>
>


0
Alain
11/28/2003 6:26:37 PM
Alain Redlinger wrote:

> Hi, I DO use a CView object, NOT a CScrollView :
> My view class has CView for a (direct) base class.
> May I add that if I try to change other window styles by  modifying
> the CREATESTRUCT parameter from PreCreateWindow the way I show
> for scrollbars (for example, minimize box, ...) it works fine.

Well, CView does not have any scrollbars, so the first thing you need to 
do is figure out where the scrollbars come from.  Do you have a splitter 
window maybe?  Spy++ would help figure out whose scroll bars they are.

-- 
Scott McPhillips [VC++ MVP]

0
scottmcp1 (239)
11/28/2003 7:19:24 PM
Hum, that is very interesting !
The project was first created with a CScrollView,
but I had to change to CView when I turned to the MM_ANISOTROPIC mapping
mode.
(Scrolling is implementing by toolbar buttons and by moving the mouse close
to the border of the window)

And, you are right, I also have a CSplitterWnd m_wndSplitter
member in by CChildFrame class, initialized with :
CChildFrame::OnCreateClient(...)
{  ...  return m_wndSplitter.Create(this,  2, 2,  CSize(10, 10),
 pContext); }
NO "DWORD dwStyle"  parameter !!
I was unaware of this default parameter, and so did not know this would
enforce scroll bars on my CView derived class.
Since I can I do not need panes on my view, I suppose my pb is solved.
Thank you very much.




"Scott McPhillips [MVP]" <scottmcp@mvps.org.nowhere> a �crit dans le message
de news:%23aEw7SetDHA.3744@TK2MSFTNGP11.phx.gbl...
> Alain Redlinger wrote:
>
> > Hi, I DO use a CView object, NOT a CScrollView :
> > My view class has CView for a (direct) base class.
> > May I add that if I try to change other window styles by  modifying
> > the CREATESTRUCT parameter from PreCreateWindow the way I show
> > for scrollbars (for example, minimize box, ...) it works fine.
>
> Well, CView does not have any scrollbars, so the first thing you need to
> do is figure out where the scrollbars come from.  Do you have a splitter
> window maybe?  Spy++ would help figure out whose scroll bars they are.
>
> -- 
> Scott McPhillips [VC++ MVP]
>


0
Alain
12/1/2003 11:25:47 AM
Hum, that is very interesting !
The project was first created with a CScrollView,
but I had to change to CView when I turned to the MM_ANISOTROPIC mapping
mode.
(Scrolling is implementing by toolbar buttons and by moving the mouse close
to the border of the window)

And, you are right, I also have a CSplitterWnd m_wndSplitter
member in by CChildFrame class, initialized with :
CChildFrame::OnCreateClient(...)
{  ...  return m_wndSplitter.Create(this,  2, 2,  CSize(10, 10),
 pContext); }
NO "DWORD dwStyle"  parameter !!
I was unaware of this default parameter, and so did not know this would
enforce scroll bars on my CView derived class.
Since I can I do not need panes on my view, I suppose my pb is solved.
Thank you very much.

"Scott McPhillips [MVP]" <scottmcp@mvps.org.nowhere> a �crit dans le message
de news:%23aEw7SetDHA.3744@TK2MSFTNGP11.phx.gbl...
> Alain Redlinger wrote:
>
> > Hi, I DO use a CView object, NOT a CScrollView :
> > My view class has CView for a (direct) base class.
> > May I add that if I try to change other window styles by  modifying
> > the CREATESTRUCT parameter from PreCreateWindow the way I show
> > for scrollbars (for example, minimize box, ...) it works fine.
>
> Well, CView does not have any scrollbars, so the first thing you need to
> do is figure out where the scrollbars come from.  Do you have a splitter
> window maybe?  Spy++ would help figure out whose scroll bars they are.
>
> -- 
> Scott McPhillips [VC++ MVP]
>


0
Alain
12/4/2003 9:44:43 AM
Reply:

Similar Artilces:

Have Outlook 2000. How do I get rid of spam?
I need step by step directions because I don't know the termenology. When we open Outlook it comes up under my husband's e-mail. Then I Open mine. He is not spamed. I get hundreds each day. HELP! winnieB <winnieB@discussions.microsoft.com> wrote: > I need step by step directions because I don't know the termenology. > When we open Outlook it comes up under my husband's e-mail. Then I > Open mine. He is not spamed. I get hundreds each day. HELP! Step by step: 1) Open Internet Explorer. 2) Browse to http://spambayes.sourceforge.net/ 3) Downoad SpamBaye...

How can I know which SP has been put on the exchange2K
Where can I see this msg? Thanks Open exchange manager, organization, right pane. "Geoffrey" <yile1978@hotmail.com> wrote in message news:uvLLBUYwFHA.3312@TK2MSFTNGP09.phx.gbl... > Where can I see this msg? > Thanks > check www.petri.co.il or check for the answer on the 10th(9th from ur posting)thread on this site,that is named"finding on version of sp installed" ...

How can I print just the flip side of a booklet?
How can I print just the flip side of a booklet? I printed the first side just fine and then my computer went funny and I had to shut down and start back up again. I have 25 copies of the first side that need to be printed on the back side. Pub 2000 user here: There may be a better way but I think you will have to print a page at a time i.e., File, Print Page 2 of 2; then 3 of 3 and so on. -- Don Vancouver, USA "pqc18" <pqc18@discussions.microsoft.com> wrote in message news:92653E8D-9772-4AE0-A9C3-514B363E72B2@microsoft.com... > How can I print just the flip side ...

outlook can't receive exe files
A guy here at work can't get exe files through his outlook. Is there a check to uncheck somewhere to allow it to do this? He can receive normal attachments. ...

How Can I Control When Messages are Downloaded from Server
I have the box "Check for messages every ___ minutes" unchecked (tools/options/general). Yet seemingly randomly, messages get downloaded a couple of times a day without my clicking "Sync." This is problematic due to the way I share the computer. Is there another setting I need to keep this spontaneous downloading from occurring? "Gripper" <Gripper@discussions.microsoft.com> wrote in message news:F22A9D3A-AFB5-4C85-B94B-79B109E4829E@microsoft.com... > I have the box "Check for messages every ___ minutes" unchecked > (too...

How can I sort duplicate text data in excel?
I have a large list of noames that I need to make sure that none of them are duplicated. Is there a way to have excel check it quisker than me reading every name until I find a duplicate? After selecting your data go to filter Advanced filter and check "Unique records only" You can even copy it to another area all uniques entries if you want to ... "TinaScheu" <TinaScheu@discussions.microsoft.com> wrote in message news:0399D580-7E69-4DF0-A969-E7FC5F777C70@microsoft.com... >I have a large list of noames that I need to make sure that none of them >are >...

"x" button enables deletion.... can we put a focus trigger there?
Hi, on three forms, I put focus triggers on the "delete" button because I need to validate some additional data before allowing the user to delete. However, if the user clicks on the corner "x" button to close the form and gets the dialogue box saying they have changes, do they want to "Save", "Delete" or "Cancel", they can delete the record anyways. Is there any way to put a focus trigger on the button of the dialogue box, or on the "x" button? Thanks in advance. I assume you are working with Dexterity. To work with an add...

Getting contents of adjacent cells
I want to divide the y1-axis column and save it to radius (y1/2) column. How do I do that? x-axis y1-axis radius(y1/2) 0 0.00 8.0000 1 0.25 8.0242 2 0.50 8.0691 3 0.75 8.1281 4 1.00 8.1989 5 1.25 8.2803 6 1.50 8.3716 7 1.75 8.4729 8 2.00 8.5832 hi divide the y1-axis by what? 2 as an guess with y1-axis in column c in the y1/2 column(d?), enter =C2/2 copy down. regards FSt1 "Rocky" wrote: > I want to divide the y1-axis column and save it to radius (y1/2) column. How > do I do that? > > x-axis y1-axis radius(y1/2) > 0 ...

Can't upgrade companies to SP4
R [Microsoft][ODBC SQL Server Driver][SQL Server]Insert Error: Column name or number of supplied values does not match table definition.I had a base installation of GP 9.0, no patches. Decided to download SP4 and install. Install of the MSI went fine and upgrading the master databases worked, but going company by company, I get the following error: The following SQL statement produced an error: CREATE Procedure SVC_POP_Make_PO( @PromisedDate datetime, @OrderedBy char(15), @BatchNum char(15), @ItemNumber char(30), @VendorItemNumber char(30), @LocationCode char(10), @Uo...

Can't receive EMail #5
Keep getting this pop up along with 'server did not connect within 60 seconfs, do I want to wait A time-out occurred while communicating with the server. Account: 'Richard', Server: 'pop.east.cox.net', Protocol: POP3, Port: 110, Secure(SSL): No, Error Number: 0x800CCC19 Please reply using lmmurray@cox.net Thanks! Hi RASZ, please read this information from Microsoft http://support.microsoft.com/default.aspx?scid=kb;EN-US;813518 -- Ich habe nichts gemacht, gestern gings noch! Bitte in den Newsgroup antworten damit jeder etwas davon hat. Bravestar@Datenschutzminis...

Can you create custom activities? MSCRM 3.0
Hi, Is there a way to create a new custom activity instead of customising an existing one? I have created a custom entity called 'Chat' utilising an IFRAME. All works well but this entity really should be an activity considering it's properties. In fact I've just been introduced to MS-CRM 3.0 and don't really understand what the difference is between an entity and activity. Would anyone shed the light for me? BTW, I think 3.0 looks great. Gotta admit it's improved. Cheers. Ty In my experience, you cannot create custom activities. In fact, I have been dire...

Office 2004 issue with documents NOT BEING ABLE TO OPEN APPLICATION, but application can open documents.
BACKGROUND: Just migrated all my files and apps from a G4-400 to a new Mac Mini 1.87ghz Intel running pre-installed OSX10.4.10. Used CD to install 'normal' version of Office 2004 Mac on the new Mac Mini. In fact its the same disk that I used originally to install Office on the G4-400. PROBLEM: Neither old .xls and .doc documents (made on old Mac, nor new .xls and ..doc documents (made on new Mac)will not open their respective applications, when clicked upon. ADDITIONAL INFO: However, when I use either of the the application's "Open" feature, theres is no pr...

Getting font properties
I have a LOGFONT - complete with all desired properties including face name. I use CFont::CreateFontIndirect() to create a font. If the font I have specified is not available on my machine then it uses the nearest available in some appropriate sense. So far so good. But CFont::GetLogfont() just returns me the LOGFONT which I used to create the font, and not the one it actually adopted - in particular as regards face name. Is there an easy way to get the face name of the font it actually used? Dave -- David Webber Author MOZART the music processor for Windows - http://www.mozart.co.uk...

Can I do this query in one step?
Suppose I have a talble like this, each record has a unique ID. All"A"s or "B", "C"s should have only x or y or z property attached. Iwant to find A, B or C which has more than one properties.1 A x ...2 A x ...3 A x ...4 A y ...5 B x6 B y7 C z....resutls would look like:A xA y....I think I can do this in two steps or with a subquery. Then I thoughtof self-join but didn't figure out how to use it in this case.Thanks a lot! SELECT DISTINCT and do not include the record ID perhaps? Or is the record ID vital?"muster" <muster@gmail.com> wrote in me...

How many pages can a booklet have?
Hi how many pages can a booklet have? Is there a limit to the pages in a publisher booklet. Each page has three photos. There is no limit, your RAM may decide for you. What version Publisher? -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Verystumped" <Verystumped@discussions.microsoft.com> wrote in message news:8F2778CF-7B14-4BDD-93C5-EF9B39E2C1A7@microsoft.com... > Hi how many pages can a booklet have? Is there a limit to the pages in a > publisher booklet. Each page has three photos. ...

Where can I get a good holiday booking form for my golf business?
I need a quality Booking Form for my Golf Holiday business on the Costa Del Sol. One which includes sections for accommodation, dates, numbers, flight enquiries and car hire enquiries. Any help would be much appreciated on a tight budget. Thanks Dave Wrong forum. Try templates or doing it yourself. :-) -- Russell Dawson Excel Student Please hit "Yes" if this post was helpful. "Dave" wrote: > I need a quality Booking Form for my Golf Holiday business on the Costa Del > Sol. > One which includes sections for accommodation, dates, numbe...

Can DrawFrameControl() draw XP style controls?
My application supports XP style controls. But I found the DrawFrameControl() can not draw XP style controls in my application. Can I draw XP style controls? ...

Frame window does not get displayed properly
Hi All, I have a Dialog based applciation. I want to create a Frame window when clicked on the button on Dialog. The problem is I handled the Painting of the dialog (I draw a picture on so WM_PAINT message I handle.) but doing this I am not able to draw the frame window properly. It appears to be transparent to me . I am setting the CFrameWnd to be the child of CDialog Please Can you let me know how to draw the farme window of how can I have a floting window on a dialog. Thanks Anup I don't know if what you are doing is a good idea. But if you want to have a floating window ins...

Help
Hi... I tried to work on Word today for first time on newish Mac and realized none of my Office applications work. When I double click on Word I can see something happening as I get the circle of colours twirling, but half an hour later it still hadn't opened. I just have to do this as quickly as possible as I have a deadline for what I have to do Monday at 12. I've tried reinstalling the software, but that didn't do anything for me. Mind you I know absolutely nothing about installing anything on Mac computers so I could be doing it all wrong. Do any of you have any idea what c...

how can I draw a box and whisker plot in excel 2002?
I have some data, and have worked out the minimum value, the 1st and 3rd quartiles, the median and the maximum, but need to find out how to put this together in a box and whisker plot See http://peltiertech.com/Excel/Charts/BoxWhiskerH.html best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "andywilson" <andywilson@discussions.microsoft.com> wrote in message news:269E939E-6FC6-4993-BD6E-54ACE14141EB@microsoft.com... >I have some data, and have worked out the minimum value, the 1st and 3rd > quartiles, the median and the maximum, but ...

can not Send/receive using Outlook 2003
Just bouhght new computer and am loading all of my software that worked onmy old one. When I try to send and recieve I get the message object not found. I have used test and this work ok. I have also reloaded all of my broadband and office software numerous times to no prevail. Software Windows xp Office 2003 ADSlL broadband with bigpond Gp Check to make sure the accounts are setup correctly if they are then run Detect and Repair, still an issue then create a new profile. May also want to check your anti-virus software program setting for outgoing mail and disable that option. Rega...

I have individual place cards I want to print can anyone advise m
I am helping friends print their wedding place cards, they have been given the individual cards from the place where they are having the wedding, but we cannot get them to line up What are the size of the place cards? Are there more than one card on the page? Are you merging information? What version Publisher are you using? -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Pauline" <Pauline@discussions.microsoft.com> wrote in message news:77E3682B-3926-410B-8012-2907CF63F37A@microsoft.com... >I am helping friend...

Anyone with good knowledge of CxImage class on CodeProject/CodeGuru ?
Hi, I am needing to display PNG files in my WinCE application. The ONLY thing I need is: 1- Load PNG files from RESOURCE (not from file, and I don't need to save). 2- Display PNG files (with transparency if possible) to a CDC 3- Get the data into a BITMAP, HBITMAP or CBitmap. With WinCE being limited, I am trying to strip CImage or CxImage to ONLY do the above. I do not need saving. I just need to LOAD and display and get it as a bitmap. I am having a very hard time doing this. The Decode function requires CImageIterator and it needs CImage again and it needs alot of other things. Can ...

How do I get Outlook Today to show appts from multiple calendars?
I want the opening page (Outlook Today) to show the next week's appointments from 2 calendars. I can only get it to show one calendar and it defeats the purpose of having the summary. Ideas? If you provide some basic information like: version of Outlook where the two Calendars are located (eg is one a Public Folder, a shared Calendar, a sub-folder of your mail Calendar) you'll find getting a useful answer here much faster and less laborious. :-) Regards Judy Gleeson MVP Outlook in Canberra, Australia "MORE CALENDAR" <MORE CALENDAR@discussions....

using rule creates multiple entries. How can I stop this?
I'm going to give you the details of this so maybe someone can just tell me how to correct or whether it can be corrected. I've tried creating different rules, rules with exceptions, multiple rules with multiple exceptions, all I can think. Here is the scenario. Although I'm using Lisa as an example, this problem applies to every staffer in my 9 person office. Lisa is my secretary. She sends me internal email, staff questions and stuff which goes to a a "Staff" subfolder of the Inbox. I have a rule for this. She also sends me mail she has scanned. I ha...