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
C

CWinThread

@CWinThread
About
Posts
13
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • C# articles
    C CWinThread

    Thanks Alex, I'll take a look at those articles...

    C# csharp design code-review

  • C# articles
    C CWinThread

    hello, Can anyone recommend one or two C# articles on CodeProject which you think has very good/professional code, is well-documented, uses good design, follows .NET coding guidelines, etc. I'm looking for some examples of well written and complete classes/controls/etc that I can learn from to improve my own code.

    C# csharp design code-review

  • updates to edited articles
    C CWinThread

    What's the possibility of allowing authors to update their own articles themselves, even after they have been edited/moved by CodeProject staff? Much like how unedited article submissions work right now. It just seems like this would be a quicker way of getting the latest fixes out to members, as I suspect the typical update is something simple like a replacement zip file with bug fixes/minor features, and no changes to article text except for maybe the history section. The updated article could still go into a queue for eventual review by the editors.

    Site Bugs / Suggestions data-structures help question announcement

  • caching GDI+ objects?
    C CWinThread

    Thanks Dave, Those are some good examples of when caching might be useful.

    C# graphics csharp winforms question learning

  • caching GDI+ objects?
    C CWinThread

    In the C# books I've read, drawing objects such as pens, brushes, etc are usually created in a using declaration in OnPaint(). I don't see anything wrong with this as it seems to be more resource friendly but I've heard others say these objects should be cached, such as storing them as instance fields. Are there any guidelines for going one way versus the other?

    C# graphics csharp winforms question learning

  • Frame color of a textbox?
    C CWinThread

    I was wondering the same thing myself, and ended up just changing the BorderStyle to None, and drawing a simple border myself in the parent form/user control with a function like:

    private void DrawTextBoxBorder(Graphics g)
    {
        Rectangle rectClient = myTextBox.ClientRectangle;
        Rectangle rect = myTextBox.RectangleToScreen(rectClient);
        rect.Offset(-1,-1);
        rect.Width += 1;
        rect.Height += 1;
    
        Point ptClient = new Point(0,0);
        Point ptScreen = PointToScreen(ptClient);
        rect.Offset(-ptScreen.X, -ptScreen.Y);
    
        g.DrawRectangle(Pens.SlateGray, rect);
    }
    
    C# question

  • managed resources
    C CWinThread

    Thanks Guffa

    C# regex tutorial question

  • managed resources
    C CWinThread

    I hear a lot about "managed resources" versus "unmanaged resources"...for example, as it relates to implementing the disposal method pattern. What's the difference between the two?

    C# regex tutorial question

  • VS.NET project folders
    C CWinThread

    Thanks Andy, That's a possible alternative for me then.

    IT & Infrastructure csharp visual-studio collaboration tutorial question

  • VS.NET project folders
    C CWinThread

    In VS.NET 2003, I can create subfolders for my C# projects using the "New Folder.." menu option. However, this always creates a physical subdirectory as well. Is there an option not to create the physical directory? For example, I just want the folder to appear in the Solution view for grouping together my source files, but I don't want the added overhead of maintaining all these subdirectories under version control.

    IT & Infrastructure csharp visual-studio collaboration tutorial question

  • exe disappears in 5-10 minutes automatically
    C CWinThread

    Does this only happen in your release build? How about when you run the debug version under the debugger and leave it running? I've seen an app just disappear before as a result of stack corruption or overflow. In one case, someone was appending characters to a char buffer or STL string (can't remember which) in a loop. Problem was, they forgot to initialize the loop count. Thus, the loop kept going in the release build and the buffer was seriously overrun. In another case, stack overflow occurred when a function was being called repeatedly/recursively in response to network traffic.

    C / C++ / MFC windows-admin help

  • WS_CLIPCHILDREN causing MORE flicker?!
    C CWinThread

    When implementing my own non-dialog window class (e.g., something derived from CWnd), I typically add an OnEraseBkgnd() message handler, and change it to return TRUE (to indicate further erasing by the MFC framework is not needed). Sometimes, this helps me when trying to reduce flickering. In your case, I think one of the root causes of flickering may be the use of the MFC tab control. I usually try to avoid it myself in any resizing situation (e.g., look for a custom tab control implementation). I don't know how hard it would be for you but you could test if this is the case by creating the contents of one of your tabs/panes within a dummy parent dialog or CWnd class instead. Add the similar OnSize() logic and see if you can reduce flickering on resize now that the tab control is out of the picture.

    C / C++ / MFC c++ question

  • Modal dialog freeze on show
    C CWinThread

    You mentioned you tried sending a message...did you try posting instead? e.g., in the double-click handler for your control, use PostMessage to post a message to your view class. In the PostMessage handler you can raise the C++ event function you mention.

    C / C++ / MFC csharp c++ help question
  • Login

  • Don't have an account? Register

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