Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with formatting text in a list box

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Okay, here is the problem I have. I've got a list box that I want to format. I have 3 or 4 elements that I'm entering with a single AddString that I'm separating with some spaces. Well, when I do the next AddString, the data doesn't line up. I've tried taking the length of each data and subtracting that from a number so that I can get a set width...however that doesn't work with TrueType fonts because they are different widths. I've also tried to do a multi-column list box, but It's now working like I wanted it to. I've also tried to change the font to a set-width font like Courier...but I can't seem to change the font inside a list box. I don't know what else to do to format this data. Any suggestions or help would be greatly appreciated. Thank you in advance.

Niky Williams
NTS Marketing
 
Doh, solved the problem...

Niky Williams
NTS Marketing
 
Can anybody show me a very simple example of a code in c++ which uses mfc appliation?
 
yes.
The shortest MFC application:
///////shortprog.cpp//////////
#include<afx.h>
class CMyApp:public CWinApp
{
public:
BOOL InitInstance()
{
::MessageBox(0,&quot;start&quot;,&quot;&quot;,0);//some visible effect which is no obligatory

return FALSE;
}
};
CMyApp one_app;

///////shortprog.cpp////////// John Fill
1c.bmp


ivfmd@mail.md
 
one mistake, #include<afxwin.h> instead of #include<afx.h> John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top