Click here to Skip to main content
15,895,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: geting font from hdc (GDI) in API way Pin
ravjak28-Apr-04 2:41
ravjak28-Apr-04 2:41 
GeneralRe: geting font from hdc (GDI) in API way Pin
Steve S28-Apr-04 1:47
Steve S28-Apr-04 1:47 
GeneralRe: geting font from hdc (GDI) in API way Pin
ravjak28-Apr-04 2:37
ravjak28-Apr-04 2:37 
GeneralFormat string function Pin
Anonymous28-Apr-04 1:29
Anonymous28-Apr-04 1:29 
GeneralRe: Format string function Pin
toxcct28-Apr-04 1:50
toxcct28-Apr-04 1:50 
GeneralRe: Format string function Pin
Anonymous28-Apr-04 2:07
Anonymous28-Apr-04 2:07 
GeneralRe: Format string function Pin
toxcct28-Apr-04 2:19
toxcct28-Apr-04 2:19 
GeneralRe: Format string function Pin
ravjak28-Apr-04 2:33
ravjak28-Apr-04 2:33 
suppose your string is
char str[]="......"
<br />
#define MIN(a, b)  (((a) < (b)) ? (a) : (b))        <br />
<br />
        int str_len = strlen(str);<br />
	int LINE_LEN=7; //you will nead here 80<br />
	int c=(int)ceil((float)str_len/(float)LINE_LEN);<br />
	char *str2= new char[str_len+c+1];<br />
	int n=0;<br />
	int m=0;<br />
	for(int k=0;k<c;k++)<br />
	{<br />
		m= MIN(LINE_LEN,str_len-LINE_LEN*k);<br />
		strncpy(str2+n,str+(LINE_LEN*k), m );<br />
		n+=m;<br />
		str2[n++]='\r';<br />
        }<br />
        str2[n]=0;<br />
       //do something ....<br />
       delete[] str2;<br />
<br />


Pain is a weakness living the body
GeneralHelp me, please Pin
Roozbeh6928-Apr-04 1:20
professionalRoozbeh6928-Apr-04 1:20 
GeneralIsConnected to internet Pin
Member 101882328-Apr-04 0:32
Member 101882328-Apr-04 0:32 
GeneralRe: IsConnected to internet Pin
Jitendra gangwar28-Apr-04 0:56
Jitendra gangwar28-Apr-04 0:56 
GeneralRe: IsConnected to internet Pin
Antti Keskinen28-Apr-04 1:00
Antti Keskinen28-Apr-04 1:00 
GeneralRe: IsConnected to internet Pin
vcplusplus28-Apr-04 2:45
vcplusplus28-Apr-04 2:45 
GeneralRestarting a running program Pin
pma27-Apr-04 23:57
pma27-Apr-04 23:57 
GeneralRe: Restarting a running program Pin
22491728-Apr-04 0:03
22491728-Apr-04 0:03 
GeneralRe: Restarting a running program Pin
Prakash Nadar28-Apr-04 0:32
Prakash Nadar28-Apr-04 0:32 
GeneralRe: Restarting a running program Pin
22491728-Apr-04 0:57
22491728-Apr-04 0:57 
GeneralRe: Restarting a running program Pin
Jitendra gangwar28-Apr-04 0:33
Jitendra gangwar28-Apr-04 0:33 
GeneralRe: Restarting a running program Pin
22491728-Apr-04 0:51
22491728-Apr-04 0:51 
GeneralRe: Restarting a running program Pin
Jitendra gangwar28-Apr-04 1:05
Jitendra gangwar28-Apr-04 1:05 
GeneralRe: Restarting a running program Pin
Member 101882328-Apr-04 2:16
Member 101882328-Apr-04 2:16 
GeneralRe: Restarting a running program Pin
Jitendra gangwar28-Apr-04 2:33
Jitendra gangwar28-Apr-04 2:33 
GeneralRe: Restarting a running program Pin
pma28-Apr-04 12:02
pma28-Apr-04 12:02 
GeneralBatch files for Visual source safe Pin
Md Saleem Navalur27-Apr-04 23:26
Md Saleem Navalur27-Apr-04 23:26 
GeneralRe: Batch files for Visual source safe Pin
Anonymous27-Apr-04 23:42
Anonymous27-Apr-04 23:42 

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.