CDC Class

I am using the CDC Class to print some data out that does 
not utilize the CView class.  The data is also tab 
delimited.  One thing I ran across is that if I spread the 
data way out based on the tabs it truncates.  I have 
searched MSDN and I am sure I missed it.  Is there a way 
to set the device to "wrap" then set it back to "wrap"?

Bob
0
bob (43)
7/30/2003 7:37:12 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
600 Views

Similar Articles

[PageSpeed] 59

You can not make DC wrap your output. But you can make DrawString function
wrap the line with DT_WORDBREAK flag. To figure out where to print next
line, call DrawText with DT_CALCRECT flag to know the height of the printed
string.

"Bob" <bob@bob.com> wrote in message
news:037a01c356d1$f8e4e590$a401280a@phx.gbl...
> I am using the CDC Class to print some data out that does
> not utilize the CView class.  The data is also tab
> delimited.  One thing I ran across is that if I spread the
> data way out based on the tabs it truncates.  I have
> searched MSDN and I am sure I missed it.  Is there a way
> to set the device to "wrap" then set it back to "wrap"?
>
> Bob


0
Yan
7/30/2003 10:13:25 PM
Reply:

Similar Artilces:

Accessing control from another class
I'm trying to create an easy way to send data to controls from my worker classes for easy debugging. I know I should somehow setup a pointer from my dlg class so that my corker class can access it... but I'm unsure how to do this. Any suggestions would be appreciated: MyDialog.h /////////// CMyDialog m_pdlg*; //public MyDialog.cpp ///////////// BOOL CMyDialog::InitDialog() { CDialog::OnInitDialog(); //somehow create pointer here for worker class //having problems here WorkerClass m_worker; m_worker.m_pDlg = this; } WorkerClass.h ///////////// CMyDialog *m_pDlg; WorkerCla...

String Class
Hi, I have a String that I want to save to a file, I am writing a program using .NET, managed C++. I am using some older pre-existing code, functions, to do the file saving, C-type functions, but I have some of the data in a the String class. The function that I am using to add the data to a file is fwrite(); To get it to compile I have to cast the String using const void* record = $data; Compile fine now, however looks like the string that was contained in data is now inaccurate, due to the cast I would think. Anyone know how to use the fwrite(); function with a String? Thanks Jeff ...

CDC::Rectangle and client area
Hello, Lets say that place a rectangle border on the client area at 10,10,45,45. And lets say that client area is 200x200 or so. How can I make the recangle border resize itself in proportion to the changes of the client area? In other words, lets say I resize the client to 250x200 etc. How can I adjust the border of the rectangle to widen itself? What would the formula look like to figure out the percentage of adjustment? This is pretty simple arithmetic. You have a rectangle which is 10,10, 45, 45. Therefore it is a 35x35 rectangle. It represents 35/200 of the area, and it starts 10/...

Creating Generic Class To Handle Shared Memory
Hi, I wan to create Generic class to handle shared memory in win32. Like Create Shared memory, map/unmap objects to it, Mutex to synchronize among different clients (processes), implement Lock and Unlock functions to prevent simultaneous access by different processes. Can anyone please give me guidelines to create such class or set of all API functions required for it. if anyone have source code and want to share it i will be very thankful. Thanx in advance Akshay. This is actually very difficult, mostly because you have to write your own allocator for the actual shared memory. In general, ...

New class question
Hi, I have a A class derived from CWinThread , I want to create a new MFC class B derive from A class, what I need to do next? Thanks in advance! -ja > I have a A class derived from CWinThread , I want to create a new MFC > class B derive from A class, what I need to do next? > It will be same as what you did with CWinThread for class A. Something like: class B : public YourClassA { ... }; --- Ajay Ajay, thanks a lot! -ja "Ajay Kalra" <ajaykalra@yahoo.com> ??????:1156900782.576861.114590@h48g2000cwc.googlegroups.com... >> I have a A clas...

Class Wizard/MFC in VS.Net
anybody know how to access the class wizard for an MFC app within VS.Net 02 or 03?? it doesn't seem to be right off the main menu anymore like it used to be in previous versions of VS. i did figure out how to bring it up for adding a new class but what if you want to do maintenance on an existing class?? SilentCry <Xswe@Xearthlink.net> bored us with: > anybody know how to access the class wizard for an MFC app within > VS.Net 02 or 03?? it doesn't seem to be right off the main menu > anymore like it used to be in previous versions of VS. i did figure > out how to ...

kbfiltr and moufiltr install at class-level
hello, i have successfuly installed both the kbfiltr and the moufiltr on our test pc (which is xp). i have installed them both as class-level upper filters. for the keyboard, i have tried ps/2 and usb and they both seem to be working fine. for the mouse i have only tried usb but i am assuming(!) ps/2 will work too. the way i installed both the filter drivers was a simple two-step process. 1) i went into the registry and modified the HKLM/SYSTEM/CurrentControlSet/Class/{4Dxxxxx} key, and set the UpperFilters to "kbfiltr kdbclass". same for mouse. 2) i created a...

Getting CDC
I want to display something in the OnUpdate method, how do I get a handle to the CDC from here? news.microsoft.com wrote: > I want to display something in the OnUpdate method, how do I get a handle to > the CDC from here? > > This sounds like a beginner's mistake. You can call GetDC, but that is poor design and probably won't work the way you intend. Painting in OnUpdate will be lost after the window is minimized/restored or covered/uncovered. The default OnUpdate solves this problem by calling Invalidate(). Then the painting is done in the resulting OnDraw,...

CDC::arc() with big pen crash on win98
Hi, I've encountered a problem that occurs only under Win98: I have a dc object and I'm trying to draw an arc (I'm using the CDC::arc() function). I'm using a pen that has a big width. The problem is that it crashes sometimes (only when the arc is big and only a small part of it is displayed). I tried to look in the knowledge base for this kind of bug and I found something but it was a Win95 bug. How can I know when the CDC::arc() function will crash? For example, I had a problem when the bounding rectangle was bigger than 32767 (it crashed also under Win98) but since I knew wh...

VS 2003 Class View
Is there no longer a way to add a variable in a dialog based class and assign that variable to a control ID so that it will automatically be added to DDX? If so I can't figure out how to do it. TIA, Dave -- Right click on the control and you'll see an Add Variable menu item. -- Regards, Nish [VC++ MVP] "Dave Skok" <dskok@invalidcharslehighdim.com> wrote in message news:11lvilptagf9lb1@corp.supernews.com... > Is there no longer a way to add a variable in a dialog based class and > assign that variable to a control ID so that it will automatically be &...

which CDC
Hello, I am a bit confused as to which dc to call in the following situation. I have a dialog app with a static control on it that I am using to paint a graph on. I am doing the drawing in the lbuttondown function in the dialog class. My qestion is how do I call the device context to paint on the static control. Do I use the CClientDC dc(this); to get the device context of the dialog and do the drawing using this dc, or do I call CClinetDC dc(&m_myStaticControl); or dc = m_myStaticControl.GetDC(); to get the dc of the control, and use it to do the drawing? Are all these ...

Class Names not available in Class Wizard
In Visual Studio 6.0 I have added a .cpp and .h file created in another MFC project to my current project They show up in the class view explorer and in the file window but when I am in Class Wizard the only class name available are the ones created in this project. Is there a way to add these so they will be available in Class Wizard? Delete the .clw file. Then try to use ClassWizard. It will rebuild the file with the names. joe On Fri, 5 Mar 2004 12:26:06 -0800, "Ward" <anonymous@discussions.microsoft.com> wrote: >In Visual Studio 6.0 I have added a .cpp and .h f...

HDC and CDC
I am attempting for the first time to use CreateDibSection and am puzzled as to how to use HDC within the MFC framework. I can't see that CDC returns a handle, so I am wondering if these two are mutually exclusive. Is there a bridge between the handle and the class? "Steve Russell" <srussell@removethisinnernet.net> wrote in message news:uQoa24INEHA.624@TK2MSFTNGP11.phx.gbl... > I am attempting for the first time to use CreateDibSection and am puzzled as > to how to use HDC within the MFC framework. I can't see that CDC returns a > handle, so I am wonderin...

SQLXML classes deserializing.... nothing....
I am using SQLXML to pass data back and forth, well I am trying to. I try to follow a tutorial but it didn't work completely. Here is my problem. After everything executes with NO errors, my class has no data. Here were my steps. 1. In Query Analyzer, I ran my Select statement.... Select * From Notifications Where UserID = '4192' and ParentID IS NULL for XML AUTO It returned... <Notifications ID="1" UserID="4192" CreatedWhen="2004-08-31T00:00:00" ModifiedWhen="2004-08-31T00:00:00" ModifiedBy="1" Class="1" ...

Strange CDC::MoveTo and CDC::MoveTo performance problem
Hi, I am writing a chart drawing program and encountered a strange performance problem with CDC::MoveTo and CDC::LineTo function calls. To avoid flickering, the program does the drawing on a memory device context(m_DrawDC) and then BitBlt to the real display device. Here is the code fragment: void CView::OnDraw(CDC* pDC) { .... if(m_DrawDC.CreateCompatibleDC(pDC)) { ... for(INT n=0;n<m_DataSeriesArray.GetSize();n++) { m_DataSeriesArray[n].PlotLine(&m_DrawDC); } ... pDC->BitBlt(0, 0, ClientRect.Width(), ClientRect.Height(), &m_DrawDC, 0, 0, SRCCOPY); } m_Dr...

Lost class info
For some reason I've lost the class information for one file. When I open the file, the function box on the toolbar will show a function but when I click on the box, the combo box along with the other boxes on the toolbar go gray. I've delete the clw file and rebuilt but I can't get the function list back. Anyone know how to rebuild the mfc database? Thanks Sorry, Nevermind I found info on the .ncb file. I deleted it and rebuilt. "no stress" <nospamplease.com> wrote in message news:%23O5eKvzSFHA.3176@TK2MSFTNGP09.phx.gbl... > For some reason I've ...

Accessing Document From Outside Class
Hey I've got a typical SDI application created by MFC AppWizard. I created a new class, CRoster, and need to access the document, CSubstitutionManagerDoc, from it. It'll probably be something like (CSubstitutionManager*)(theApp...........GetDocument()); But I can't find the right function, or set of functions. What do I do? Thanks for any help. (I just need to do this so I can access a bool variable I created inside the document, and call SetModifiedFlag()). Thanks again. -- MiniDisc_2k2 To reply, replace nospam.com with cox dot net. Mostly this is ugly code. Why do you need ...

security setup for user class copied to another company
We have 3 companies in GP- version 9 - we have a user class set up and want to copy the security settings to the other companies. I was told it could be done through advanced security - is that correct? Do we use the import/export function? Thanks. User Classes are a system wide setting. Once you assign the user to the class, and grant the user access to a company, their security will follow them to that company. Best regards, -- MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Business, LLC http://www.maximumglobalbusiness.com The Dynamics GP Blogster at http://dynamicsgpblogster.bl...

Are MFC FTP classes limited to 32bit file sizes?
I have found that when using the GetLength member of the CFtpFileFind class that the filezizes are limited to 4GB (0xFFFFFFFF). Now I know that in old versions of MFC, GetLength only returned a DWORD and one needed to use the Getlength64 function. However I am using VS2008 and GetLength returns a ULONGLONG. I then heared about a possible bug in MFC so I derived a class from CFtpFileFind so that I would be able to see the actual WIN32_FIND_DATA used. And indeed the low order DWORD is set to 0xFFFFFFFF and the high order DWORD is set to 0x00000000. I know that this is not a server issue...

CDC:TextOut and Plus or Minus Sign
I am using MSVC 7.1.3088 on MS XP 5.1 service pack 2. I am trying to write the plaus or misu sign to a display window using CDC:TextOut. I can write the symbol to a character buffer using sprintf(csText, "%s (%c%f %s)", csLabel, 177, fError, csUnits); which gives me "Elevation (=B17.926902 Meters)" in csText. However, when I try to write it to the window using TextOut(DeviceContext, (int)(pWindowPoint.x), (int)(pWindowPoint.y), (LPCTSTR)csText, (int)stStringlength); I get a rectangle where the =B1 (plus or minus) sign should be. Is there a way I can write the PM sign to ...

Unable to set the formula property of the series class
Hi Guys, I am struggling with one problem. I am trying to change formulae o series in a chart using VBA code given below. But I am getting 'Runtime Error 1004, Unable to set the formula property of the serie class' Code ------------------- ActiveChart.SeriesCollection(1).Formula = _ Replace(ActiveChart.SeriesCollection(1).Formula, "Sheet1", "test") ------------------- Can anybody Please suggest some solution? Thanks, MH -- Malha ----------------------------------------------------------------------- Malhar's Profile: http://www....

Delegate for event in class
I was looking at a tutorial for events and can't figure out his worked with the delegate inside the object. using System; namespace CustomEvents { public class Car { public delegate void OwnerChangedEventHandler(string newOwner); public event OwnerChangedEventHandler OwnerChanged; private string make; private string model; private int year; private string owner; public string CarMake { get { return this.make; } set { this.make = value; } } public string CarModel { get { return this.model; } ...

HELP--Mutual funds flip from Class B to Class A in Money 2004. #2
We just had a bunch of shares in a Class B mutual fund flip to Class A. The statement shows it as a 'tax free conversion flip.' Anyone have any ideas how to enter this in Money 2004 (Premium)? (An answer from 1999 says "to remove the shares from fund B and add them to fund A with the add shares transaction having the appropriate cost basis"--but admits that this is not a perfect solution as it will result in a hsort terms capital gain for the year.) Many thanks, Dave In microsoft.public.money, Dave Rogers wrote: >We just had a bunch of shares in a Class B mutual f...

Confirm what happens with Item Class rolldown
Can someone confirm what actually happens if you roll down the changes when you change something on an Item Class? I need to change just one distribution account number. If I tell it to roll down the changes, will it ONLY change this particular account number on all the items that have this class? I need to make absolutely sure that nothing else will be changed if I tell it to roll things down. Hi Bud The system will do exactly what is says - it will roll down "the changes" that you have made. So, if you only change 1 GL account code then it will only roll down that 1 ...

Problems saving Class Notes with Word for Mac OSX
Every time I try to save my recorded class notes with Microsoft Word for Mac, my laptop freezes up and I end up having to Force Quit the app., and sometimes it wil allow me to recover the file and then save it. The problems seems to be getting worse.<br> <br> Any suggestions? Are you creating a fresh document each time, or trying to copy the old one? Start a fresh document each time. Notebook Layout documents do not like being edited. If it's not that, I need to know your CPU type, OS version and Word version to answer. On 12/02/08 12:41 PM, in article ee8d124.-1@webcross...