Changing the IDCANCEL button to a IDCLOSE button on a propertysheet, taking localization into account
up vote
0
down vote
favorite
This might sound like a dumb question. I know that CMFCPropertyPage
has a CancelToClose
method but I can't find similar for the sheet object.
I basically want the Cancel button to be "Close" at all times and was hoping to do it in the sheet object.
Is the only way to do this by calling CancelToClose
in each of the pages?
I read this and now realise it is not want I want anyway.
This is what I want on my sheet:
- A custom Preview button.
- A Close button.
The preview button will be to the left side of the close button. I have found a tutorial about adding a custom button.
For the Close button I am not sure what to do.
Update
So, at the moment I have:
So it has the custom button (where the existing hidden IDOK
button is located). And it has the IDCANCEL
button. But I want the button to be "Close".
I know I can use SetWindowText
but I am thinking about localization so I wondered what the best way is.
propertysheet
add a comment |
up vote
0
down vote
favorite
This might sound like a dumb question. I know that CMFCPropertyPage
has a CancelToClose
method but I can't find similar for the sheet object.
I basically want the Cancel button to be "Close" at all times and was hoping to do it in the sheet object.
Is the only way to do this by calling CancelToClose
in each of the pages?
I read this and now realise it is not want I want anyway.
This is what I want on my sheet:
- A custom Preview button.
- A Close button.
The preview button will be to the left side of the close button. I have found a tutorial about adding a custom button.
For the Close button I am not sure what to do.
Update
So, at the moment I have:
So it has the custom button (where the existing hidden IDOK
button is located). And it has the IDCANCEL
button. But I want the button to be "Close".
I know I can use SetWindowText
but I am thinking about localization so I wondered what the best way is.
propertysheet
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This might sound like a dumb question. I know that CMFCPropertyPage
has a CancelToClose
method but I can't find similar for the sheet object.
I basically want the Cancel button to be "Close" at all times and was hoping to do it in the sheet object.
Is the only way to do this by calling CancelToClose
in each of the pages?
I read this and now realise it is not want I want anyway.
This is what I want on my sheet:
- A custom Preview button.
- A Close button.
The preview button will be to the left side of the close button. I have found a tutorial about adding a custom button.
For the Close button I am not sure what to do.
Update
So, at the moment I have:
So it has the custom button (where the existing hidden IDOK
button is located). And it has the IDCANCEL
button. But I want the button to be "Close".
I know I can use SetWindowText
but I am thinking about localization so I wondered what the best way is.
propertysheet
This might sound like a dumb question. I know that CMFCPropertyPage
has a CancelToClose
method but I can't find similar for the sheet object.
I basically want the Cancel button to be "Close" at all times and was hoping to do it in the sheet object.
Is the only way to do this by calling CancelToClose
in each of the pages?
I read this and now realise it is not want I want anyway.
This is what I want on my sheet:
- A custom Preview button.
- A Close button.
The preview button will be to the left side of the close button. I have found a tutorial about adding a custom button.
For the Close button I am not sure what to do.
Update
So, at the moment I have:
So it has the custom button (where the existing hidden IDOK
button is located). And it has the IDCANCEL
button. But I want the button to be "Close".
I know I can use SetWindowText
but I am thinking about localization so I wondered what the best way is.
propertysheet
propertysheet
edited 2 days ago
asked 2 days ago
Andrew Truckle
4,67131943
4,67131943
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
This is how I ended up resolving this issue. I now call this code from CMFCPropertySheet::OnInitDialog()
:
void CVisitsRotaPropertySheet::SetupButtons()
WS_TABSTOP, rctOK, this, IDC_BUTTON_PREVIEW);
m_btnPreview.SetFont(GetFont());
The above code adjusts the buttons as I desire. Then, in my CMFCPropertyPage::OnInitDialog()
handlers I call CancelToClose()
.
The result:
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
This is how I ended up resolving this issue. I now call this code from CMFCPropertySheet::OnInitDialog()
:
void CVisitsRotaPropertySheet::SetupButtons()
WS_TABSTOP, rctOK, this, IDC_BUTTON_PREVIEW);
m_btnPreview.SetFont(GetFont());
The above code adjusts the buttons as I desire. Then, in my CMFCPropertyPage::OnInitDialog()
handlers I call CancelToClose()
.
The result:
add a comment |
up vote
0
down vote
accepted
This is how I ended up resolving this issue. I now call this code from CMFCPropertySheet::OnInitDialog()
:
void CVisitsRotaPropertySheet::SetupButtons()
WS_TABSTOP, rctOK, this, IDC_BUTTON_PREVIEW);
m_btnPreview.SetFont(GetFont());
The above code adjusts the buttons as I desire. Then, in my CMFCPropertyPage::OnInitDialog()
handlers I call CancelToClose()
.
The result:
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
This is how I ended up resolving this issue. I now call this code from CMFCPropertySheet::OnInitDialog()
:
void CVisitsRotaPropertySheet::SetupButtons()
WS_TABSTOP, rctOK, this, IDC_BUTTON_PREVIEW);
m_btnPreview.SetFont(GetFont());
The above code adjusts the buttons as I desire. Then, in my CMFCPropertyPage::OnInitDialog()
handlers I call CancelToClose()
.
The result:
This is how I ended up resolving this issue. I now call this code from CMFCPropertySheet::OnInitDialog()
:
void CVisitsRotaPropertySheet::SetupButtons()
WS_TABSTOP, rctOK, this, IDC_BUTTON_PREVIEW);
m_btnPreview.SetFont(GetFont());
The above code adjusts the buttons as I desire. Then, in my CMFCPropertyPage::OnInitDialog()
handlers I call CancelToClose()
.
The result:
answered yesterday
Andrew Truckle
4,67131943
4,67131943
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53225057%2fchanging-the-idcancel-button-to-a-idclose-button-on-a-propertysheet-taking-loca%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password