|
yes! it worked, thanks a lot sir.
Anay
|
|
|
|
|
first create the control.
m_Browser.Create();
then call Navigate()
VARIANT flags;
flags.intVal = navNoHistory;
VARIANT TargetFrameName;
TargetFrameName.intVal = _BLANK;
m_Browser.Navigate("http://www.codeproject.com", &flags, &TargetFrameName, NULL, NULL);
|
|
|
|
|
Hi all,
This code below returns a value either "" or "anything"
however instead or returning "" it returns -1;
BSTR* MapiMessageEntity::GetPropUNICODE(LONG PropertyID)
{
BSTR* pRetVal;
pRetVal = 0;
if ((PROP_TYPE_MASK & PropertyID) != PT_UNICODE)
{
return 0;
}
redmap::mapi::FoundProperty prop
= m_Message->FindProperty(PropertyID);
if (prop.second)
{
pRetVal = reinterpret_cast<BSTR*>(prop.first.lpszW);
return (pRetVal);
}
else
{
pRetVal = reinterpret_cast<BSTR*>("");
return (pRetVal);
}
}
The above function is being called by
strSender = _bstr_t(MapiMessage->GetPropUNICODE(PR_SENDER_NAME_W));
Why does it return "-1" instead of just ""
Thanks,
Jj
|
|
|
|
|
You are using -
return 0;
and
pRetVal = reinterpret_cast("");
return (pRetVal);
I guess both (not sure about the first one) will return "" and not -1;
Also the return type is BSTR*. Are you sure it will return numeric values ?
|
|
|
|
|
i removed the return 0 because it is not needed however I am still getting "-1" not "". -1 is enclosed with "". I don't understand why
|
|
|
|
|
Even I get a content example "JJ" it still returns "-1". How is this possible?
|
|
|
|
|
monsieur_jj wrote: pRetVal = reinterpret_cast(prop.first.lpszW);
This is the line which is in error. Because you are performing a reinterpret_cast it will copy the pointer value but not correctly create the rest of the BSTR class, notably the length which occurs before the string array.
My solution would be to change the return type to the WIDE CHAR type the same as lpszW.
|
|
|
|
|
My program was crashed at realloc();
But I can indicate that there is enough memory on my computer!
Thanks.
GOOD LUCK.
|
|
|
|
|
you must have used alloc() for the realloc() memory or it crashes. I hope the realloc() memory block is valid.
Greetings from Germany
|
|
|
|
|
yes,I have found the error,now.
It really alloc a invalid memory.
Regards
|
|
|
|
|
kcynic wrote: I can indicate that there is enough memory on my computer!
on your computer yes, but maybe not enough allowed by the system to your process...
|
|
|
|
|
I want to make a desktop application exactly like webshot from scratch but dont know how to start.
If some one could give me link for such a project it would be of great help.
I want to use MFC.
Thanks In advance.
Dhiraj
Dhiraj kumar Saini
|
|
|
|
|
hi all
please tell me how to open microsoft word,exel using a button in vc++(MFC)
thanks
|
|
|
|
|
Use the function in thecommand handler of button submit.
Here Write.exe is the exe you want to execute.
WinExec("Write.exe", SW_MAXIMIZE);
|
|
|
|
|
use ShellCommand on button event to launch the desired application.
|
|
|
|
|
|
Hi
Accidentally i have added an action for File Folder. But i can't remove it, remove and edit are shown as disabled. How I removed that action.
the procedure i did was like
Tools->Folder Option->File Types -> select File Folder, Press Advanced and added new action
Thanks
Anil
|
|
|
|
|
Search the Action name you gave in registry under the key HKEY_CLASSES_ROOT.
The Application name should be there under command Key.
Delete the action Name key.
|
|
|
|
|
I am new to MFC. In my gui application I see that some of the controls are not visible. They become visible when I move the mouse cursor over them.
Thanks for the help....
|
|
|
|
|
Are these controls created as part of a dialog (from a resource) or are you creating them yourself?
If creating them yourself, from where in the code?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark,
I am creating the controls as a part of a dialog.
Let me know if you need any further information!
Thanks!!
|
|
|
|
|
hi
please check the visibilty property of each control
|
|
|
|
|
Do the controls overlap each other?
Or are you doing any painting (or drawing) in the dialog?
- NS -
|
|
|
|
|
Yes, the controls overlap each other. I have a list control which resides in a property page and the propertypage is display in a tab of a tab control.
|
|
|
|
|
Property pages should be in a property sheet, not a tab control.
For a dialog, if the controls are part of the dialog resource, you
shouldn't have to do anything to make controls appear unless they
are not created with the WS_VISIBLE style.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|