sap22's Q&A profile
Visual C++ about " while ( cin >> string) "
I am studing a famous book called "c++ Primer" by Stanley B.Lippman. and in it, there is a program as follows: #include <string> #include <iostream> #include <vector> using namespace std; void main () { string word; vector < string > text; while ( cin >> word) { text.push_back( word ); } cout << "words read are: \n"; for ( int ix = 0; ix < text.size(); ++ix) { cout << text[ ix ] << ' '; } cout << endl; } when run the program, I have to input the string from the keyboard, but how to terminate it I mean that, what char I input can make ...Show All
Visual Studio Tools for Office Add Text into Word Document By Visual Basic
Dear All My boss asked me to insert some text into the word document using visual basic. Let say I have a word document with some contents inside already and I need to insert a text (ABC) to the (Line 4, column 2 or left: 60 points, top 40 points) document using visual basic. I have searched for the methods provided by Word.document object. But still cannot find out the solution. Anyone can help me KIt Since this is a question regarding the Word object model, you will probably get a better response out of the Word Programming forum: http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.pu ...Show All
.NET Development StreamReader encoding detection problem
I am having a problem with automatic BOM detection that used to work in 1.1. A trivial way to reproduce the problem is to do the following StreamReader sr = new StreamReader ( "c:\\somefile" , true ); If you put a breakpoint after this line of code and look at sr, you will see that its internal member _detectEncoding is false and as a result encoding detection is never done. I dont see (using Reflector) anything in the logic of the constructor that could cause this to be false - it should be true at this point. I must be doing something silly here - hope someone can point me at the error off my ways Thanks   ...Show All
Visual C++ Using CFont in MFC (Background colors and refresh)
In my MFC application I'm using CFormView class and I have created a simple test frame of type CStatic and background color set to black (see sample code below) and all the OnDraw function does is write some text to the test frame. How do I change the background color of the text so the message don't have a default white background overwriting the black background when I draw to the device context Also, I noticed that when I minimized the window and restore it the OnDraw function is not being called and thus the text is not updated properly. What changes do I need to make for it to update this text void MyClass::OnDraw(CDC* pDC) { CF ...Show All
Visual Studio Autocomplete Textbox
Hi Everyone, I am trying to put the ability of adding multiple items to my textbox from the AutoCompleteSource. Much like Outlook where you can add multiple address and it shows suggestions for each address as you type. I currently am only able to show one item and when I try to add an additonal item, I can not get the suggestion to show again. I searched the net but am unable to find anything. Thanks in advance. ...Show All
.NET Development Copy of a collection
Hi, How do i make a copy of a collection. I know that you can copy it to an array.. but how would that help me in making a copy of the collection. Thanks tribal You can do a Shallow clone as such ArrayList Incoming = new ArrayList(); Incoming.Add(new UserInfo("John Doe", "Terminal #1")); Incoming.Add(new UserInfo("Jane Doe", "Terminal #2")); ArrayList Processing = (ArrayList) Incoming.Clone(); ((UserInfo) Processing[0]).Location = "Lounge"; ((UserInfo) Processing[1]).Location = "Theatre"; Proces ...Show All
Software Development for Windows Vista save xoml file without build...
I have a workflow with two custom activities from an activities library. I run this workflow from another console app. From what i understood, if i change the order of the activities on th xoml file and save it, the change should take place without building. anyhow, it's not working for me. (I have code activity in the custom activities which print me the activity name so i can see if there is a change in the order. Any suggestions Hi Amit, Since you are using activities (Code Activity) that need code beside (compiled code) you need to do the following to get this thing working 1) Create your own type with derives ...Show All
Visual Studio Team System <checkin_note label="Comments" required="true"/>
Hi there! I've added this xml line to Versioncontrol.xml file in my custom project... This way I garantee that every developer sets comments in every check-in (let's forget about what's meaningfull and not). But, There's allready a comment text box in Pending Changes - Source Files window. Isn't there a way to reuse text inserted in that window to this window (Pending Changes - Policy Warnings) Best Regards, Rui Dias Maybe you will find this link helpful, I did. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=93901&SiteID=1 ...Show All
Visual Studio VSTS 2005 (PDC bits) Installation and Running Issues...
I installed the given PDC VSTS 2005 and by the end it sort of failed still it finished the installation. An exception was thrown while "Executing Action: hxMerge_VSCC_v80" and request for the selecton of a debuger by just ignoring the issue it continue with the installation and later told me that it was completed successfully. It happend by the point in where it tried to run VSTS for some reason that I don't know, still on a retry I got the same issue. On both occations it installed the product, still when I run it it just shows the splash screen and goes away. Did some one had the same experience Can some one tell me how to ...Show All
Windows Forms Client Area
Why is it that with Windows.Forms controls, we only have access to the Size of the Client Area but not the Top, Left offset I've been trying to subclass a TextBox and add a Button on the Left and Right side of the text, but there it does not work for the left button which is ALWAYS rendered over the displayed text of the TextBox. ...Show All
Windows Forms How do you send data in a commandbutton to my email??
I use visual basic and i need to know the programming language nin which sends the info typed in the command buttons i have to me via email this could be liite trick if you want to do it inside a windows form app, since you cannot be sure every client support System.Web.Mai( CDON'T , SMTP etc..) the work around is to cr ...Show All
Windows Forms Growing form in run time
hello all , well i am facing one problem in the .net form.based on the data in the data base i am drawing some status graphs in the form at run time .the thing is if there is huge data in the data base then how will i accomadate all the lines in my form .will my form automatically grow as and when the data is growing  ...Show All
.NET Development Application won't start without Visual Studio
In our project we made a small application which uses dll-files. The problem is that the application won't work in a computer that has not Windows Visual Studio .NET environment installed. The latest version of .NET Framework has been installed on our environments and on the target computer we are testing with. When starting up the application nothing happens, not one error message. Also, applications made in the same environment without any dll-files work fine in the target computer. Dll-files are located in the same directory that the executable file but the application doesn't seem to find them anyway. Any idea how to make our applica ...Show All
Visual Studio Team System Error when trying to display a report
Hi, I'm trying to create a new custom report in studio 2005 (Report server project). When the wizard in finished, I'm trying to run the report and get the following error: An error .. during local report processing 'system.outofmemoryException'.. Thanks, Michael If you are running out of memory, it is probably because the MDX query used is returning too much data, look into optimizing the query or modifying the report so that data is filtered at the dataset level. Check out the following post: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=22652&SiteID=1 Thanks, Othmane ...Show All
Windows Live Developer Forums Messenger 8 Beta Feedback pages unavailable?
I'd like to submit some feedback for the Messenger 8 Beta, but whenever I select the option from the help menu, I get directed to a Service Not Available error page (link below). Is there a fixed URL I can't seem to find another route to it on the *.live.com sites. http://support.microsoft.com/default.aspx scid=gp;en-us;fmserror Yeh I am having the same problem. Wanted to report a problem with the "What I'm listening to" plug-in. It crashes msn if its turned on and media player is running :( ...Show All
