Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Sat, 28 Jun 2008 18:19:00 -0700,    group: microsoft.public.win32.programmer.ui        back       


Problem about treeview control   
Dear all,
I encountered a strange problem when programming with WTL.
I've got a treeview control in a window.
If the window is put in another window,
after editting the treeview control, I can finish editting the control with 
"return" entered.
But if the window is put in a dialog box, I can't finish editting the 
control with "return" entered.
Is there any special attention I should pay with dialog box?
Thanks for any hints.
date: Sat, 28 Jun 2008 18:19:00 -0700   author:   Kun Niu

Re: Problem about treeview control   
"Kun Niu" wrote:
> But if the window is put in a dialog box, I can't finish 
> editting the control with "return" entered.
> Is there any special attention I should pay with dialog box?

It happens because Enter key press is handled by dialog 
`IsDialogMessage' function. You need to subclass tree-view control 
and handle WM_GETDLGCODE message.

KB130691 - "PRB: ESC and ENTER Keys Do Not Work When You Edit 
Labels in TreeView"
http://support.microsoft.com/kb/130691/

KB83302 - "How To Use the WM_GETDLGCODE Message"
http://support.microsoft.com/kb/83302/

Also, google for WM_GETDLGCODE message for more info.

HTH
Alex
date: Sun, 29 Jun 2008 11:02:54 +0300   author:   Alex Blekhman

Re: Problem about treeview control   
Thank you for you useful information.
Now I can solve the problem.

"Alex Blekhman" wrote:

> "Kun Niu" wrote:
> > But if the window is put in a dialog box, I can't finish 
> > editting the control with "return" entered.
> > Is there any special attention I should pay with dialog box?
> 
> It happens because Enter key press is handled by dialog 
> `IsDialogMessage' function. You need to subclass tree-view control 
> and handle WM_GETDLGCODE message.
> 
> KB130691 - "PRB: ESC and ENTER Keys Do Not Work When You Edit 
> Labels in TreeView"
> http://support.microsoft.com/kb/130691/
> 
> KB83302 - "How To Use the WM_GETDLGCODE Message"
> http://support.microsoft.com/kb/83302/
> 
> Also, google for WM_GETDLGCODE message for more info.
> 
> HTH
> Alex
> 
> 
> 
> 
>
date: Mon, 30 Jun 2008 05:41:02 -0700   author:   Kun Niu

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us