Solved

Main window without 3d boder

Posted on 1998-11-25
13
347 Views
Last Modified: 2013-12-03
How to create a Main Window (using createWindow) which has
window caption and menu, without the 3d boder. (ie) like
WS_POPUP.

Thans in advance.
0
Comment
Question by:kalai26
  • 6
  • 3
  • 2
  • +1
13 Comments
 
LVL 2

Expert Comment

by:wyy_cq
ID: 1416329
you may try thin border sytle.

0
 
LVL 22

Expert Comment

by:nietod
ID: 1416330
There is no thin border style.  There is a thick border style, WS_THICKFRAME, don't specify that to begin with.  Also don't specify the WS_DLGFRAME style.  Make sure you don't specify any styles that contain these styles "inside" them. like WS_OVERLAPPEDWINDOW.  Do specify the WS_BORDER style.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1416331
What is happening with this question?
0
 

Author Comment

by:kalai26
ID: 1416332
Regarding wyy_cq's proposed answer, there is no thin boder....

Regarding "nietod" comments, it is very close to what I want
but it is not removing the boder completely.

Here are more details and calling sequence in my program:

    WinMain()
    RegisterWindowEx()
    CreateWindowEx()
 
and I am not using MFC. I have used many combinations but I am
still seeing a thin boder!!

Is anyone know how to get-ride of the boder, using Win32 porgramming.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1416333
By default, windows don't have a bordert.  You are adding a border, probably by specifying the WS_BORDER style or another style that includes that style.  Make sure you are not specifying that style.  If you can't figure that out, post the code where you create the window.
0
 
LVL 2

Expert Comment

by:wyy_cq
ID: 1416334
i mean WS_THICKFRAME .
i write a dialog base demo, and i find that even if i select the thin border style , the dialog has a 3d border.
perhaps win95 cancel the style.

you may deal with WM_NCPAINT ,and paint the simple line on the edge of the window if you could not find a better idea.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Expert Comment

by:wyy_cq
ID: 1416335
you may try to modify the window's style after creation.

you can delete the style and exStyle which may generate a 3d border.
setWindowLong(...);
0
 
LVL 22

Expert Comment

by:nietod
ID: 1416336
I'm confused, what is the goal here?  To create a window with no border or to create one with a thin border?
0
 

Author Comment

by:kalai26
ID: 1416337
Create a window with NO BODER.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1416338
Then just don't specify any border styles.  If that isn't working, post the code that you use to create the window so we can ofter suggestions.
0
 
LVL 1

Accepted Solution

by:
yuryz earned 100 total points
ID: 1416339
Try this:
1. react on WM_CREATE message sent to your main window
2. add this code:

       DWORD dwStyle = GetWindowLong( GetSafeHwnd(),WL_EXSTYLE );
      dwStyle &= ~( WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE );
      SetWindowLong( GetSafeHwnd(), GWL_EXSTYLE, dwStyle );
3. resize window to the size it was last time started, or any specific size you need.

0
 
LVL 22

Expert Comment

by:nietod
ID: 1416340
yuryz, why bother doing all that?  just specify the styles you want when you create the window.  The problem is that kalai26 is using the wrong styles.

Also you can assume that if there has been no response in the last 4 weeks, that kalai26 is no longer looking for an answer.
0
 
LVL 1

Expert Comment

by:yuryz
ID: 1416341
hah ! try it yourself ! seems like styles being always added if not by MFC, then by windows itself...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now