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
L

ldsdbomber

@ldsdbomber
About
Posts
129
Topics
57
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Help running php scripts locally and/or conversion to executable format
    L ldsdbomber

    I have some xml files that contain quite a lot of data, several hundred, and I would like to be able to extract 3 or 4 named tags from each xml file in a directory. I have a script that can do this but I am a bit confused as to how to execute this. ideally it would be best to have a development environment or other method to convert the script into an exe, but just being able to run the script would be a good start! cheers!

    Linux, Apache, MySQL, PHP php tools xml help tutorial

  • Adding Data to datagridview [modified]
    L ldsdbomber

    Thanks. Of course, that is exactly what it was, I hadn't changed the file read section to allow the user to browse for an actual file location! doh! thanks for the heads up

    C# question data-structures debugging

  • Adding Data to datagridview [modified]
    L ldsdbomber
          do
                {
                    iniText = iniStream.ReadLine();
                    // Skip comments started by \* character
                    if(String.Compare(iniText.Substring(0,1),("\*")) == 0)
                        continue;
    
                    string \[\] dataItems = iniText.Split(new Char \[\] {','});
    
                    
                    dataGridView1.Rows.Add(dataItems);
    
    
                } while (iniText != null);
    

    When stepping through the code, dataItems correctly contains each array of comma separated variables, but the datagrid control is not being populated with the Rows.Add method. What am I missing? t.i.a OK, I changed it to this

                do
                {
                    iniText = iniStream.ReadLine();
                    if (iniText == null)
                        continue;
                    // Skip comments started by \* character
                    if(String.Compare(iniText.Substring(0,1),("\*")) == 0)
                        continue;
    
                    string \[\] dataItems = iniText.Split(new Char \[\] {','});
    
                    dataGridView1.Rows.Add(dataItems);
    
                } while (iniText != null);
    

    obviously I need to rethink my loop logic. But when i step through in Debug with F5 it populates the control properly, when I run without debugging, it is still empty. Why does that happen?

    modified on Wednesday, October 14, 2009 2:42 AM

    C# question data-structures debugging

  • what is ObjectSender and EventArgs in Windows Form
    L ldsdbomber

    Sorry, what I meant was not a specific book, but a specific class of book. i.e. does a general purpose C# book contain details about controls and event handlers, or is that specific to windows forms etc. And for handling and tokenising strings and dialog data, are there specific types of books for that or... I realise this question is a bit wishy washy!

    C# question csharp help tutorial

  • what is ObjectSender and EventArgs in Windows Form
    L ldsdbomber

    Many thanks. Do you have any opinions as to a good reference book that would include this kind of information, i.e do I want a book on C# itself, or is it Windows Forms, or Visual Studio specific?

    C# question csharp help tutorial

  • what is ObjectSender and EventArgs in Windows Form
    L ldsdbomber

    In a simple dialog namespace projectname { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void FormDataChanged(object sender, EventArgs e) { blah......... } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { FormDataChanged(???????????, ?????????); } } } If I want to use the FormDataChanged function when I process the change in a listbox or a checkbox or whatever, what should I supply as the arguments. I suppose I have just dived in to C# and it's a bit different to what I am used to. I am not using either "sender" or "e" in the FormDataChanged function, I just want to know what is/should be in there, is it the item on the form itself that is the object, e.g. in the example above, is it the listbox itself, should it be "this" as the 1st parameter, and where does its EventArgs come from? thanks for any help If I put FormDataChanged(sender, e) that seems like it should be correct, but maybe I just need to find out a bit more about how the sender/args constructs work in more detail

    C# question csharp help tutorial

  • Problem with #defined values
    L ldsdbomber

    The answer of course is, yes, I was doing something incredibly stupid. I really ought to try the count to 10 rule before posting :-) unsurprisingly, sprintf_s( eBuff, 16, "%.0f", energyTable[ETABLESIZE*sel + NOMINDEX] ); works rather better, since energyTable is a float array DOH! sorry.....

    C / C++ / MFC c++ visual-studio help question

  • Problem with #defined values
    L ldsdbomber

    In a header file I have #define NOMINDEX 0 ... #define ETABLESIZE 5 In the source file that includes this header, the following doesn't seem to work (it's writing 0 to the buffer (and in the watch window in VS, it's saying it doesn't recognise the symbols defined) sprintf_s( eBuff, 16, "%d", energyTable[ETABLESIZE*sel + NOMINDEX] ); if I add this line before it, "e" is correctly assigned to 5 int e = ETABLESIZE; sprintf_s( eBuff, 16, "%d", energyTable[ETABLESIZE*sel + NOMINDEX] ); In other parts of my cpp file I use these constants and they seem to work correctly. Have I done something incredibly stupid? cheers Lee

    C / C++ / MFC c++ visual-studio help question

  • Line Number macros to use in output of Message Box?
    L ldsdbomber

    I'd like to configure MessageBox(myMsg, myTitle, MB_OK); so that myMsg contains the line number of the source file, I've already made it include the source file name, function and explanation, but it would be useful to be able to have it include the current line number using a macro in Visual Studio ? (I'm on ver 2005) so that as I change the source, the line number is always reported correctly during program execution tks if you can help Lee

    C / C++ / MFC csharp visual-studio help question

  • Continued Problems with VS2005 and MFC with Vista
    L ldsdbomber

    Hi, I cannot get VS2005 to work properly on my Vista when I use the dialog app wizard, nothing happens - I have the Sp1 update etc installed for VS. Can someone tell me if there is a workaround for me to get the files the wizard would create, including a blank resource template that I can visually drag and drop controls onto, and if there are still any issues with linking controls to code as I've seen before (I've not had VS installed for ages, and only previously on XP). Would these issues go away on an XP based system. thanks for any help cheers Lee

    C / C++ / MFC c++ visual-studio help announcement learning

  • Recommendations for language and IDE
    L ldsdbomber

    I understand that, but probably if it was that serious I'd mention it :-) The fact that it is "simple dialog apps" is a bit of a clue though, it's generally data analysis type things base on the MFC dialog app wizard - so, no, nothing fancy, though on occasion it's data that will be used in a clinical situation so accuracy is sometimes very important in terms of calculations and data flow.

    C / C++ / MFC csharp visual-studio c++ learning business

  • Recommendations for language and IDE
    L ldsdbomber

    Well I thought I had provided you with that information. I'm not writing full scale projects, mainly dialog based apps for my own amusement, but with a view at some point to also writing similar tools and utilities for work. As I've not really been "in" the field for a while, now was a good time to get an update as to whether that kind of thing is better done now in the new technology or not

    C / C++ / MFC csharp visual-studio c++ learning business

  • "Rules" for vista coding?
    L ldsdbomber

    Is there anything other than this http://www.codeproject.com/KB/vista/Certified\_for\_Vista.aspx to explain in laymans terms, perhaps a brief overview of things to look out for when coding in Vista, that you might not have worried about with XP, I know for example that you can no longer write to the registry like you could before

    Windows API com windows-admin tutorial question

  • Recommendations for language and IDE
    L ldsdbomber

    opinions are fine :-) and thanks for yours. I'm sure I did install some kind of 'patch' for Vista but remember that it didn't seem to fix all my issues relating to adding control variables to controls and things like that. I've seen there is a 430 MB VS 2005 SP1 Team Update(what????) and a Vista SP1 Update at 29MB, not sure if they are both part of the same process, I'll see if I can find what it was I installed when i first got the laptop, probably summertime 2007. cheers!

    C / C++ / MFC csharp visual-studio c++ learning business

  • Recommendations for language and IDE
    L ldsdbomber

    I'm going to start getting back "into" some coding again after a hiatus (actually it's a fairly long one, though I did briefly do some stuff for work here). I've always used Visual Studio 6 and C++/MFC. I have a new vista laptop and even after the patches, found that my shiny new VS 2005 that work bought for me doesn't always work properly when writing simple dialog apps with controls. On the whole, that's the kind of thing I would like to do a lot of, though I will try out "proper" MDI applications at some point. My point is this - I see a lot written now about .NET and C#, am I better off looking at that and learning those from scratch, or should I just refresh and improve my knowledge with C++/MFC in particular. These won't likely be "hardcore" industrial apps, but I would like to write things that are a bit more robust at some point. I think at work they might well get an old VS installed at some point, maybe even v6, but at home, it seems a shame that I'm a bit suspicious of VS2005 which is newer of course. Basically, any advice would be welcome, this isn't spam or trying to get controversy or arguments, nor do I really need any cryptic replies like "use what you feel most comfortable with". I'm at a point where I really can think about where to invest a bit of time and self learning and start playing around. If someone can tell me about other IDE's or perhaps quell my fears about VS2005 in Vista (I even read that you need Vista Business - not sure which I have, but I don't have the most expensive version, nor the cheapest) then perhaps I'm Ok just carrying on with simple dialog apps in MFC for now, but am I missing the boat here, is C# and .NET taking over?

    C / C++ / MFC csharp visual-studio c++ learning business

  • How to correctly trap "Enter" key in MFC dialog ?
    L ldsdbomber

    which is fine, I've now stopped OnOk from closing the diagram thanks chaps!

    C / C++ / MFC question c++ tutorial

  • How to correctly trap "Enter" key in MFC dialog ?
    L ldsdbomber

    OK, removing the "default button" style now works, but NOW it closes the dialog, even though I have overridden the OnOk and OnCancel functions.

    C / C++ / MFC question c++ tutorial

  • How to correctly trap "Enter" key in MFC dialog ?
    L ldsdbomber

    I've tried it with (by setting the "want return" style in the visual dialog editor) and without (which is was before). same result!

    C / C++ / MFC question c++ tutorial

  • How to correctly trap "Enter" key in MFC dialog ?
    L ldsdbomber

    no, it's not exiting, it's acting like a button is being pressed. the edit control is Tab oRder 5, contains a number, there is another numeric edit at tab order 6, then tab order 7 is a button which adds some calculated data to a listview report. hitting enter after the data in edit box 5 is causing the data to be added to the table. Is there any way I can track what's causing this?

    C / C++ / MFC question c++ tutorial

  • How to correctly trap "Enter" key in MFC dialog ?
    L ldsdbomber

    thanks, I have OnOk and OnCancel managed manually, and my program correctly exits via the red X button on the title bar, and through File->Exit my problem is not that the dialog is closing but that pressing the Enter key while in an edit control is somehow activating a press of another button thats adding that data to a listview elsewhere. Since the user is typing into the edit control, I assumed the focus was there, so don't understand how that is turning into the same action as pressing this other button (that is not at the top of the tab order tree, so it's not like it's defaulting to that)

    C / C++ / MFC question c++ 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