|
You can use ModifyStyle function to remove or add a window style and ModifyStyleEx for add/remove extended style.
for removing border, ModifyStyle(WS_BORDER,0);
for removing caption ModifyStyle(WS_CAPTION,0);
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
thanks for your reply
but can you tell me how can i add at the bottom of dialog box as in the Windows XP and i want to add some button on it
and with ModifyStyle(WS_BORDER,0); the dialog box upper bar willbe inactive but not disappear
thanks
Ashish Dogra
MCA
Noida
|
|
|
|
|
check MSDN for more details about windows styles.
in the OnPaint function,
CPen pen;
pen.CreatePen(PS_SOLID,GetSystemMetrics(SM_CXDLGFRAME),GetSysColor(COLOR_ACTIVEBORDER));
dc.SelectObject(pen);
CRect rect;
GetClientRect(rect);
dc.MoveTo(dsierd_x_pos,desired_y_pos);
dc.LineTo(xpos,ypos);
do the necessary claculation to draw your line
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
What do you need exactly? if you answer to me then you dont need to asked this question everyday
whitesky
|
|
|
|
|
I think he needs something like a toolbar / dialogbar that docks at the bottom.
|
|
|
|
|
he asked this question yesterday and i guess he needs to irregular window
whitesky
|
|
|
|
|
yes sir i want same as you understand the dialogbar/toolbar
and i want to place button on that
Ashish Dogra
MCA
Noida
-- modified at 4:23 Friday 7th July, 2006
|
|
|
|
|
1) Insert a dialog bar resource
2) Create a CDialogBar object in your CMainFrame class
3) Inside CMainFrame::OnCreate(...) , create your dialog bar as below
if(m_wndDialogBar.Create(this, IDD_DIALOGBAR, WS_CHILD | WS_VISIBLE | CBRS_BOTTOM, IDD_DIALOGBAR) == false)
return -1;
...
m_wndDialogBar.EnableDocking(CBRS_ALIGN_BOTTOM);
...
DockControlBar(&m_wndDialogBar);
|
|
|
|
|
thanks sir
but i am using Dialog based in mfc not SDI
and sir i want to add dialob bar at the bottom and remove it from dialog's upper side
thanks
Ashish Dogra
MCA
Noida
|
|
|
|
|
ashish dogra wrote: remove it from dialog's upper side
If by upper side you mean the title bar, you can just remove it in the Title bar property of your dialog
ashish dogra wrote: but i am using Dialog based in mfc not SDI
Isn't that easier? If you want it to look like a dialog bar at the bottom, just drag a group box control and place it at the bottom. Modify the styles if you need to. Now place your buttons or whatever in it. Doesn't it look like a dialog bar now?
|
|
|
|
|
thanks sir
can i change the color of groupbox with ctlcolor function
tellme and if i change this then tell me what i can write on GROUPBOX
if(nCtlColor == CTLCOLOR_GROUPBOX )
{
hbr=CreateSolidBrush(RGB(0,100,0));
pDC->SetTextColor(RGB(0,0,255));
pDC->SetBkColor(RGB(0,100,0));
}
Ashish Dogra
MCA
Noida
|
|
|
|
|
If you wanna do all these color customization, i suggest you create a class derived from CStatic and do it in there. Then in your dialog, place a static control and subclass it with the class you just created.
|
|
|
|
|
thanks a lot
Ashish Dogra
MCA
Noida
|
|
|
|
|
one another question and i answerd use SetWindowText and save previous values
Did you saw my message yesterday
whitesky
|
|
|
|
|
WhiteSky wrote: Did you saw my message yesterday
Sorry, dont think so.
|
|
|
|
|
oh no I'm sorry you get my message instead ashish dogra Mr Weiye Chen
whitesky
|
|
|
|
|
for add button
in Function OnInitDialog()
{
CButton myButton1, myButton2, myButton3, myButton4;
// Create a push button.
myButton1.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,
CRect(10,10,100,30), this, 1);
// Create a radio button.
myButton2.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_RADIOBUTTON,
CRect(10,40,100,70), this, 2);
// Create an auto 3-state button.
myButton3.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_AUTO3STATE,
CRect(10,70,100,100), this, 3);
// Create an auto check box.
myButton4.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,
CRect(10,100,100,130), this, 4);
}
Huynhnb
.: Your success is also me :.
|
|
|
|
|
ashish dogra wrote: Message Deleted] \
Message deletion is crime here!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ThatsAlok wrote: Message deletion is crime here!
Why so? Why do we have a delete option then? Its his message, after all. I think he can delete it if he wants to do so.
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
It is generally considered to be bad form. Others cannot benefit from the question and answers if the messages get deleted.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|
|
brahmma wrote: Why so? Why do we have a delete option then? Its his message, after all. I think he can delete it if he wants to do so.
Somebody respond before me.. so you got the answer is that Ok!, anyway what rae you doing so back!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hai everybody
here i have a problem in my project ,taht i want display specified port number is running or fail.
so plz kindely anybody help me.
#sankar#
|
|
|
|
|
can be more specific.
ram.
|
|
|
|
|
when i give the port number then it says whether that port number is running or not plz give me reply
#sankar#
-- modified at 3:48 Friday 7th July, 2006
|
|
|
|
|