user3830155
user3830155

Reputation: 15

How to create a frame less Dialog box?

My goal is to create a frame-less dialog box using MFC, which are plain rectangle like shown in the image,i have basic knowledge of MFC applications.and dialog box,can you please provide some links for the same.

enter image description here

Upvotes: 1

Views: 2515

Answers (1)

Himanshu
Himanshu

Reputation: 4395

Copy this code

//Oninitdialog()

LONG lStyle = GetWindowLong(m_hWnd, GWL_STYLE);
lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
SetWindowLong(m_hWnd, GWL_STYLE, lStyle);

Second way
Select you Dialog->properties->Border->None

Upvotes: 3

Related Questions