Click here to Skip to main content
15,905,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: underline Text in a Button Control Pin
Heath Stewart7-Jul-04 13:12
protectorHeath Stewart7-Jul-04 13:12 
Questionhow difficult does getting an instance by handle have to be? Pin
spazzman7-Jul-04 11:36
spazzman7-Jul-04 11:36 
AnswerRe: how difficult does getting an instance by handle have to be? Pin
Heath Stewart7-Jul-04 12:33
protectorHeath Stewart7-Jul-04 12:33 
AnswerRe: how difficult does getting an instance by handle have to be? Pin
MilesAhead11-Jul-04 16:44
MilesAhead11-Jul-04 16:44 
GeneralRe: how difficult does getting an instance by handle have to be? Pin
spazzman12-Jul-04 5:50
spazzman12-Jul-04 5:50 
GeneralRe: how difficult does getting an instance by handle have to be? Pin
MilesAhead12-Jul-04 6:55
MilesAhead12-Jul-04 6:55 
GeneralTreeView with ComboBoxes in TreeNodes Pin
theoutlander7-Jul-04 11:19
theoutlander7-Jul-04 11:19 
GeneralRe: TreeView with ComboBoxes in TreeNodes Pin
Heath Stewart7-Jul-04 12:38
protectorHeath Stewart7-Jul-04 12:38 
You can do this like you would've using the Common Control APIs and Windows APIs, but you need to P/Invoke this functionality. The Handle property (inheritted from Control) is the HWND.

The TreeView control (like most controls in Windows Forms, and even many other classes throughout the .NET BCL) encapsulates native APIs. Most of the Windows Forms controls actually wrap the common controls, so the TreeView wraps the Tree View common control.

This means that you have to override WndProc and handle the drawing messages (among other custom drawing messages) and site (or position) the ComboBox (which wraps the Combo box common control) in the edit portion of a TreeNode (which encapsulates a TVITEM struct).

Sorry I'm not providing any example code, but this is not an easy subject and is definitely a little too lengthy for the message forums. This would be better suited to an entire article.

You might try searching for such an article here on CodeProject (I've not seen one, but I haven't seen every article on this site neither). You might consider writing an article aobut it if/when (here's hoping for the latter :beef: ) you complete such a task.

If you have specific questions regarding P/Invoke and whatever else you need, don't hesitate to ask here.

 

Microsoft MVP, Visual C#
My Articles
GeneralHowTo change color on statusbar Pin
QzRz7-Jul-04 9:54
QzRz7-Jul-04 9:54 
GeneralRe: HowTo change color on statusbar Pin
Heath Stewart7-Jul-04 12:50
protectorHeath Stewart7-Jul-04 12:50 
Generalproblem with SQLServer CE Pin
JulienR7-Jul-04 8:51
JulienR7-Jul-04 8:51 
GeneralRe: problem with SQLServer CE Pin
Heath Stewart7-Jul-04 12:56
protectorHeath Stewart7-Jul-04 12:56 
GeneralRe: problem with SQLServer CE Pin
Anonymous8-Jul-04 2:30
Anonymous8-Jul-04 2:30 
GeneralRe: problem with SQLServer CE Pin
Heath Stewart8-Jul-04 3:12
protectorHeath Stewart8-Jul-04 3:12 
GeneralCustom Listbox controls Pin
kam33mitch7-Jul-04 8:08
kam33mitch7-Jul-04 8:08 
GeneralRe: Custom Listbox controls Pin
Heath Stewart7-Jul-04 13:04
protectorHeath Stewart7-Jul-04 13:04 
GeneralRe: Custom Listbox controls Pin
kam33mitch7-Jul-04 14:40
kam33mitch7-Jul-04 14:40 
Questionbitmap to byte array ? Pin
kendao7-Jul-04 7:10
kendao7-Jul-04 7:10 
AnswerRe: bitmap to byte array ? Pin
Grimolfr7-Jul-04 8:05
Grimolfr7-Jul-04 8:05 
AnswerRe: bitmap to byte array ? Pin
Heath Stewart7-Jul-04 8:50
protectorHeath Stewart7-Jul-04 8:50 
GeneralProgress Bar in Status bar panel Pin
bouli7-Jul-04 4:38
bouli7-Jul-04 4:38 
GeneralRe: Progress Bar in Status bar panel Pin
Heath Stewart7-Jul-04 5:55
protectorHeath Stewart7-Jul-04 5:55 
GeneralRe: Progress Bar in Status bar panel Pin
bouli7-Jul-04 23:52
bouli7-Jul-04 23:52 
GeneralRe: Progress Bar in Status bar panel Pin
Heath Stewart8-Jul-04 3:16
protectorHeath Stewart8-Jul-04 3:16 
GeneralRe: Progress Bar in Status bar panel Pin
bouli8-Jul-04 22:08
bouli8-Jul-04 22:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.