|
|
|
Hello Sir:
I am a student in China.
I use your proplist.ocx in my program, and I found it does not support Chinese. All the words written in Chinese is in disorder.
So, is there any method to solve this problem?
Thank you!
|
|
|
|
|
It works, now. Thank you. It is a good control which brings much convenience.
The method you provide in previous issue about Spanish support is right.
I enconter 38 errors as well.
And the steps to solve this problem are listed as following.
1. Download the source code of Proplist.ocx
2. Re-compile it, then 38 errors will be found.
3. Select Project--->settings--->c/c++--->category--->preprocessor
At the blank of Preprocessor definitions, remove _UNICODE.
4. Find the construction function of CMylist, replace the original charset with proper charset.
That's all.
Thanks, again!
|
|
|
|
|
Glad you sorted that out...
The control is a bit out dated to say the least and I have no intention of updating since .NET provides very nice PropertyGrid.
So any contribution that might help all the c++ and ActiveX guys is welcome...
Creative minds - create creative creations!
|
|
|
|
|
i am software engineer in Nozomi Infotech facing problem in using CList control in ActiveX so i get direction to search by your artical sir Thanks.
my id is anurag221188@gmail.com
|
|
|
|
|
Very nice!
Has anyone come up with a way to use the arrow keys instead of just the mouse to move thru the list. I haven't been able to find the entry in the source to modify the code for this behavior. I'm using VC++ 6.0
|
|
|
|
|
Hi There,
Is there a way to use SetValue to change the state of a combobox. I would like to change the property settings when different files are loaded. I know it is possible at the start using the AddProperty function, just not sure how use setValue in this instance.
Thanks
|
|
|
|
|
You must rebuild the activex PropList object after making some changes.
1. open class CComboItem in activex object`s project
2. replace body of SetValue(..) with
if (CListItem::SetValue(Value) == FALSE)
return FALSE;
if (IsWindow(m_hWnd))
SetCurSel(Value.intVal);
return TRUE;
Good luck!
|
|
|
|
|
First bugs which i encountered so far:
In the CEditItem::OnKillFocus procedure there is no check for bChange to call Apply, so Apply ist called even if u press Escape and KillFocus is called.
For people that have problems (i.e. the german üäöß) with the displayed Font, the main font (created in CMyList::CMyList()) uses the HEBREW_CHARSET, change that to the charset u need (in normal case ANSI_CHARSET should do it.
I have a special problem and dont know if it's me or better my App, the VS 2003 Compiler, or a "Bug" in the Control.
I use c++ and mfc and create the control at runtime which is no problem.
For that I created a wrapper class derived from CWnd(similar to the one in the sample project), in my window (no dialog), where the control should be placed, i have a member variable of that class, the Eventprocedures and create with CreateControl the Control.
No problems so far, the control is created, it fires the Events correctly etc. BUT, the Edit Controls dont get the VK_ESCAPE and VK_RETURN. All other keys are send to the Control.
My problem is now who takes the message and kills it.
Hierarchy is -> Mainfrm -> Propertybar(customwnd) -> Propertysheet(customwnd) -> Wrapperclass with Control if it helps.
I tried for hours and didnt get another solution as described down or found the one who kills the message and send it not to the Control.
My Solution was in the Wrapperclass:PretranslateMessage() i get the VK_ESCAPE & VK_RETURN message with the correct handle of the Control. So at this point I send it directly to the Control.
What i really dont understand is that in the Control i dont get ANY PretranslateMessage Calls in any of the windows/classes, is that COM related or why isnt it fired. Where can i get the Message before it's translated/dispatched ?!
Next problem is, that if i create it at runtime in my app if i press the Escapekey in a Multilineeditcontrol, all items,but the description, in the Control are killed, and a heavy exception is fired as soon as the Control losts the Focus o_O. The Returnkey doesnt do anything.
That happens with or without my Pretranslate"hack".
It seems like the behaviour of OnOK and OnCancel, the question is where.
So i think there is anything in the Control who dispatches or translate the Enter and Escape Key to the wrong place, but because no pretranslate is called i dont know where to get in and search for it.
The strange is, that the Control in an VisualBasic (6.0) app hasn't that behaviour and functions so as u expect it. Can anyone help ?
|
|
|
|
|
For the multylineedit some workaround, but no solution for the problem itself:
in CPropListCtrl::CPropListCtrl()
the fonts arent created with a proper Charset, with a Charset set to Ansi the problem with the return was solved, it now insert a newline. (Other method would be create the Multilinecontrol with ES_OEMCONVERT)
In the OnKeyDown Event of the CMultylineEdit you'll get the Escape key(and all other key events), if u return there and dont call the baseclass implementation, nothing will happen (and that really confuses me now, so if the Escape message is given to the baseclass all list items disappear ?!? wtf, i really dont understand that), so for the Escape button i return without calling __super::OnKeyDown(...);
|
|
|
|
|
That's great control. But I have some problem !
- I don't know how to change font at runtime
- How can I format date (dd/mm/yyyy or mm/dd/yyyy,..)
- Can I use spin to change date instead showing calendar to choose
Thanks very much .
|
|
|
|
|
It seems like it can only have two colunm, so how can I add new column.
I want to have something like that like
FirstName LastName IDNumber Date
========== ======== ======== =====
|
|
|
|
|
First of Thanks for creating such a useful tool.
Gr8 work u have done.
But I have one problem using it,if possible then plz answer as quick as possible.
Problem is : how to set value to Property whose type is ComboBox
By default I have the 1st value (etc "Unit1") in SAFEARRAY. But what can I do if I want to get for example "Unit3" during the initialization. How can I set SAFEARRAY value properly?
Please tell me about it?
Search: Articles Authors
Help! Articles Message Boards StoreFront Lounge
Premium Sponsor
All Topics MFC / C++ C# ASP.NET .NET
Site MapAdd To FavoritesCodeProject StuffWho's WhoTell a friendIndustry ContactsASP.NETManaged C++.NETSOAP and XMLVB.NETC++ Web Services.NET Compact FrameworkCross PlatformCombo & ListboxesMenus & ToolbarsC# ControlsC# ProgrammingMultimediaC# DatabaseC# WebServicesButton Co
|
|
|
|
|
I am sorry for answering only now, I havent been reading my e-mails for a while...
If I understood tour question correctly you are asking how to set the selected item in the combo box at the start... well if I am remember correctly , you set the buttontype parameter to integer that is the number of the selected item : ie:
AddProperty "Some Category", "Caption", stringArray, "Description", 5, TRUE
Item number 6 will be selected (items start from 0)
Creative minds - create creative creations!
|
|
|
|
|
I'm using this ActiveX in VC6 environment and my code looks as follows
<br />
<br />
resourceText.LoadString(IDS_ADMINTASK_USERLEVEL);<br />
<br />
status = NetWkstaUserEnum(NULL, 1, reinterpret_cast<PBYTE*>(&pWkstaUserInfo),<br />
MAX_PREFERRED_LENGTH, &entriesread, &totalentries, NULL);<br />
if(status != NERR_Success)<br />
{<br />
PrintNetApiError(status);<br />
throw status;<br />
}<br />
<br />
secLevels[0] = ::SysAllocString(L"Allow");<br />
secLevels[1] = ::SysAllocString(L"Deny");<br />
secLevels[2] = ::SysAllocString(L"Monitor");<br />
secLevels[3] = ::SysAllocString(L"Undefined""); <br />
saSecLevels.CreateOneDim(VT_BSTR, 4, secLevels);<br />
<br />
for(unsigned i = 0; i < entriesread; i++)<br />
{<br />
fullName.Format(L"%s\\%s", pWkstaUserInfo[i].wkui1_logon_domain, <br />
pWkstaUserInfo[i].wkui1_username);<br />
propUserLevel.AddProperty(resourceText, fullName, saSecLevels, _T(""), ButtonNone, true);<br />
}<br />
<br />
By default I have the 1st value (etc "Allow"). But what can I do if I want to get for example "Undefined" during the initialization. How can I set SAFEARRAY value properly?
Please tell me about it?
|
|
|
|
|
Brilliant!!
My problem is that when I creating a control. I would like to set a property one of a set amount of states (BorderStyle in your case)
BorderNone = 0 - No border
BorderRaized = 1 - EDGE_RAISED
BorderSunken = 2 - EDGE_SUNKEN
BorderFlat = 3 - BDR_RAISEDOUTER|BDR_RAISEDINNER, BF_FLAT
BorderStatic = 4 - BDR_SUNKENINNER
How is this achieved?
Many thanks, Alton
|
|
|
|
|
What language are you using? C++, VB, script?
Creative minds - create creative creations!
|
|
|
|
|
|
i embed PropList ctrl in a float bar,and when a WM_ERASEBKGND occured,the ctrl coudle not redraw window valid,there is always remain a area could not be drawn.i have no idel about what is wrong.
|
|
|
|
|
Hi, Mr. Hazanov!
What a great control you have coded!
Anyway, I'm having problems to create a combobox using javascript in an HTML page.
Instead of having a combobox created, a button is shown preceded by the text "Nothing selected".
This is the code I'm using:
<html>
<head>
<script language="javascript">
function populate() {
var values = new Array(3);
values[0] = "Test1";
values[1] = "Test2";
values[2] = "Test3";
pp.AddProperty("Group", "Caption", values, "Description", 0, 1);
}
</script>
</head>
<body onload="populate();">
<object name="pp" classid="clsid:75C461D9-9588-415A-8D8F-4EA2430703B9" width="200" height="500">
<param name="ShowDescription" value="0">
</object>
</body>
</html>
I hope you can test it and fix it (if it's a bug), or tell me how to create combo boxes using Javascript.
Oh, and it would be great if comboboxes wouldn't be limited to the listed values (I mean, editable comboboxes).
Good work!!
Greetings.
-------------
CoMiKe
|
|
|
|
|
I would suggest using VB script instead since JavaScript has some strange way to represent arrays, and they aren't always easy to read in C++
You could setup some VBScript function just for that purpose and call it from JScript
I'll try to look in teh code what could be wrong (since I remember myself using JScript with the control) , but I can't promise taht it would be in the next couple of days , since my hands are full at the moment.
Creative minds - create creative creations!
|
|
|
|
|
Alex Hazanov wrote: You could setup some VBScript function just for that purpose and call it from JScript
Thanks for the suggestion, I will try!
Alex Hazanov wrote: I'll try to look in teh code what could be wrong (since I remember myself using JScript with the control) , but I can't promise taht it would be in the next couple of days , since my hands are full at the moment.
My intention is to write a CSS editor for Maxthon Browser, and you control would fit very well for the job.
Thanks for you reply and your interest!
|
|
|
|
|
It doesn't work using vbscript either, though in this case, a non-editable control is created after the caption. This is the code I'm using:
<html>
<head>
<script language="vbscript">
function populate()
dim values(3)
values(0) = "Test1"
values(1) = "Test2"
values(2) = "Test3"
pp.AddProperty "Group", "Caption", values, "Description", 0, 1
end function
</script>
</head>
<body onload="populate()">
<object name="pp" classid="clsid:75C461D9-9588-415A-8D8F-4EA2430703B9" width="200" height="500">
<param name="ShowDescription" value="0">
</object>
</body>
</html>
Good luck!
-- modified at 7:59 Thursday 15th December, 2005
|
|
|
|
|
That has become quite a rare thing to get so pleased from other's work.
Great API and very clear design.
Thank you for this one.
|
|
|
|
|