Visual C++ :: Getting Rid Of (Save Changes To Untitled)?
Oct 10, 2013
I have tried everything I can think of to get rid of the 'Save changes to Untitled?' message box that appears every time my SDI split app tries to load a new file. The problem is that the message appears inappropriately, both when no previous document has been loaded or should exist, and even after File / New has been envoked. I have attached a small demo program to demo the problem. Inspecting the SpVwTrDoc.cpp NewDocument and OnOpenDocument, and elsewhere, you will see that using SetModifiedFlag(FALSE); has no effect.
I am trying to develop a GUI using MFC, but I am having trouble using CFiledialog to save a file. The problem is, the file is not getting saved to the folder when I use the CFiledialog. Below is the code I am using.
How can I save an CDocument programatically, without to bring him to the top, only if I get a pointer to that document ? I mean if I have several document opened into a MDI app, and if I have a pointer to one of them, to save it without to turn them as active childs ?
I have this code, where I capture window and make copy to bitmap of it. I am working on rotation of bitmap. But my problem is that when I save the image to file the result is just a black screen. It looks like there could be some problem either in GdipCreateBitmapFromHBITMAP() or GdipGetImageGraphicsContext()
How to fix it and to get the rotated image?
Code: // CODE 81 and 82 de facto no difference #defineCODE85 // 81 #defineWINDOW_MIN_HEIGHT200
1st when i fill the things on form then saved in database after saving record when i want add another record it shows an error. after saving it saves new record refresh doesn't work
I am overriding OnSaveDocument in my MFC document class to strip out the carriage returns when saving my app's document to a UNIX file system but not when the user is saving a file to a Windows file system.
Is there a way to determine if the lpszPathName in OnSaveDocument(LPCTSTR lpszPathName) is a UNIX or Windows file system?
Note, I want to avoid hard coding server names and I want to avoid overriding the FileSave dialog and forcing the user to select Windows or UNIX.
I've been trying to figure out how to implement a way to save this board state throughout a user's inputted path. At the end, I need the output to print out the board states (user's path) of how he or she got the puzzle solved. This puzzle is the 15 Puzzle; but we have it to change by the user's input on what size they want to play (3x3 to 5x5). How to save the board state of each user input, then print those out in order from beginning to solved puzzle state. Subsequently, I would also need transferring the board state to change with using a vector to store the size based on user input. How to proceed, using a first search to solve the puzzle from the current board's state.
calculations.h
Code: /*Calculations set as a header to keep compiling simple and faster*/
Opening large files in c++. In my application, i am trying to save video as long as users have space in harddisk. What I am trying to do is when user is recording video i am trying to append the video data in to the file. The problem is that every time file size reach over 2GB my software crashes.
I am creating a program using the inheritance. The superclass is person and subclass is employee,manager etc. I will prompt the user to choose which subclass he want to save the record to but i dont know how to write and display the record of different subclass to and from a txt file.
What is the best way to save a c# web page to database, either sql or oledb both fine. What I am looking to do is save all the data that has been entered into a database then upload this data to a grid view or form view.
The problem is there is a a lot of data on the page. Such as drop down lists, check boxes panels text boxes. I am able to display the text boxes in the database when i enter information into them. this is not working for the other objects. Also there is fixed data in the panels which doesn't require user input but I still want this info saved as it is vital.
In short I want to save the data from a page ive created called DOCare.aspx into a database. then take the data and display it in Forms.aspx a different page, where it will list all the completed forms for the user to modify if needed.
How to do this or links to websites that have information on this?? Dont know if i am wording it wrong but just cant find a way to do this. Everyone ive seen is working with small amounts of data and only text boxes.
I had assign to do a project using c# window form.Now I am doing a smart part of coding which is let the data in textbox and using keypress function with a enter,the data will save in database and show on datagridview.I had searching how to do it online but all of them using mysql or sqlcommand something to do it! But my project is using the code that already done and can access without mysql or sql coding... Using this code to connect and show in datagridview...
using (TMPB_attn_DAL dalObj = new TMPB_attn_DAL()) { dataGridView1.DataSource = dalObj.GetRecords().Cast<TMPB_attn>().ToList(); dataGridView1.Refresh(); }
This is the function code for me to add data inside database,it can run but just still cant save.
private void txt_proximity_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)13) { if (BusinessLogicLayer.TMS_GET_PROXIMITY_VALID_TO_USE(txt_proximity.Text) == true) { TMPB_attn row_tmpb_attn = new TMPB_attn();
I have a project, a montly paycheck. So it checks the monthly paycheck of each employees. but my problem there is how to add a new employee when u are a user or in the output of program?
I call a function that returns a string, and I can print it out fine, but I want to test the result of the function to see if it returns 0. But I can't just call the function again (GetNextToken(b)) because it will generate a different token. I can't allocate space for the string because I'm not sure what the size of the returned string is going to be.
Basically I want to see if the GetNextToken(b) returns 0, and if it doesn't then print the string. And running GetNextToken(b) again will give a different result.
Code: int main(int argc, char **argv) { SomeStruct* b = CreateStruct(argv[1],argv[2]); printf("HERE %s", GetNextToken(b));
I wrote a text parser to print all the words of each line separate from each other. My question is mainly concerning memory usage, should I go ahead and directly assign the contents of a token, or should I use strdup()? Or will the strings be freed when the pointer to arrays of characters is freed? Here is my code so far
In case you were wondering about some of the variable names, I am going to use this to parse notes in a music file for my program I've been developing lately.
I run some computations which give a big number of vectors (let's say 100 vectors, each one contain 2000 elements of type double). I want to save those data and import them into Excel.
I know I can save the results through in txt file. But it would be a very long file. Can I save the results in other more efficient file form that can be imported into Excel? and how?