3m corrections (probably needed due to relatively recent bug fixes in 3m xform)

svn: r4210
This commit is contained in:
Matthew Flatt 2006-09-01 05:45:29 +00:00
parent a7e963c362
commit 88509cf517
7 changed files with 29 additions and 13 deletions

View File

@ -46,12 +46,14 @@ wxbPanel::~wxbPanel(void)
wxObject* wxbPanel::GetChild(int number)
{
wxChildNode *node;
wxChildList *childs;
// Return a pointer to the Nth object in the Panel
if (!children)
return(NULL);
node = GetChildren()->First();
childs = GetChildren();
node = childs->First();
while (node && number--) {
node = node->Next();
}

View File

@ -413,10 +413,12 @@ Bool wxChoice::Show(Bool show)
{
HWND wnd = (HWND)ms_handle;
int cshow;
wxChildList *childs;
SetShown(show);
window_parent->GetChildren()->Show(this, show);
childs = window_parent->GetChildren();
childs->Show(this, show);
if (show)
cshow = SW_SHOW;

View File

@ -2065,9 +2065,11 @@ Bool wxDC::StartDoc(char *message)
docinfo.lpszOutput = filename;
docinfo.lpszDatatype = NULL;
docinfo.fwType = 0;
if (cdc)
flag = (SP_ERROR != ::StartDoc(cdc, &docinfo));
else
if (cdc) {
int res;
res = ::StartDoc(cdc, &docinfo);
flag = (SP_ERROR != res);
} else
flag = FALSE;
return flag;

View File

@ -170,10 +170,12 @@ Bool wxItem::Show(Bool show)
{
HWND wnd = (HWND)ms_handle;
int cshow;
wxChildList *childs;
SetShown(show);
window_parent->GetChildren()->Show(this, show);
childs = window_parent->GetChildren();
childs->Show(this, show);
if (show)
cshow = SW_SHOW;

View File

@ -623,9 +623,11 @@ Bool wxListBox::Show(Bool show)
{
HWND wnd = (HWND)ms_handle;
int cshow;
wxChildList *childs;
SetShown(show);
window_parent->GetChildren()->Show(this, show);
childs = window_parent->GetChildren();
childs->Show(this, show);
if (show)
cshow = SW_SHOW;
else

View File

@ -682,10 +682,12 @@ Bool wxRadioBox::Show(Bool show)
{
int cshow;
int i;
wxChildList *childs;
SetShown(show);
window_parent->GetChildren()->Show(this, show);
childs = window_parent->GetChildren();
childs->Show(this, show);
if (show)
cshow = SW_SHOW;
@ -706,8 +708,9 @@ void wxRadioBox::Enable(int item, Bool enable)
{
if (item >= 0 && item < no_items) {
buttonEnabled[item] = enable;
if (!IsGray())
if (!IsGray()) {
::EnableWindow(radioButtons[item], enable);
}
}
}
@ -723,10 +726,11 @@ void wxRadioBox::ChangeToGray(Bool gray)
wxWindow::ChangeToGray(gray);
for (i = 0; i < no_items; i++) {
if (gray)
if (gray) {
::EnableWindow(radioButtons[i], FALSE);
else
} else {
::EnableWindow(radioButtons[i], buttonEnabled[i]);
}
}
}

View File

@ -432,10 +432,12 @@ void wxWindow::GetPosition(int *x, int *y)
HWND hParentWnd = 0;
RECT rect;
POINT point;
wxWindow *par;
hWnd = GetHWND();
if (GetParent())
hParentWnd = GetParent()->GetHWND();
par = GetParent();
if (par)
hParentWnd = par->GetHWND();
GetWindowRect(hWnd, &rect);