I have an client application which as files i need to copy the a selected file into clipboard and paste it on the desktop or any where outside my client application Within my client application i am able to copy and paste files but not outside my client application. Here is the code void SetClipBoardStringData(CString str, int format ) { EmptyClipboard(); CString text = str; HANDLE hGlobalMemory = GlobalAlloc(GHND, (DWORD)(text.GetLength()+1)); HANDLE lpGlobalMemory = GlobalLock(hGlobalMemory); memcpy(lpGlobalMemory,(text),(text.GetLength())+1); SetClipboardData(format,lpGlobalMemory); GlobalUnlock(lpGlobalMemory); GlobalFree(hGlobalMemory); } I am calling this function. SetClipBoardStringData(sStrXML,CF_TEXT); This copies the sStrXML to the clipboard.This sStrXml contains the file contents. Now i want this clipboard contents to be availale outside the application so that i can paste it another application like notepad or a file in desktop. How do i do it?
Member 6074
Posts
-
Clipbaord copy -
As retriving the font name I need to retrieve glyf information from the ttf fileAs retriving the font name I need to retrieve glyf information from the ttf file. look at the code below this is not full code just a piece of code void TTFReader::ReadGlyf() { setPosition(m_glyfOffset);//get glyf offset from the ttf file for(int c=0 ;c < m_glyphs.size();c++) { int gl = m_glyphs[c]; //unsigned short k = readWORD(); unsigned short numberOfContours = readWORD(); unsigned short minx1 = readWORD(); unsigned short miny1 = readWORD(); unsigned short maxx1 = readWORD(); unsigned short maxy1 = readWORD(); setPosition(m_glyfOffset+m_ttf_pos); gl = m_glyphs[c]; } } my code is not working correctly mean not giving the exact value for eg the number of contours for one glyph.
-
Problem with XMLDocument classSuppose i have xml file Test1(This is not created using dotnet parser) which contains the following. " This is a test for the new block. It should all be written on separate lines of text. Using import from the client sometimes will give you a double lined in new block. " Now i am importing this file using my GUI.My GUI uses C# XMLDocument to parse file(Test1) and imports it into new dir (say NewDir).When i open this file from the NewDir the contents are as shown bellow. " This is a test of the new block. It should all be written on separate lines of text. Using import from the client sometimes will give you a double lined in new block. " If u see the " " is missing at the end of the each line.This is causing the problem.When the text under the comment tag is shown in our control a new line is added between the lines. if the file contents of the file in NewDir is same as Test1.It is working fine. Is there a way to get the contents exactly same as in the contents of Test1 using the XMLDocument class. Please let me know if more clarification is required.
-
Problem with XMLDocument classI tried it but it doesn't work. if i have scrpit which has something like this This is tree. This is a palace. your solution gives me This is tree. This is a palace. When i use the msxml praser and parse the script i should get the same script before parsing. The output should This is tree. This is a palace. Can u suggest me some other solution. modified on Monday, February 23, 2009 7:10 AM
-
Problem with XMLDocument classI have an XML file which contains " " While using the Load or LoadXML function of XMLDocument class, " " is converted to "\r\n".I just want to retain as " " while loading the document.Is there a way to do that?
-
Clipboard copysir, I need a code to get a selected text from any window to the clipboard and I would like to know how windows implements cltr+c for copying a selected text from any window.