Pelles C forum
C language => User contributions => Topic started by: DMac on May 03, 2010, 06:53:07 PM
-
Pelles C forum,
I have published a message based property grid control that is designed with a view toward being easy to use in Pelles C projects.
Here's a screen shot.
(http://www.codeproject.com/KB/combobox/Win32SDKPropertygrid/Figure1.png)
It can be found with accompanying article (a usage referance) at the code project.
Win32 SDK Propertygrid Made Easy (http://www.codeproject.com/KB/combobox/Win32SDKPropertygrid.aspx)
Regards,
DMac
-
Excellent, very good job.
-
Thanks.
-
Nice!!
BTW:
Is it possible to insert ComboBox etc. to SDK DataGrid too ??
-
Timovjl,
After completing this I thought the same thing. It would be a time consuming task and would involve changing the control's data structures to resemble the property grid's. I'm not sure when I might get around to that now that work is picking up again.
regards,
DMac
-
Useful, educational, and a great article!
Thank you very much for sharing this David.
-
Thanks Kevin,
When it came to putting the article together the real challenge was deciding what to discuss and what to pass over. As a field for professional topics Win32/64 SDK is still wide open.
-
Hello All,
I finally got around to updating the property grid so it draws some of the editors more consistently in Windows 7.
Regards,
DMAC
-
Hi DMac,
thanks a lot for Your contribution.
Just want you to know, that it don't work as a 64-bit program here.
Many crashes. I had some on processing (e.g. click checkbox), and
on exit also.
Sorry! Lingo
-
Problem is in simpleGrid.c in line 2399 inst.editstring = _T("");
Just comment it out.
-
Hi DMac,
thanks a lot for Your contribution.
Just want you to know, that it don't work as a 64-bit program here.
Many crashes. I had some on processing (e.g. click checkbox), and
on exit also.
Sorry! Lingo
Did you find this bug in the PropertyGrid or the SimpleGrid?
Problem is in simpleGrid.c in line 2399 inst.editstring = _T("");
Just comment it out.
Thanks Timo,
I try to be diligent about these things and still miss a big one. Turns out I don't even use that var anymore (holdover from BABYGRID) I thought I cleaned all that stuff out.
I appreciate all feedback.
Regards,
DMac
-
Did you find this bug in the PropertyGrid or the SimpleGrid?
DMac!
Bugs are in PropertyGrid.
Hints:
- Take your demo. Convert to 64-bit. You must convert the manifest also, for sure.
- Uncheck a checkbox. Check it again -> Crash.
There were more crashes, as I test it. But don't remember exactly when, and can't
try it at the moment, because this is a mac, I'm currently using.
HTH
Lingo
-
Ok, thanks for the info. I'll try to reproduce this.
-
In main.c Item is bogus in x64.
static BOOL Main_OnNotify(HWND hwnd, INT id, LPNMHDR pnm)
{
...
LPPROPGRIDITEM Item = PropGrid_GetItemData(pnm->hwndFrom, lpnmp->iIndex);
problem was (DWORD) cast in PropGrid_GetItemData macro/// @returns A pointer to a PROPGRIDITEM object.
#define PropGrid_GetItemData(hwndCtl,index) ((LPPROPGRIDITEM)SendMessage((hwndCtl),LB_GETITEMDATA,(WPARAM)(int)(index),0))
In propertyGrid.c line 4171 wrong cast (DWORD)
case WM_DESTROY: //Unsubclass the listbox Control
{
SetWindowLongPtr(hList, GWLP_WNDPROC,
(DWORD_PTR)GetProp(hList, WPRC));
RemoveProp(hList, WPRC);
return 0;
}
and in line 838, 966, 1139, 1257, 1510 SetWindowLongPtr(hwnd, GWLP_WNDPROC, (DWORD_PTR)GetProp(hwnd, WPRC));
-
Timo,
You beat me to it! :) I intended to the convert project to X64 at home and test it there tonight.
I hope to post the updated code this weekend.
Thanks again,
DMac
-
Hello All,
Thanks to a bug report from lingo and input from timovjl, I fixed some issues that caused problems when compiled to X64. New update now available on Code Project.
Regards,
DMAC