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 am attaching a sample project. Basically what this project does is that I initialize a variable map<CString, bool*> m_mapTest in CView::OnInitialUpdate and then pass the variable to CDocument class. On the other hand, within the function OnSaveDocument defined in CDocument I check m_mapTest. To my surprise, the CString part of m_mapTest is correct but the bool* part of m_mapTest is wrong(I pass an array of bool in CView::OnInitialUpdate).
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.
I have a problem to set sliderposition programmatically. This is my try:
//pointer to my slider control: // On the begining the range ist 1 to 10 // and the position is on 5 // change the range: pSliderCtrl->SetRange(1, 100); // ok no problems
Now, how to "move" btw. how to redraw the position of the slider thumb programmaticaliy with c++? Need to send some message, if yes what message i need to send to slider control to move (reposition) the slider thumb?
I try with // first: ::SendMessage(pSlider->m_hWnd, WM_NOTIFY, TRBN_THUMBPOSCHANGING, 0); // then with: ::SendMessage(pSlider->m_hWnd, WM_NOTIFY, NM_RELEASEDCAPTURE, 0);
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 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 trying to make a utility program for work that will update multiple projects with local dll references. Basically I work with two solutions (for talk sake solutIon1 and solutIon2). Generally solutIon1 will reference the dll's built In solutIon2 which reside on a server. However for debugging proposes I sometimes need to D/L the solutIon2 projects and build them local-ally, so that I can reference the solutIon2 dll's local-ally (this Is so that I can easily attach the dll and step Into the code). However this require changing the reference paths, so that I am pointing to the local-ally built dll's, which Is quite a laborious task.
So the question is how would I update references in solution1 from the program that I am making. I don't really know what to start reading about as I have never done anything like this before.
when we are trying to shift one tab to other one event should occur, can any one tell what is the event,how and where we have to write the event? give example. if he successfully login in first tab only then second tab will open,if he doesnt login in first and tries to open the second tab message should appear...
I'm getting an error when I want t add a file to my dataGridView that I can't add any data because it is databound. I've been working around this but still gives me the same error. heres the snippet of the code:
Is there any way to programatically find if the given code is taking recursive approach or iterative apporaoch using concept of files in C programming.
I wanted to change the Backcolor of subitem to Red, while inserting data in Listview from List<string> result. After executing the below code Data from List<string> are well placed below their respective column in listview, only their Subitem Color doesn't change.
Here my Code
//Here result is List<string> for (int i = 0; i < result.Count; i += 5) { ListViewItem item = new ListViewItem(); item.Text = result[i].ToString(); for (int j = i + 1; j < i + 5; j++) { item.SubItems.Add(result[j].ToString());
I have looked into this and I've also read that I should be able to Config Each column Accordingly.
I'm Currently using this piece of code:
//Change the Headers on the DataGridView2// dataGridView2.Columns["cashQTY"].HeaderText = "QTY"; dataGridView2.Columns["cashDescription"].HeaderText = "DESCRIPTION"; dataGridView2.Columns["cashSupplier"].HeaderText = "SUPPLIER";
[Code] ....
Currently it does not error, but it also does not Show the DateTime in the GridView when running either..
I have a dll file and i want to add this dll file in my c#.net project reference through a program. I know I can add it by clicking copying and paste ,but i want to add reference programmatically.
How do you programmatically expand a url link to its true location?
Do you know about tinyurl.com and baidu.com? Baidu.com is a search engine that tries to discourage people from using their web site to make metasearch engines by hiding their links in a way that is a lot like how tinyurl.com works. TinyUrl.com is a web site where, if you want to present someone with a link to something and that link is long, you can use tinyurl to produce a tiny url for presentation purposes.
Anyway, what I want to do is to find a way to programmatically take the link [URL] (the first link in a search for Jessica Alba using baidu.com) and have it return the actual link, [URL] . That is just one example. What I want to do is not specific to Jessica but for using Baidu.com as part of my group of search engines in my meta search eneing project.
Maybe there is a way of using the WebBrowser class but I did not see a member that was the URL.
Maybe there is a way of using WebRequest and WebResponse.