|
|
From the MSDN Help:
CComboBox::LimitText
BOOL LimitText( int nMaxChars );
Return Value
Nonzero if successful. If called for a combo box with the style CBS_DROPDOWNLIST or for a combo box without an edit control, the return value is CB_ERR.
Parameters
nMaxChars
Specifies the length (in bytes) of the text that the user can enter. If this parameter is 0, the text length is set to 65,535 bytes.
Remarks
Limits the length in bytes of the text that the user can enter into the edit control of a combo box.
If the combo box does not have the style CBS_AUTOHSCROLL, setting the text limit to be larger than the size of the edit control will have no effect.
LimitText only limits the text the user can enter. It has no effect on any text already in the edit control when the message is sent, nor does it affect the length of the text copied to the edit control when a string in the list box is selected.
Hope it helps
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Thanks all,
I am new to VC++.Trying to set that property but not able to do so.
Dana
|
|
|
|
|
hi,
in advance thanks to look my problem,
i am executing pushsource program which is in platform sdk. i am getting some errors while linking. i dont know what to do i have already included strmbasd.lib in the project library and the path is also set.
can any one help me how to get rid of this errors.
the following errors i am getting.
Linking...
LINK : fatal error LNK1221: a subsystem can't be inferred and must be defined
PushSource - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
can any one help me how to solve it.
amiya kumar das
|
|
|
|
|
Hi all,
How can I perform the following actions programmatically ?
Perform the 'Open Containing Folder' action as when one right clicks on a searched fileShow the properties window of a fileCreate a shortcut to a fileMany Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
|
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.
|
|
|
|