Mercurial > dwindows
comparison win/dw.c @ 522:29547598b909
For whatever reason the new WS_EX_MDICHILD method is not working properly,
the MDI child windows won't take focus. But the old SetParent() method
seems to work properly, so reverting to the old code for now.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 16 Mar 2004 08:23:04 +0000 |
parents | caa7ed17c132 |
children | d3ce0afa6cf5 |
comparison
equal
deleted
inserted
replaced
521:e3d6f2aac90c | 522:29547598b909 |
---|---|
3773 newbox->pad = 0; | 3773 newbox->pad = 0; |
3774 newbox->type = DW_VERT; | 3774 newbox->type = DW_VERT; |
3775 newbox->count = 0; | 3775 newbox->count = 0; |
3776 newbox->cinfo.fore = newbox->cinfo.back = -1; | 3776 newbox->cinfo.fore = newbox->cinfo.back = -1; |
3777 | 3777 |
3778 /* Hmm, the "correct" way doesn't seem to be | |
3779 * working, but the old hackish SetParent() | |
3780 * at the bottom seems to work, so I'll leave | |
3781 * it like this for now. | |
3782 */ | |
3783 #if 0 | |
3778 if(hwndOwner) | 3784 if(hwndOwner) |
3779 flStyleEx |= WS_EX_MDICHILD; | 3785 flStyleEx |= WS_EX_MDICHILD; |
3786 #endif | |
3780 | 3787 |
3781 if(!(flStyle & WS_CAPTION)) | 3788 if(!(flStyle & WS_CAPTION)) |
3782 flStyle |= WS_POPUPWINDOW; | 3789 flStyle |= WS_POPUPWINDOW; |
3783 | 3790 |
3784 if(flStyle & DW_FCF_TASKLIST) | 3791 if(flStyle & DW_FCF_TASKLIST) |
3795 hwndframe = CreateWindowEx(flStyleEx, ClassName, title, flStyle | WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, | 3802 hwndframe = CreateWindowEx(flStyleEx, ClassName, title, flStyle | WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, |
3796 CW_USEDEFAULT, CW_USEDEFAULT, hwndOwner, NULL, DWInstance, NULL); | 3803 CW_USEDEFAULT, CW_USEDEFAULT, hwndOwner, NULL, DWInstance, NULL); |
3797 } | 3804 } |
3798 SetWindowLongPtr(hwndframe, GWLP_USERDATA, (LONG_PTR)newbox); | 3805 SetWindowLongPtr(hwndframe, GWLP_USERDATA, (LONG_PTR)newbox); |
3799 | 3806 |
3800 #if 0 | |
3801 if(hwndOwner) | 3807 if(hwndOwner) |
3802 SetParent(hwndframe, hwndOwner); | 3808 SetParent(hwndframe, hwndOwner); |
3803 #endif | |
3804 | 3809 |
3805 return hwndframe; | 3810 return hwndframe; |
3806 } | 3811 } |
3807 | 3812 |
3808 /* | 3813 /* |