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
M

m_mond

@m_mond
About
Posts
17
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • The WalMart concept does not work everywhere
    M m_mond

    Chris Austin wrote:

    Just curious. I have always been told and do believe that "love affairs" at work are generally a bad idea?

    Don't get your bread and meat at the same market. Or, with less innuendo, don't get your honey where you make your money. On rare occassion it works out. On other occassions you end up with an awkward work situation, or worse, unemployed due to sexual harassment claims.

    The Lounge sysadmin business question announcement

  • Would you spend one week changing strcpy to lstrcpyn ?
    M m_mond

    Which is why you use strncpy... There's a very simple way to avoid basic stack overflows built in to the language. It still blows my mind that people still don't use the 'n' string and memory function. On the other hand, this is also a case for using string objects of some sort. That's something worth spending the time to fix, IMO.

    The Lounge c++ html com question career

  • Debug options in Visual C++
    M m_mond

    You can also modify the warning level for particular source files, if there is one that causes you consternation. I often do this when dealing with 3rd party files that I have no control over.

    C / C++ / MFC c++ csharp visual-studio debugging question

  • Correct way to copy HBITMAP handle
    M m_mond

    I have a DLL function that gives an HBITMAP back to the calling application. I would like to store this off in a separate variable for use in WM_PAINT messages. What is the proper way to copy off this handle? I suppose I could copy into a memory DC, then extract it again, but that seems like too much work just to copy the bitmap data. Is there another way?

    C / C++ / MFC question graphics performance

  • Okay...let's sort this GMail thing out...
    M m_mond

    GMail is all well and good, until you have to page to find non-Gmail posts.
    What's funny is that there are more posts complaining about Gmail posts in the Lounge than there are legitimate Gmail posts offering invites.
    In other words, if everyone would just ignore the invites unless you were legitimately interested, it wouldn't be that bad. Just my opinion, especially since I just now got my invite.

    The Lounge com question

  • 3 Gmail invites available
    M m_mond

    Thanks!

    The Back Room

  • 3 Gmail invites available
    M m_mond

    Todd Thatcher boogiechillin at yahoo point com Thanks!

    The Back Room

  • 6 Gmail Invites
    M m_mond

    Count me in Do you need to e-mail me or should I post my address?

    The Lounge

  • 6 Gmail Invites - I have got 5 left
    M m_mond

    Hmm, why not... I'd have to go with New Zealand. It seems like a great country with friendly people. Oh, and rugby is the national religion, so that works for me! And Steinlager...I can't find that at a bar here in Dallas to save my life. It's also one of the few countries where I've met expatriates that just really, really long to be back home. Most everyone else fled to the States for some reason and doesn't want to go back. :confused: macrom75 at yahoo point com

    The Back Room

  • Viewing XML in AxSHDocVW
    M m_mond

    Yeah, playing around I see that the Type property is read-only. PutProperty on the AxWebBrowser doesn't seem to work either, but I can't find any docs on the valid data elements that can be passed to this method. Gotta love it when cool components like this go undocumented! I think I'll just resort to your first suggestion : stream to a file then load that file in Navigate.

    C# xml tutorial question

  • Viewing XML in AxSHDocVW
    M m_mond

    Is there a way to set the mime type on the IHTMLDocument2 object? I could have a ton of XML messages to display according to user selection -- having to save these as temp files or use one file as a temp writing space could be a pain. I could save some trouble if the mime type could be changed...is is possible?

    C# xml tutorial question

  • Viewing XML in AxSHDocVW
    M m_mond

    I'm trying to show XML that I get streamed to my app in a browser control. To test, I've dropped a control on a form and let the designer do the init work (BeginInit, misc. code, EndInit). Here's what I've added in my form's ctor : object a = string.Empty; axWebBrowser1.Navigate( "about:blank", ref a, ref a, ref a, ref a ); string xml = "42"; ((IHTMLDocument2)axWebBrowser1.Document).body.innerHTML = xml; The last line throws a NullReferenceException. I'm not sure why -- this code is supposed to work, right? Can someone pass on some advice on how to make this work or on the proper way to show XML in a browser control? Thanks!

    C# xml tutorial question

  • Control clipping issues
    M m_mond

    That seems to work. Thanks, Furty.

    C# question

  • Control clipping issues
    M m_mond

    I have a ListView sitting on an MDI tab (from the Magic library, if that makes a difference). If I set the tab's Dock property to DockStyle.Fill (and do the same with the ListView), the ListView control gets partially clipped by the status bar. I don't mind handing Resize events to keep things organized and prevent the clipping, but I'm wondering if there isn't a better way. Can the controls be told to size themselves correctly without an programmer intervention?

    C# question

  • Anyone remember the first Nintendos?
    M m_mond

    You mean the playing cards? http://www.nintendoland.com/home2.htm?history/hist1.htm

    The Lounge question

  • Magic TabPage question
    M m_mond

    Not really sure where to ask this one, so I'll clutter the boards up here... Is there a way to tell a TabPage on the TabbedGroup control to close or hide? I want to be able to show/hide or create/destroy the TabPages according to user selections on a menu (ie, uncheck a menu item and the corresponding window goes away). Show/hide would be ideal, but the windows don't seem to be responding to Hide() calls once created. Has anyone run into this issue? I get all the functionality I need out of this set of controls (which are top notch, BTW)...just this one final hurdle to overcome! m_mond

    C# question help

  • Synchronous socket connections
    M m_mond

    I'm trying to get a synchronous connection to a server using the various .NET stream classes. It seems that I can send a command to the server successfully, but nothing is returned (or the StreamReader returns before the data can be read off of the socket). Here's the psuedocode/real code :

    static void Main(string[] args)
    {
    string newsServerName = "msnews.microsoft.com";
    int newsServerPort = 119;

    TcpClient newsServer;

    try {
    newsServer = new TcpClient();
    newsServer.Connect( newsServerName, newsServerPort );
    }
    catch( SocketException e )
    {
    string error = "Failed to connect to " + newsServerName + " on port " + newsServerPort;
    Console.WriteLine( error );
    Console.WriteLine( e.Message );
    return;
    }

    NetworkStream netStream;
    StreamReader reader;
    StreamWriter writer;

    try {
    netStream = newsServer.GetStream();
    reader = new StreamReader( netStream );
    writer = new StreamWriter( netStream );

      // Flush the read buffer if there's anything in there from the Connect.
      if ( reader.Peek() > -1 ) {
         while ( reader.Peek() > -1 ) {
            Console.WriteLine( reader.ReadLine() );
         }
      }
    
      string sendMessage = "LIST" + "\\r\\n";
    
      Console.WriteLine( "Sending message." );
      writer.WriteLine( sendMessage );
      writer.Flush();
      Console.WriteLine( "Waiting for response." );
    
    
      while ( reader.Peek() > -1 ){
         Console.WriteLine( reader.ReadLine() );
      }
    

    }
    catch( Exception e ) {
    Console.WriteLine( "Error talking with server." );
    Console.WriteLine( e.Message );
    }
    }

    The last while loop never writes anything out. At the very least I should get the response from the server. How can I make the StreamReader wait until there is data before trying to dump out? I know this can be done with plain Send and Recv on a Socket, but I would like to use the Stream* classes if possible. greg

    C# question csharp com sysadmin help
  • Login

  • Don't have an account? Register

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