|
-
September 30th, 2004, 08:50 PM
#2
Re: CListCtrl Bug
Additional:
When browsing the registry key:
My Computer\HKEY_CURRENT_USER\Control Panel\Appearance\Schemes
and calling GetListCtrl() m_hWnd of ListCtrl becomes NULL. Do you know why it happens?
Ok, let me tell you more. In accessing the above registry key, I get the maximum data size by using RegQueryInfoKey. The maximum data size is 712 bytes. I have a loop that iterates 712 times to convert the data to string format. As you may know, a data whose type is REG_BINARY or REG_DWORD etc cannot be added to the list because they are not in string format. So I write a function that will convert the data from its format to string format.
After the conversion (after 712 iterations), I then call the GetItemCount() method of CListCtrl so that I can add the data to correct position in the list. But in doing so, I get an assertion error because m_hWnd of CListCtrl becomes NULL. Note, this only happens when browsing My Computer\HKEY_CURRENT_USER\Control Panel\Appearance\Schemes There is no problem when browsing other registry key.
Anybody know why this happen?
I am inviting you to join GreenZap. It is just like PAYPAL but it is more rewarding! You get $25 when you join (FREE to sign up) AND you get rewarded also when someone opened an account using your GreenZap promo code! GreenZap is launching June 1st.
Click here and PREREGISTER
Have a break. Visit JonelsPlace
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|