|
Make sure that all the page dialogs are having both DS_CONTROL and WS_EX_CONTROLPARENT styles.
|
|
|
|
|
ok is there any function to activate the dialog
|
|
|
|
|
You mean CPropertySheet::SetActivePage ???
|
|
|
|
|
No i created a dialog on that i created pages
so i need to set the dialog active not sheet
|
|
|
|
|
Hello,
i use this control in dialog based application and i want to assign a CString value to them!
I mean, show html content without calling .Navigate(...);
CString csHtmlContent = L"<html><body>some very large text</body></html>";
CWebBrowserCtrl2 cWeb;
Is that possible, any suggestion for this problem?
It can be any other control who can show html content!
Thanks for any help!
termal
|
|
|
|
|
You can write the HTML text into a temporary file and open that file in your web control using Navigate method by prefixing file:// in its URL.
cheers
Varghese Paul
|
|
|
|
|
Hi,
thanks for answer, that is what i try to avoid, temporary file!
regards
termal
|
|
|
|
|
Some thing like this,
CComPtr<IDispatch> pDispDoc;
CComVariant spVar(_T("about:blank"));
m_Explorer.Navigate2(&spVar, 0, 0, 0, 0);
<br>
pDispDoc = m_Explorer.get_Document();
CComQIPtr<IHTMLDocument2> spDoc(pDispDoc);
VARIANT *param;
<big>CComBSTR spbStrHtmlText(OLESTR("<html><body>some very large text</body></html>"));</big> SAFEARRAY * psfArray = SafeArrayCreateVector(VT_VARIANT, 0, 1);
SafeArrayAccessData(psfArray,(LPVOID*) & param);
param->vt = VT_BSTR;
param->bstrVal = spbStrHtmlText;
SafeArrayUnaccessData(psfArray);
<big>spDoc->write(psfArray);</big>
SafeArrayDestroy(psfArray);</br>
See also [IHTMLElement::innerHTML ^]
And have a look at IHTMLDom objects to have more controls over internal html nodes.
|
|
|
|
|
Hello,
yes that is what i need, and thanks very much for help!!!
And thanks for the link!
with best regards
termal
|
|
|
|
|
Hello,
i have just one little question about this, if i try to show next html content, that is append to existing content, so i have two sites showed in this control!
I think i should before i show next content, clear the existing text, but how, can you help me again with that?
regards
termal
|
|
|
|
|
Hi,
i solved my problem!
termal
|
|
|
|
|
Hi,
struct Boxinfo
{
int userid;
char username[255];
};
if ((Boxinfo_ptr =(struct Boxinfo *) malloc(sizeof(struct Boxinfo))) == 0)
{
exit(1);
}
EXEC SQL FETCH customerinfo INTO: Boxinfo_ptr;
cout<<Boxinfo_ptr->userid;
cout<<Boxinfo_ptr->username;
here i have fetch the record from database two field then load to struct object Boxinfo_ptr no problem. also successfully i have got the value of userid and username .
My problem is Boxinfo_ptr->username is given the extra space .
that is suppose charter is "hello" for cout<<Boxinfo_ptr->username this output is "hello " it is simple print hello+200 space;
so how to avoid 200 space.
example:
input:
userid=100;
username="hello";
output:
userid=100;
username="hello "
How to avoid space for username char array.
please replay me as soon as possible
Thanks
|
|
|
|
|
The reason it gives you 200 spaces may be because of the field properties you have set in your database. You might have set it as fixed length string field of size 255. Try to make it a variable length string field.
cheers
Varghese Paul
|
|
|
|
|
Not possible to set variable length string because database object is return struct variable with fixed length character using pro*C.
suppose i have try to declare structure member variable like character pointer or void pointer when
it return memory leak . I have developed this application using Pro *C language.
|
|
|
|
|
Not possible to set variable length string because database object is return struct variable with fixed length character using pro*C.
suppose i have try to declare structure member variable like character pointer or void pointer when
it return memory leak . I have developed this application using Pro *C language.
|
|
|
|
|
Is this a case of split personallity or did you just change your name
Bram van Kampen
|
|
|
|
|
Hi,
I have created a User Interface which has a Help Menu in that i have USER Manual as submenu, when i click on User Manual sub menu it has to open an existing word document which contains details of how to use the User Interface. UI has been developed using MS VC++ .Please help me out.
Thanks in advance
|
|
|
|
|
ShellExecute(NULL, "open", "pathToYourDocFile", NULL, NULL, SW_SHOWNORMAL);
See info on parameters here: MSDN: ShellExecute[^]
|
|
|
|
|
Thanks
I used the code sent by you but it not opening the document. Below is the code
void CNUITApp::OnHelpUsermanual()
{
ShellExecute(NULL, "open", "C:\\Doc1", NULL, NULL, SW_SHOWNORMAL);
// TODO: Add your command handler code here
AfxMessageBox(_T("Feature not available gg"),MB_OK|MB_ICONINFORMATION);
}
|
|
|
|
|
Is your file really called "Doc1" ?
I suggest you use the following line:
Pre Office 2007
ShellExecute(NULL, "open", "C:\\Doc1.doc", NULL, NULL, SW_SHOWNORMAL);
or
Office 2007
ShellExecute(NULL, "open", "C:\\Doc1.docx", NULL, NULL, SW_SHOWNORMAL);
|
|
|
|
|
office 2003 is loaded in the system.
I will be giving only the exe to the customer, so we specify the path like this then we need to keep on changing the path where ever the document is copied. How to ovecome with this issue?
|
|
|
|
|
Just use a relative path.
E.g
AppFolder
|
|--FolderA
|--FolderB
\--Help
if exe is located in AppFolder, and .DOC file is in Help folder:
ShellExecute(NULL, "open", "Help\\YourFile.doc", NULL, NULL, SW_SHOWNORMAL);
if exe is located in FolderA, and .DOC file is in AppFolder:
ShellExecute(NULL, "open", "..\\YourFile.doc", NULL, NULL, SW_SHOWNORMAL);
|
|
|
|
|
Thanks u vey much
Its working
The problem was path of the file
Thanks once again
|
|
|
|
|
Pleasure.
|
|
|
|
|
Hi all,
LPMALLOC pMalloc = NULL;
LPITEMIDLIST pidl = NULL;
BROWSEINFO bi;
ZeroMemory(&bi, sizeof(BROWSEINFO));
bi.hwndOwner = m_hWnd;
bi.lpszTitle = _T("Current folder is:");
bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT;
bi.lpfn = BrowseCallbackProc;
pidl = SHBrowseForFolder(&bi);
if(pidl != NULL)
{
SHGetPathFromIDList(pidl, m_strFolderPath.GetBuffer(m_strFolderPath.GetLength()));
UpdateData(FALSE);
if(SUCCEEDED(SHGetMalloc(&pMalloc)) && pMalloc);
pMalloc->Free(pidl);
pMalloc->Release();
}
i m using this for browse for folder,the out of memory exexption occur when select any folder.
please help me for this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|