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
E

EddieRich

@EddieRich
About
Posts
14
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • problem with list view selection.
    E EddieRich

    You are half way there. You need to add one more line. The problem is that when you select a new item, the old item becomes de-selected, and so the "SelectedIndexChanged" event is fired when there are no items selected. Then, the item you clicked becomes selected, and the "SelectedIndexChanged" event is fired again. Try this in your code ...

    	private void listView1\_SelectedIndexChanged(object sender, EventArgs e) {
    		if (listView1.SelectedItems.Count > 0)
    			label1.Text = listView1.SelectedItems\[0\].ToString();
    	}
    
    C# database algorithms help question

  • Starting WMP Control from System.IO.Stream
    E EddieRich

    I have a unique situation. I need to selectively play some mpeg videos in different sequences depending on the state of my main App. I have been able to add WMP to my form and play videos by setting URL = @"C:\path\filename.mpg". However, in the release version I cannot store the videos on the customers drive, so they must be embedded in the resources of the app. That's not the problem though. I would like to be able to create a MemoryStream and dynamically build the "file" which will reside in memory. However, there is no way to tell the WMP control to play my System.IO.MemoryStream. I would have to save to disk and set URL = the new temporary file, and that isn't allowed. Is there a way to point the URL at a resource in an assembly ? If not, can I tell WMP to play a System.IO.Stream ?

    C# announcement hardware performance help question

  • Using reflection to get the instance name of a variable
    E EddieRich

    That would work if I were allowed to install VS on the target machine. I am only allowed to install the final .exe on the target which is not connected to our network. In other words, no debug tools allowed. :sigh:

    C# question

  • Using reflection to get the instance name of a variable
    E EddieRich

    That figures. I just wanted to do some screen dumps while I develop/run and see the values of the variables. I was hoping the variable names could be auto-generated. Anyway, thank you for the quick reply.

    C# question

  • Using reflection to get the instance name of a variable
    E EddieRich

    Is there a way to use reflection to get the variable name that a method is called on ? For instance ... class foo { public override string ToString() { return GetType().toString() + " " + GetType().??? VaraibleName ???; } } . . . foo myFoo = new foo(); Console.WriteLine( myFoo.toString()); Should ouput foo myFoo

    C# question

  • Disable Recent File Entries
    E EddieRich

    Sorry, maybe I'm not being clear. When you click on the start button in Windows XP, a small window pops up and one of the selections is "My Recent Documents". I do not want my files to be added to THAT list.

    C / C++ / MFC c++ question

  • Disable Recent File Entries
    E EddieRich

    I have an application where the user opens many files at once ( MFC MDI ), and the filenames are stored in the MRU list under the File menu. That is fine with me. I would like to disable all these filenames showing up under "Recent Documents" in Windows XP. Is there a way to open files in Win32 and MFC so that the documents do not show up in this list ? :omg:

    C / C++ / MFC c++ question

  • MDI UpdateAllViews
    E EddieRich

    Sorry if I sound rude, or "have an attitude". I thought I was perfectly clear in the original question when I said -- What I want is for "AllDocs" to "UpdateAllViews" --. "Instead of telling us what there isn't - when you clearly don't know - you might try following the advice of those that have done this." There is no function called "GetFirstDocument". If I "clearly don't know", then maybe someone should tell Microsoft, becuase they neglected to put it in the help files. I would love nothing more than to follow your advice, that is why I originally posted the question. "Then you need to use an object that is accessable across all your views/documents. The first one that comes to mind is the application object which can be obtained via AfxGetApp." Sorry to be "rude" again, but that still doesn't answer the question. So now I have a pointer to CMyApp, ok, what do I do to get all the documents and UpdateAllViews ? My point here is that your not giving me advice, your giving me half answers that never solve the original problem. I apologize for my attitude, I did not intend to offend anyone, I just wanted to know how other applications update every view in the app. I wanted to know how other software engineers have implemented a " UpdateAllInstantiatedViewsInTheApp() " function.

    C / C++ / MFC question announcement

  • MDI UpdateAllViews
    E EddieRich

    I said a "static" variable in the class. It does NOT belong to one view, it belongs ( is shared by ) ALL instances of that view class.

    C / C++ / MFC question announcement

  • MDI UpdateAllViews
    E EddieRich

    Perfect !!! GetFirstDocPosition and GetNextDoc is exactlly what I was looking for !!! Thank You so much !!!!

    C / C++ / MFC question announcement

  • MDI UpdateAllViews
    E EddieRich

    "The point of doc/view and the UpdateAllViews feature is that you're storing the data in the document. When that data is updated, calling UpdateAllViews allerts all views working with that data that it has changed." Yes, I know that. I have used "UpdateAllViews". I get it. As I said before, I am asking how I can update ALL views in my App, not just the ones related to one document. Changing the text color has nothing to do with "the data in the document", it relates to how the view displays it. Therefore, the textcolor is a static member in my view class and has a static access function. Once I change the color variable, I need all the views in my App to redraw themselves. Simply calling UpdateAllViews will only update the views attached to that ONE document.

    C / C++ / MFC question announcement

  • MDI UpdateAllViews
    E EddieRich

    My problem is that I don't know alot about MFC. What is "the MDI Client window" and how do I get to it ? How do I "iterate all docs" ? Which class owns the docs ? If I can't find a function in the help files, then I won't know where to find it. There is no "GetFirstDocument" function, or a "GetFirstView", especially for an MDI app. All I am doing (for now) is handling a menu message ( change color ) which opens a CColorDialog and let's me pick a color. I want ALL my views to use the new color.

    C / C++ / MFC question announcement

  • MDI UpdateAllViews
    E EddieRich

    Well, consider Visual Studio. If you have 5 source files open ( the documents ), and you go and change the text color in the options menu, ALL the views will update. The color of the text being displayed in the view is common to ALL views. It is NOT part of the data.

    C / C++ / MFC question announcement

  • MDI UpdateAllViews
    E EddieRich

    :confused: If I modify a static variable in my derived CView class, let's say the text color, how can I make ALL views in my MDI App update to use the new color ? What I want is for "AllDocs" to "UpdateAllViews".

    C / C++ / MFC question announcement
  • Login

  • Don't have an account? Register

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