|
|
Programm3r wrote: Why does this work:
explorer.exe /select, C:\MyDir\MySubDir\File.extension
And this does not
explorer.exe /select, C:\\MyDir\\MySubDir\\File.extension
because you're in the "Run..." windows, and not in your code, aren't you ?
the \ character is needed as the escapment character only in the source code, not in "running life"...
|
|
|
|
|
First tell me where r u using this ?? in your code and in adrees bar of window. It seems that u are writin it in adressbar of the window. otherwise The first one should not work and the second one should work.
WE are writing '\\' instead of '\' while assigning the string to distigunish it from escape sequence. I.e. '\n'represents next line.
|
|
|
|
|
GauranG033 wrote: First tell me where r u using this ?? in your code and in adrees bar of window. It seems that u are writin it in adressbar of the window. otherwise The first one should not work and the second one should work.
WE are writing '\\' instead of '\' while assigning the string to distigunish it from escape sequence. I.e. '\n'represents next line.
thanks for rephrasing my answer badly
moreover, you have a problem in you signature[^]. please close the html tags you open, because you're breaking the site's pages style.
|
|
|
|
|
I need to know which simple API function can i use to Check if some key exist in the registry and if it not exist in the registry then create it with some value that i need ( as default value ) ?
Thanks.
|
|
|
|
|
Use GetProfileString/GetProfileInt and WriteProfileString/WriteProfileInt functions for reading and writing string and integer values to retistry.
|
|
|
|
|
if RegOpenKeyEx() returns ERROR_SUCCESS then the key exists. You should then call RegCloseKey() after successful opening.
-Randor
|
|
|
|
|
I want to set the display of my xp desktop as grayscale. This means all the things will be visible in grayscale. It's same as if I were using monochrome monitor. As there is not option to set it, I m thinking to do it programmatically, but don't know where to start.
Could anyone please bounce some ideas on it ?
Thanks in advance.
NB++
|
|
|
|
|
hello to all,
i want to use "Navigate" function of CWebBrowser class which i have added as an activex control in my programm, this function should get called after clicking a perticular button of a dialog box.can anybody help me plz how to do it.
Anay Kulkarni
|
|
|
|
|
CString CPPath = "http://codeproject.com";
m_Browser.Navigate( CPPath, NULL, NULL, NULL, NULL );
|
|
|
|
|
CString CPPath = "http://codeproject.com";
m_Browser.Navigate( CPPath, NULL, NULL, NULL, NULL );
i tried this, but it is giving me an error, i think it is asking for a pointer rather that "NULL" to a frame which we should create to display the web site, how to do it?
Anay
|
|
|
|
|
Add Microsoft Web Browser ActiveX control to the resource.
Use class wizard to add a variable to that resource.
It will ask you to add a class first. Let it do that.
The variable m_Browser is added by using class wizard and it's working fine.
|
|
|
|
|
u better go for shellExecute functon
try this
|
|
|
|
|
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
|
|
|
|