Click here to Skip to main content
16,005,552 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Store the contents of a stucture in a file Pin
RadioShark21-Mar-04 22:04
RadioShark21-Mar-04 22:04 
GeneralRe: Store the contents of a stucture in a file Pin
jhwurmbach21-Mar-04 22:16
jhwurmbach21-Mar-04 22:16 
GeneralRe: Store the contents of a stucture in a file Pin
jhwurmbach21-Mar-04 22:16
jhwurmbach21-Mar-04 22:16 
GeneralShowing a Tabbed Dialog box Pin
Tariq87821-Mar-04 19:30
Tariq87821-Mar-04 19:30 
GeneralRe: Showing a Tabbed Dialog box Pin
Michael P Butler21-Mar-04 21:56
Michael P Butler21-Mar-04 21:56 
GeneralPass Data to form using HTTP.. Pin
rasha200321-Mar-04 18:39
rasha200321-Mar-04 18:39 
GeneralUsing MS Office Spreadsheet ActiveX Control Pin
JonahD21-Mar-04 17:55
JonahD21-Mar-04 17:55 
GeneralDrawing on a dialog box Pin
monrobot1321-Mar-04 17:45
monrobot1321-Mar-04 17:45 
I'm using this code to draw on a dialog box and had a quick question.
CClientDC dc (this);

	CRect rect;

	GetClientRect (&rect);
	dc.SetBkMode (TRANSPARENT);

	CFont font;
	font.CreatePointFont (100, _T ("Arial"));
	CFont* pOldFont = dc.SelectObject (&font);

	
	CString str (_T ("Hello World"));

	dc.TextOut (rect.Width () - 100, rect.Height () - 200, str);

	dc.SelectObject (pOldFont);
I just want to know if this is the best way to write on a dialog without using a control of any type? I thought of another question that'd I'd like to ask. If I wanted to print text next to a control on the dialog (say an Edit control) how would I get it's coordinates? I've tried using GetClientRect and GetWindowRect (both with and without using ScreenToClient), but neither of them gets the right position of the window. Any help is appreciated. Thanks.

- Aaron
GeneralApplication (exe) performance Pin
Anonymous21-Mar-04 17:38
Anonymous21-Mar-04 17:38 
GeneralSharing data between dialog Pin
r00k1321-Mar-04 17:08
r00k1321-Mar-04 17:08 
GeneralRe: Sharing data between dialog Pin
Anonymous21-Mar-04 17:41
Anonymous21-Mar-04 17:41 
GeneralRe: Sharing data between dialog Pin
r00k1321-Mar-04 18:17
r00k1321-Mar-04 18:17 
GeneralRe: Sharing data between dialog Pin
jhwurmbach21-Mar-04 22:20
jhwurmbach21-Mar-04 22:20 
GeneralWSAStartup Pin
kpatry21-Mar-04 16:29
kpatry21-Mar-04 16:29 
GeneralRe: WSAStartup Pin
Ravi Bhavnani21-Mar-04 16:44
professionalRavi Bhavnani21-Mar-04 16:44 
GeneralRe: WSAStartup Pin
David Crow22-Mar-04 7:39
David Crow22-Mar-04 7:39 
GeneralRe: WSAStartup Pin
kpatry22-Mar-04 8:11
kpatry22-Mar-04 8:11 
GeneralRe: WSAStartup Pin
David Crow22-Mar-04 8:16
David Crow22-Mar-04 8:16 
GeneralRe: CFile EOF Pin
Ravi Bhavnani21-Mar-04 16:46
professionalRavi Bhavnani21-Mar-04 16:46 
Questionplease help me have a look at the program part below? Pin
vividtang21-Mar-04 14:47
vividtang21-Mar-04 14:47 
AnswerRe: please help me have a look at the program part below? Pin
Christian Graus21-Mar-04 14:58
protectorChristian Graus21-Mar-04 14:58 
QuestionWhere is modeAppend in Serialization? Pin
MeterMan21-Mar-04 13:30
MeterMan21-Mar-04 13:30 
AnswerRe: Where is modeAppend in Serialization? Pin
Rob Manderson21-Mar-04 21:52
protectorRob Manderson21-Mar-04 21:52 
GeneralCDialogBar does not support controls Pin
krugger21-Mar-04 13:19
krugger21-Mar-04 13:19 
GeneralRe: CDialogBar does not support controls Pin
Rob Manderson21-Mar-04 22:04
protectorRob Manderson21-Mar-04 22:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.