|
U can use LOGFONT structure ...
fill this structure for font and manupulate ur font according 2 u.. in OnInitDialog function.
Enjoy......
|
|
|
|
|
please delete your duplicate post.
and also, keep your english up please
|
|
|
|
|
CFont also provide same with Create call in MFC or CreateFont call in Win32 api
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hello,
I have a solution containing 4 different projects and whenever I try to build one of the projects VC++ rebuilds the entire solution (every single file for each project !) even if nothing has been modified since the last build. This is very annoying as certain projects are quite big and are a bit long to build.
I checked for circular dependencies but this is not the case.
Has anyone else had this problem??
Thanks,
Sylv33
|
|
|
|
|
Are you sure to use PCH files? Make sure this option is set.
- Malli...!
|
|
|
|
|
Yes I'm using PCH files.
This problem only happens when I have a solution containing multiple projects. Everything builds fine when I only use a single project.
|
|
|
|
|
Sylv33 wrote: Has anyone else had this problem??
Sorry, no. I've got a solution that has 8 projects in it and the "build only what changed" works fine. If anything, it occasionally misses a dependency and doesn't rebuild enough.
Before you ask it to build, go through Explorer and look at your date/time stamps on your .obj files and check what they show copmpared to the date/time on the source files. Maybe something else is messing up your file dates.
Judy
|
|
|
|
|
In VC++ can we make variable of less than a byte, something like store data of 4 bits?
--
"Programming is an art that fights back!"
|
|
|
|
|
I dont think so.May be i am wrong but as per i know it is not possible.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
you cannot for individual variable, but using structure bitfields you can specify the size of struct member variable in bits.
struct Date {
unsigned short nWeekDay : 3;
unsigned short nMonthDay : 6;
unsigned short nMonth : 5;
unsigned short nYear : 8;
};
modified on Friday, May 23, 2008 3:14 AM
|
|
|
|
|
Wow that's gr8
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
thats good.
but here what is the size ofthe structure?
my doubt is unsigned short is 16 bits.
but the items of the structure demands 22 bits.
so ifthe structure sizeis 32 bits (2 shorts)
can you explain howthe memory is allocated to the items?
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
chandu004 wrote: but here what is the size ofthe structure?
my doubt is unsigned short is 16 bits.
but the items of the structure demands 22 bits.
so ifthe structure sizeis 32 bits (2 shorts)
can you explain howthe memory is allocated to the items?
A bit clearer, please.
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
|
|
|
|
|
Click here ->[^]
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
i know the concept of bit fields, my dearfriend!
struct Date
{
unsigned short nWeekDay : 3; // 0..7 (3 bits)
unsigned short nMonthDay : 6; // 0..31 (6 bits)
unsigned short nMonth : 5; // 0..12 (5 bits)
unsigned short nYear : 8; // 0..100 (8 bits)
};
based on the above example,
nweekday+nMonthDay+nMonth occupies 3+6+5=14 bits,
so 2 bits are left over in the first short.
but my doubt is,
will nYear usethese two bits and remaining 6 bitsform other short or not?
|
|
|
|
|
It seems you know the answer and just put as question, if my arrogant assumption is correct, why don't you share the knowledge instead, if not see below,
chandu004 wrote: will nYear usethese two bits and remaining 6 bitsform other short or not?
No, Bit fields that cross the type boundary will skip bits to align the bitfield to the next type alignment, where type is the type of bitfield member. so, since nYear requires 8 bits and doesnot fit previous type (unsigned short - 16 bit) boundary, it skips to next 16 bit (unsigned short (type of nYear)) boundary. (PS: types other than int, like char, bool, short are not supported by every compiler.)
|
|
|
|
|
See #pragma pack()
You can use it to modify the default memory alignment for the compiler, it's argument is the number of bytes, the only valid values are 1,2,4,8,16.
|
|
|
|
|
you can specify the size in bits of each individual member, but still the total size in bits is less than 8, the instanciated structure will be 1 Byte minimum !!!
|
|
|
|
|
toxcct wrote: the instanciated structure will be 1 Byte minimum !!!
nope ! minimum size of storage unit depends on machine word length.
The Standard says that fields are packed into ‘storage units’, which are typically machine words. The packing order, and whether or not a bitfield may cross a storage unit boundary, are implementation defined. To force alignment to a storage unit boundary, a zero width field is used before the one that you want to have aligned.
struct MyOneBitStruct {
unsigned nOneBitMember : 1;
};
size_t nOneBitStructSize = sizeof(MyOneBitStruct);
run and check the value of nOneBitStructSize, as per your statement it should be sizeof(BYTE) (bitfields other than integer type is not supported by every compiler)
Offcourse, hardware does access to the complete word or individual Byte or individual bit depends on capability, but as far as the variable is language specific (Software part) accessing the variable is managed to the number bits specified in bitfields that is internally managed by compiler. And OPs question variable of less than byte size is answered by bitfields.
|
|
|
|
|
|
rp_suman wrote: can we make variable of less than a byte
no way.
actually, you could if your system could address bits, but that's not the case.
I believe some embedded electrical RAM for very specific needs can do that, but not that is into common computers though...
so even you use tricks to point to a particuliar bit (the struct tip explained in another post in this thread), the minimum amount of memory reserved will be a full Byte...
|
|
|
|
|
Thanks a lot for great help from everybody!!
Thanks & Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
How to convert CString to char* in vc++ 6 platform
Trioum
|
|
|
|
|
If unicode is not enabled this is done automatically (CString has a LPCTSTR). If UNICODE is enabled, then you should perhaps revise what you are doing and use TCHAR instead of char*. For which exact reason do you want the conversion ?
|
|
|
|
|
actually I want to getvalue from editcontrol in char* format
also set the value from char* to the editcontrol.
Trioum
|
|
|
|