Click here to Skip to main content
16,006,531 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual Studio Pointer Help.. Pin
keb13-May-03 13:03
keb13-May-03 13:03 
GeneralRe: Visual Studio Pointer Help.. Pin
John R. Shaw13-May-03 12:42
John R. Shaw13-May-03 12:42 
Generalmodeless Dlg Pin
MemLeak13-May-03 9:36
MemLeak13-May-03 9:36 
GeneralRe: modeless Dlg Pin
Anonymous13-May-03 10:26
Anonymous13-May-03 10:26 
GeneralRe: modeless Dlg Pin
MAAK13-May-03 21:25
MAAK13-May-03 21:25 
GeneralRe: modeless Dlg Pin
MAAK13-May-03 21:32
MAAK13-May-03 21:32 
GeneralRe: modeless Dlg Pin
Neville Franks13-May-03 23:28
Neville Franks13-May-03 23:28 
GeneralRegion Pin
MemLeak13-May-03 8:12
MemLeak13-May-03 8:12 
Hi,

Here is my problem. I want to give a non-rectangular shape to my dialogbar. So I created a dialog ressource, a CDialogBar derived class and I created my dialog into my CMainFrame class.

In my CDialogBar derived class, I overide OnCreate():

int MyDlgBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialogBar::OnCreate(lpCreateStruct) == -1)
return -1;

// Create a 'CRgn' object
CRgn rgn;
CRect rect;
GetWindowRect(&rect);

rgn.CreateEllipticRgnIndirect(&rect);

// Set the windows region
SetWindowRgn((HRGN)rgn.GetSafeHandle(), TRUE);

// Detach the 'CRgn' object from the region or else the
// 'CRgn' destructor would close the 'HRGN' handle when 'rgn'
// goes out of scope
rgn.Detach();

return 0;
}

The problem is that I can see the shape that I wanted, but the areas where I'm suppose to see the App Background, are not refreshed. I see my desktop unstead.

any ideas?

Thanks;)

Everything's beautiful if you look at it long enough...
GeneralRe: Region Pin
rochmad13-May-03 8:31
rochmad13-May-03 8:31 
GeneralRe: Region Pin
MemLeak13-May-03 8:51
MemLeak13-May-03 8:51 
GeneralRe: Region Pin
John R. Shaw13-May-03 12:58
John R. Shaw13-May-03 12:58 
GeneralDrag & Drop Pin
Mazdak13-May-03 7:38
Mazdak13-May-03 7:38 
GeneralMS DataGrid Control Pin
Lobster B13-May-03 6:59
Lobster B13-May-03 6:59 
GeneralBest Software For Printing Out Code Pin
Mike O'Neill13-May-03 6:23
Mike O'Neill13-May-03 6:23 
GeneralRe: Best Software For Printing Out Code Pin
Neville Franks13-May-03 7:23
Neville Franks13-May-03 7:23 
GeneralImageList_Read & ImageList_Write functions... Pin
Guy Lecomte13-May-03 5:37
Guy Lecomte13-May-03 5:37 
GeneralCRecentFileList Pin
dings13-May-03 5:28
dings13-May-03 5:28 
GeneralCRecentFileList Pin
dings13-May-03 5:21
dings13-May-03 5:21 
GeneralOpening folders Pin
dave_long13-May-03 5:13
dave_long13-May-03 5:13 
GeneralRe: Opening folders Pin
valikac13-May-03 7:54
valikac13-May-03 7:54 
GeneralRe: Opening folders Pin
dave_long13-May-03 9:07
dave_long13-May-03 9:07 
GeneralRe: Opening folders Pin
J. Dunlap13-May-03 9:51
J. Dunlap13-May-03 9:51 
GeneralRe: Opening folders Pin
Hari Krishnan (Noida)13-May-03 17:05
Hari Krishnan (Noida)13-May-03 17:05 
GeneralRe: Opening folders Pin
dave_long13-May-03 22:09
dave_long13-May-03 22:09 
GeneralPassing a pointer to an array Pin
Tom Wright13-May-03 5:09
Tom Wright13-May-03 5:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.