Click to See Complete Forum and Search --> : WinHelp


Andrew
May 10th, 1999, 09:42 AM
Can anyone see why this snippet of code (usually from a CView-derived class) doesn't start up winhelp?

If I substitute the last line with this

bwh = ::WinHelp( m_hWnd, helpfile, HELP_CONTENTS, 0 );



then it works ok though.

Thanks In Advance

Andrew


LPHELPWININFO lphwi;
char* window_title = "Help Test";
int size = sizeof(HELPWININFO) + strlen(window_title);
lphwi = (LPHELPWININFO) new char[size];
lphwi->wStructSize = size;
lphwi->x = 400;
lphwi->y = 400;
lphwi->dx = 620;
lphwi->dy = 620;
lphwi->wMax = 1;
strcpy(lphwi->rgchMember, window_title);

BOOL bwh = ::WinHelp( m_hWnd, helpfile, HELP_SETWINPOS, (DWORD) lphwi );