Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

Stuck At Zero

@Stuck At Zero
About
Posts
32
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to Draw Circles on GUI?
    S Stuck At Zero

    I don't know how much this software will morph over time, but the only other special thing I will need to look into is a "console" window on one of the tabs of my GUI to take manual commands as things are running. Outside of that, my best guess is that the "drawing circles" is the only quirky feature I need to have for this GUI that isn't obvious on the standard C# toolbox. Time will prove me wrong.

    C# question csharp design tutorial

  • How to Draw Circles on GUI?
    S Stuck At Zero

    I'm a total newbie when it comes to C#, so I've been trying to wing it with online tutorials on making GUI apps. Powers that be don't really care HOW I do it. They just want to see a notional version of what they had envisioned.

    C# question csharp design tutorial

  • How to Draw Circles on GUI?
    S Stuck At Zero

    I was just about to post that someone at work mentioned to me about the Visual Basic Power Pack. This is exactly what I was looking for. Thanks so much for posting and walking a mile in my shoes. I will look into the more specialized LED search you hyperlinked, but I suspect the Power Pack is all that I need. I definitely want to avoid coding the "LEDs" by hand since I'm dealing with a lot of these things. Thanks Again!!!

    C# question csharp design tutorial

  • How to Draw Circles on GUI?
    S Stuck At Zero

    I am using C# 2005 because the workgroup I'm in at work uses C# 2005. I would love to use "newer" technology, but the decision is above my paygrade. I'm not sure what forms I'm using, other than it's what pops up when I try to make a GUI. Is WPF something that came out in a later version?

    C# question csharp design tutorial

  • How to Draw Circles on GUI?
    S Stuck At Zero

    I guess my only options may be to see if I can investigate if I can place 40+ buttons onto the form that I can disable but have visible and see if I can make them circular buttons with the ability for me to change the color of the button. My other way I suppose would be to draw a circle on something like MS Paint and somehow save it with a transparent background. 50+ pictures on a form. The idea would be to either forcibly change the color of the circle on the picture or to use a different picture of the circle of a different color when an event happens. that I can simply change the color of the circle in the picture as needed (or have varying pictures of the same circle). I actually thought this was going to be rather easy, but it seems making simple shapes on the GUI is not as easy as I had thought for C#. Am I better off doing this on Visual C++ or Visual Basic?

    C# question csharp design tutorial

  • How to Draw Circles on GUI?
    S Stuck At Zero

    I'm actually trying to draw permanent circles onto the Form view of the app I'm trying to create to emulate LED status lights. Is there nothing on the toolbox that I can use to draw circles directly onto the form view?

    C# question csharp design tutorial

  • How to Draw Circles on GUI?
    S Stuck At Zero

    All, I'm trying to replicate a design of a GUI which has numerous circles scattered across the form to represent the equivalent of an LED status light. I'm a total noob at C# 2005, but my million dollar question is how can I do this?

    C# question csharp design tutorial

  • How to Disable Tree View Selection?
    S Stuck At Zero

    How do I go about entirely disabling a Tree View's selection? I want my app to focus on a node via the user's mouse and not by the default of the keyboard selection. Otherwise, the keyboard selection does not follow the user's mouse clicks.

    C / C++ / MFC question data-structures tutorial

  • How to Change Focus on Tree View with Mouse Click
    S Stuck At Zero

    Okay, so returning true on the part I'm handling will do the trick while the other return does so for the base class. On the matter of NM_CLICK, I'm pretty much going straight down the list of notifications. It seems part, if not my whole problem could be that clicking on a node's checkbox does absolutely nothing with respect to where the TreeView thinks the focus is at. The focus seems to be whatever node text is highlighted (regardless of what checkbox to a node was clicked on). Is there something I can do to remedy this cumbersome process? A user will not want to click on a node's text and then click on its checkbox for proper operation.

    C / C++ / MFC data-structures help tutorial question

  • How to Change Focus on Tree View with Mouse Click
    S Stuck At Zero

    Yes, I did change the code around. :) Someone here at work suggested I use a call to OnNotify from the base class because since I was overriding OnNotify, the call to the overridden function would handle all the other stuff I'm not handling. I've tried using other notifications and nothing seems to work. The other thing I'm trying to do away with is cutting the umbilical cord to the default indexing of nodes by way of the rectangular region which pops up when you use the arrow keys on the keyboard. If I don't use NM_CLICK, the only other thing I can do is the node changing states, but I think the above problem is compounding the issue I'm observing.

    C / C++ / MFC data-structures help tutorial question

  • How to Change Focus on Tree View with Mouse Click
    S Stuck At Zero

    The problem is I have 8 root nodes. By default the program is focused on the 1st root node. Whenever I click on any other root node (or their descendants), the program is still indexing the 1st root node. The reason seems to be how one can highlight a node via the keyboard arrow keys. If I use the keyboard to highlight a different node, then the focus is changed. Mouse clicks seem to do absolutely nothing with changing the focus to a different node. I am wondering how I can force my app to change whatever node it is currently focused on to the one the user specifies by left-clicking with their mouse. The "mouse click" focus is currently non-existent, and the keyboard focus is what is driving things which is what I do not want.

    BOOL CViewFilter::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
    {
    CDialog::OnNotify(wParam, lParam, pResult);
    // TODO: Add your specialized code here and/or call the base class
    if (wParam == IDC_TREE1)
    {
    NMHDR *pHdr = (NMHDR *)lParam;

    	if (pHdr->code == NM\_CLICK)
    	{
    		HTREEITEM hItem = m\_filterTreeCtrl.GetSelectedItem();  // Keyboard Highlighted Selection... Not Mouse Clicked Node
    
    		if ((hItem != 0) && (m\_filterTreeCtrl.GetCheck(hItem) == 0))
    		{
    			// Deselect All Subsequent Children Nodes
    			//SetDecendentNodesOff(hItem);
    			SetDecendentNodesOn(hItem);  // Backwards due to focused node not changing state immediately after click
    		}
    		else if ((hItem != 0) && (m\_filterTreeCtrl.GetCheck(hItem) == 1))
    		{
    			// Select All Subsequent Children Nodes
    			//SetDecendentNodesOn(hItem);
    			SetDecendentNodesOff(hItem);// Backwards due to focused node not changing state immediately after click
    		}
    	}
    }
    
    return CDialog::OnNotify(wParam, lParam, pResult);
    

    }

    C / C++ / MFC data-structures help tutorial question

  • Setting Children Nodes of Tree View Based on Parent Node [modified]
    S Stuck At Zero

    I couldn't figure out how to filter out the other things OnNotify would trigger, but I believe part of my problem seems to be that the hItem is what the TreeView has as a keyboard highlighted region rather than the actual node clicked on by mouse. Do you have any ideas as to change hItem to reflect what is actually clicked on by the mouse and thus ignore the keyboard rectangular region that highlights the 1st root node or changes if I use my keyboard to move it around? In other words,

    HTREEITEM hItem = m_filterTreeCtrl.GetSelectedItem(); // Keyboard Highlighted Region

    Is not with respect to the node I click on with my mouse.

    C / C++ / MFC help javascript data-structures

  • Setting Children Nodes of Tree View Based on Parent Node [modified]
    S Stuck At Zero

    I do not know how to find any other notification in XP other than what's listed in MSDN.... but the one you just recommended is here: http://msdn.microsoft.com/en-us/library/bb773526(VS.85).aspx It says the minimum operating system is Windows Vista.

    C / C++ / MFC help javascript data-structures

  • Setting Children Nodes of Tree View Based on Parent Node [modified]
    S Stuck At Zero

    Yeah, that was one I had tried using before but the problem is you need Windows Vista to use it. I'm running on XP Pro.

    C / C++ / MFC help javascript data-structures

  • Setting Children Nodes of Tree View Based on Parent Node [modified]
    S Stuck At Zero

    I do not call SetCheck. The nodes get their check state set whenever the user clicks on the node's box to check or uncheck the node.

    C / C++ / MFC help javascript data-structures

  • Setting Children Nodes of Tree View Based on Parent Node [modified]
    S Stuck At Zero

    It only works on the very first mouse click for the first root node only. Decendent nodes nor any of the other root nodes have any effect on the OnNotify. After the first mouse click to either select / deselect the 1st root node, that root node then behaves like the other root nodes.

    C / C++ / MFC help javascript data-structures

  • Setting Children Nodes of Tree View Based on Parent Node [modified]
    S Stuck At Zero

    I originally tried doing a message map of the OnNotify that I saw elsewhere through googling, but there does not seem to be a notification appropriate for what I want to do. I was using item check state to see if the node which has the user's focus was checked or not. The idea was that once a user clicks on a node within the tree view, OnNotify would fire off and it would check to see if the node was selected or not. Depending on its state, I would either select or deselect all decedent nodes from the node the user selected.

    C / C++ / MFC help javascript data-structures

  • Setting Children Nodes of Tree View Based on Parent Node [modified]
    S Stuck At Zero

    I am using a tree view with 16,384 nodes (2048 nodes per root node). I'm trying to allow a user to select or deselect a node anywhere on the tree view such that when a node is selected or deselected, all of its children nodes would mirror that selection.

    C / C++ / MFC help javascript data-structures

  • Setting Children Nodes of Tree View Based on Parent Node [modified]
    S Stuck At Zero

    I have a TreeView with 8 root nodes in which I want to select / deselect all decedent nodes based on any given node I select / deselect. I have tried overriding the OnNotify, but have been unsuccessful in trying to get the behavior I want. Currently, the OnNotify only seems to work on the first root node... none of the other sibling root nodes seem to trip the OnNotify. The other problem I'm having is on the one root node that does respond via OnNotify, I cannot traverse its branches to select / deselect node paths I want ignored. All decendant nodes of this one root node only react when the root node is selected / deselected. This is what I have on the OnNotify:

    BOOL CViewFilter::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
    {
    // TODO: Add your specialized code here and/or call the base class
    if (wParam == IDC_TREE1)
    {
    HTREEITEM hItem = m_filterTreeCtrl.GetSelectedItem();
    if ((hItem != 0) && (m_filterTreeCtrl.GetCheck(hItem) == 0))
    {
    // Deselect All Subsequent Children Nodes
    SetDecendentNodesOff(hItem);
    }
    else if ((hItem != 0) && (m_filterTreeCtrl.GetCheck(hItem) == 1))
    {
    // Select All Subsequent Children Nodes
    SetDecendentNodesOn(hItem);
    }

    }

    return CDialog::OnNotify(wParam, lParam, pResult);
    

    }

    Any help would be greatly appreciated.

    modified on Thursday, September 4, 2008 1:56 PM

    C / C++ / MFC help javascript data-structures

  • How to Preserve Cotents of Tree Control after doing a DoModal?
    S Stuck At Zero

    Understood on the node class... I was hoping to avoid that and utilize something more straightforward without having to use a new class for that.

    C / C++ / MFC question data-structures tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups