|
|
<br />
char buff[300];<br />
sprintf(buff,_T("%-16s %d"),"Walter",20);<br />
printf(buff);<br />
Will output:
"Name 20"
-Randor (David Delaune)
|
|
|
|
|
Looks like the forum removes spaces too!
It will output:
"Walter (lots of spaces)20"
-David Delaune
|
|
|
|
|
Randor wrote: Looks like the forum removes spaces too!
Unless you use the appropriate tag.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Are you referring to the HTML non breaking space? '&nbsp'?
If so, I considered that on the second post, but took the lazy route since I did not feel like pasting 20 of them.
-Dave
|
|
|
|
|
Randor wrote: Are you referring to the HTML non breaking space? ' '?
No, I was referring to <pre> or <code>.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I actually tested with <code> in the preview in the second post and it didn't work. However <pre> seems to work. Thanks for the tip.
-Dave
|
|
|
|
|
Is it possible to place an Edit Box on a "main window" and access it from a child window without going through all kinds of hoops?????
Thanks in advance
Pierre
|
|
|
|
|
pblais wrote: Is it possible to place an Edit Box on a "main window" and access it from a child window without going through all kinds of hoops?????
do you mean hope?!
Never heard about Window handles (or CEdit pointers?)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
nope....
I really meant "hoops"
I am fairly new to this and was hoping for an easy way to do this
Thanks
|
|
|
|
|
It's not difficult: Have a look at GetDlgItem , either the MFC flavour or the WINAPI one, depending upon your tastes.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
pblais wrote: and was hoping for an easy way to do this
Well the "easy" way is to hire an experienced skilled software developer. You know... someone that has spent years of their life studying the vast expanse of the software development world and therefore knows and understands the fundamental, complex and detailed aspects of it.
or you could get the book "Learn C++ in 21 days"
|
|
|
|
|
led mike wrote: Well the "easy" way is to hire an experienced skilled software developer. You know... someone that has spent years of their life studying the vast expanse of the software development world and therefore knows and understands the fundamental, complex and detailed aspects of it.
or you could get the book "Learn C++ in 21 days"
I forgot to mention that I have been successfully writing and testing MFC Dialog type applications for quite a few years now, many with child windows. I have never had a reason for a child window to access any controls from any other windows so it never was an issue. Recently, that situation presented itself. To save time exploring how to do this, I posted here. My mother always said "if you can't say something nice, don't say anything at all". So please keep your condescending attitude to yourself Mike
|
|
|
|
|
pblais wrote: I have been successfully writing and testing MFC Dialog type applications for quite a few years now
I'm impressed.... no really I am
pblais wrote: I have never had a reason for a child window to access any controls from any other windows
Yeah, attitude aside, you don't want to. See the Mode-View-Controller Design Pattern[^] I figured, just because your mad, that's no excuse to develop lousy software.
|
|
|
|
|
If you have a handle to main window,yes.
|
|
|
|
|
|
You're welcome.
|
|
|
|
|
I want to create dialog based application in vc++ where on clicking send button the mail has to be sent through outlook express.How should I make use of MAPI for that?
|
|
|
|
|
Start here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
In my activex control i allow user to set new font for the display text. What i have done is i added a property which accepts a LPFONTDISP in its SettheFont() method. But at the time of accessing this property from visual basic a 'Run-time error '91' object variable or with block variable not set' is displayed. This problem is only with FONT property. All other properties are successfully accessed.
Any ideas??
Thanks in advance.
Regards,
John.
|
|
|
|
|
emmmatty1 wrote: Any ideas??
At the moment no. But if you post the relevant Active X code (and possibly the VB call) maybe newborn ideas will appear...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
#include <iostream>
using namespace std;
int main()
{int n,m;
for(n=101;n<=200;n++)
for(m=2;m<=n;m++)
if (n%m==0) break
else
cout<
|
|
|
|
|
#include <iostream>
using namespace std;
int main()
{
int n, m;
for(n = 101; n <= 200; n++)
{
for( m = 2; m < n; m++)
if (n % m == 0 ) break;
if ( m == n) cout << n << endl;
}
return 0;
}
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|