コード例 #1
0
bool AP_Win32Dialog_Latex::getLatexFromGUI(void)
{
	char buffer[2048]; // TODO: FIXME: BAD BAD FIXED LENGTH
	UT_UTF8String sLatex;

	getControlText(AP_RID_DIALOG_LATEX_EDIT_LATEX, (LPSTR) buffer, 2048);
	sLatex = AP_Win32App::s_fromWinLocaleToUTF8(buffer);
	
	UT_DEBUGMSG(("LaTeX from widget is %s \n",sLatex.utf8_str()));
	setLatex(sLatex);
		
	return true;
}
コード例 #2
0
BOOL AP_Win32Dialog_InsertHyperlink::_onCommand(HWND hWnd, WPARAM wParam, LPARAM /*lParam*/)
{
	WORD wId = LOWORD(wParam);

	switch (wId)
	{
	case IDCANCEL:
		setAnswer( a_CANCEL );
		EndDialog(hWnd,0);
		return 1;

	case IDOK:
		{
			char buf[PATH_MAX];
			getControlText( AP_RID_DIALOG_INSERTHYPERLINK_EBX_LINK,
                			buf,
                            PATH_MAX );
			setHyperlink(buf);
		}
		setAnswer( a_OK );
		EndDialog(hWnd, 0);
		return 1;

	case AP_RID_DIALOG_INSERTHYPERLINK_LBX_LINK:
		{
			UT_sint32 result = getListSelectedIndex( wId );
			if( result != LB_ERR )
			{
				char buf[PATH_MAX];
				getListText( wId, result, buf );
				setControlText(AP_RID_DIALOG_INSERTHYPERLINK_EBX_LINK, buf);
			}
		}
		return 1;

	default:							// we did not handle this notification
		UT_DEBUGMSG(("WM_Command for id %ld\n",wId));
		return 0;						// return zero to let windows take care of it.
	}
}