|
I think you are working in Win32. Did you try SetFont(/*params*/)
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
<br />
font.CreatePointFont (100,"Arial");<br />
<br />
RECT rect;<br />
rect.bottom = 100;<br />
rect.left = 0 ; <br />
rect.right =100;<br />
rect.top = 0;<br />
<br />
btn.Create ("MyButton",WS_CHILD|WS_VISIBLE,(const RECT &)rect,this,ID_BTN1);<br />
btn.SetFont(&font,false);<br />
font and button are both member variables of the class
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
If you are using win32 API, then -
You can use CreateFont.
Be sure the handle returned by CreateFont ( which you will use for the WM_SETFONT message ) is valid throughout the lifetime of the button window.
If you want to make the font normal for all texts, then following may be helpful-
HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
SendMessage(hwnd, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));
It may be helpful, but not sure......
"We can't solve problems by using the same kind of thinking we used when we created them"
|
|
|
|
|
nguyenbinh07 wrote: the text on this control should be bold.
What is it instead?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
nguyenbinh07 wrote: should be
Should be? YOU are responsible for setting the font
if you want something different
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
All
I have a problem in MFC SDI application.I Want to show a flash window before the SDI frame window is created.
Please help,
how to do this.
Tanmay
|
|
|
|
|
You mean a splash screen ? See here[^].
|
|
|
|
|
|
Have you searched CodeProject for articles on "Splash screen"?
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
|
Hi,
Im having .inf and .sys file in my "C:\Program Files\Inno Setup 5" directory. I want to write the code for copy this file and paste it into "C:\WINDOWS\system32". I dont know, how to implement this.Plz...... help me.....
Regards,
Anitha
|
|
|
|
|
Did you try asking this question in any of the InnoSetup forums? You may get more help over there instead of trying to reframe the question and posting it here time and again.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hello all
I had written a small program to print ones compliment of zero in visual studio, and got the result as -1. I am surprised to see this result. because what I expect was ~0 = 11111111 !!!
Y it is -1 ?
Thank you
|
|
|
|
|
spicy_kid2000 wrote: ~0 = 11111111
Yes, in binary . You are probably storing the result in a signed variable (e.g. an integer or a char). And for a signed variable, if all bits are set, the resulting value is -1.
|
|
|
|
|
Hello , Thank you
in VC++ how can we print the right value ?
|
|
|
|
|
And what is, in your opinion, the right value?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
in my opitions, if it a unsigned int, it should be 2 ^32 -1
|
|
|
|
|
Then store the result in an unsigned int and display it. What's your code ?
|
|
|
|
|
here is my code
int main(int argc, char* argv[])
{
unsigned int i = 0;
printf("%d",~i);
return 0;
}
|
|
|
|
|
Use %u instead of %d. %d is for signed integers and %u is for unsigned integers.
|
|
|
|
|
The flawn is in %d format specifier. According to documentation [^] %d specifies 'signed decimal integer' hence you unsigned number is first converted to signed and the printed out.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
spicy_kid2000 wrote: if it a unsigned int, it should be 2 ^32 -1
Good. The following snippet may possibly confirm you opinion
void main()
{
unsigned int u = 0;
u = ~u;
printf("%u (%x)\n", u, u);
}
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
char myVar = 0xFF;
printf("Signed: %d\n", myVar);
printf("Unsigned: %d\n", (char unsigned)myVar);
system("Pause");
return 0;
}
Output:
Signed: -1
Unsigned: 255
Press any key to continue . . .
|
|
|
|
|
Hi all.
I want to change a date format from dd/mm/yyyy to yyyy/mm/dd..
suppose i am getting date as..
Date = 12/04/2008 i want it to be changed to 2008/04/12..
I am trying with the below code but i am getting the system time..
the code is
CString Date,Datee;
Date = "12/05/2008;"
SYSTEMTIME sysTime;
GetSystemTime(&sysTime);
Datee.Format("%04d%02d%02d",sysTime.wYear,sysTime.wMonth,sysTime.wDay);
can anyone help me
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|