Click here to Skip to main content
15,888,521 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDynamic loading of buttons Pin
JensB12-May-03 4:33
JensB12-May-03 4:33 
GeneralRe: Dynamic loading of buttons Pin
David Crow12-May-03 4:38
David Crow12-May-03 4:38 
GeneralRe: Dynamic loading of buttons Pin
JensB12-May-03 4:43
JensB12-May-03 4:43 
GeneralRe: Dynamic loading of buttons Pin
David Crow12-May-03 5:06
David Crow12-May-03 5:06 
GeneralRe: Dynamic loading of buttons Pin
basementman12-May-03 5:23
basementman12-May-03 5:23 
GeneralRe: Dynamic loading of buttons Pin
David Crow12-May-03 5:56
David Crow12-May-03 5:56 
GeneralCPropertySheet Pin
RalfPeter12-May-03 4:23
RalfPeter12-May-03 4:23 
GeneralRe: CPropertySheet Pin
JensB12-May-03 4:30
JensB12-May-03 4:30 
hi RalfPeter

You can't access the help button on the property sheet because you can't see the form, and that's pretty ennoying.

Doesn't it work when you add 'OnHelp' (message map) @ header file propsheet?

afx_msg void OnHelp();

void CMyPropSheet::OnHelp()
{
AfxMessageBox("onhelp");
}


Hope this works.


Just Modified
I fixed the problem by not using the standard help button but i created the button myself.

OnInitDialog:
CRect rect, tabrect;

//Get button sizes and positions
GetDlgItem(IDOK)->GetWindowRect(rect);
GetTabControl()->GetWindowRect(tabrect);
ScreenToClient(rect);ScreenToClient(tabrect);

int iWidth = rect.Width();
rect.left = tabrect.left;
rect.right = tabrect.left + iWidth;

m_ButtonHelp.Create("&Help",BS_PUSHBUTTON|WS_CHILD|WS_VISIBLE|WS_TABSTOP, rect, this, IDC_BUTTON_HELP);
//add IDC_BUTTON_HELP in RESOURCE.H yourself!!
m_ButtonHelp.SetFont(GetFont());

This creates the button + positions it correctly.
Then work with the previous code to catch the onclick.

Greetings
Jens
GeneralRe: CPropertySheet Pin
David Crow12-May-03 4:36
David Crow12-May-03 4:36 
Generalsimple virtual method design q. Pin
Maximilien12-May-03 4:06
Maximilien12-May-03 4:06 
GeneralRe: simple virtual method design q. Pin
G. Steudtel12-May-03 4:42
G. Steudtel12-May-03 4:42 
GeneralCompile error c2664 Pin
Claude Gagnon12-May-03 3:56
Claude Gagnon12-May-03 3:56 
GeneralRe: Compile error c2664 Pin
David Crow12-May-03 4:29
David Crow12-May-03 4:29 
GeneralRe: Compile error c2664 Pin
Claude Gagnon12-May-03 4:42
Claude Gagnon12-May-03 4:42 
GeneralRe: Compile error c2664 Pin
G. Steudtel12-May-03 4:51
G. Steudtel12-May-03 4:51 
GeneralRe: Compile error c2664 Pin
Jason Henderson12-May-03 7:00
Jason Henderson12-May-03 7:00 
GeneralUsing Updated Interface Pin
swarup12-May-03 3:17
swarup12-May-03 3:17 
QuestionFix SQLStatement error ? Pin
_skidrow_vn_12-May-03 3:14
_skidrow_vn_12-May-03 3:14 
AnswerRe: Fix SQLStatement error ? Pin
basementman12-May-03 5:28
basementman12-May-03 5:28 
QuestionHow can I use system cmd without opening console? Pin
YanivNahum12-May-03 3:11
YanivNahum12-May-03 3:11 
AnswerRe: How can I use system cmd without opening console? Pin
swarup12-May-03 3:31
swarup12-May-03 3:31 
AnswerRe: How can I use system cmd without opening console? Pin
David Crow12-May-03 3:44
David Crow12-May-03 3:44 
Answerthanks swarup & DavidCrow - great help Pin
YanivNahum12-May-03 4:20
YanivNahum12-May-03 4:20 
GeneralAdobe Acrobat ActiveX Control Pin
Poul Haahr Klemmensen12-May-03 2:17
Poul Haahr Klemmensen12-May-03 2:17 
GeneralRe: Adobe Acrobat ActiveX Control Pin
Paul Selormey12-May-03 4:27
Paul Selormey12-May-03 4:27 

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.