|
i want to create a list of bitmasps so i think cimagelist is right choice for me if you have any other idea please share with me and the use of cimagelist control is right choice so please told me how can i use this control.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
Do you use CimageList for CLitctrl?
|
|
|
|
|
hi all
i want to know when we first time add menuitem and after a while we again append them these menuitems are disalbled. why it is this in the toolbar and the menuitems.
ddd
|
|
|
|
|
tasleem143 wrote:
after a while we again append them these menuitems are disalbled
What do you mean by appending menuitems? Are you adding menus dynamically?
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
no no i mean add the new menuitem with new id.
ddd
-- modified at 2:06 Wednesday 8th March, 2006
|
|
|
|
|
You can set this member variable of CFrameWnd class to FALSE ...
CFrameWnd::m_bAutoMenuEnable = FALSE;
Do this inside the mainframe constructor. When this member variable is set to true new menu items with no ON_COMMAND and ON_UPDATE_COMMAND_UI handlers are disabled. By setting this member to FALSE you can prevent this.
Nibu thomas
Software Developer
|
|
|
|
|
SAME IS THE CASE WITH THE TOOLBAR HOW TO SOLVE THAT
ddd
|
|
|
|
|
Override OnCmdMsg and return TRUE . Don't forget to call the base class handler.
For eg:
BOOL CMainFrame::OnCmdMsg(UINT nID, <font color=blue>int</font> nCode, <font color=blue>void</font>* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
CFrameWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
<font color=blue>return</font> TRUE;
}
Nibu thomas
Software Developer
|
|
|
|
|
In Vista, in one of my program, invoke "OpenService()" is being refused.
Who can tell me, how can I imporve my program's privilege? I logon as Administrator.
Best Regards.
|
|
|
|
|
Hi,
I want to know the difference between unions and structures in c++ world.
Yonis
|
|
|
|
|
Look Here[^]
Nibu thomas
Software Developer
|
|
|
|
|
Hello Nibu,
Good.
Good style.
I like it.
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
structures reserve memory for all the variables inside it. but Union takes up memory for only the thing that we assign value. and overwrites the same if a value is entered to antoher variable inside it.
VuNic
|
|
|
|
|
VuNic wrote: Union takes up memory for only the thing that we assign value
takes up memory for variable who has maximum amount of byte.
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
|
Your link contains content that verifies what the person-you-are-responding-to said...
The compiler allocates a piece of storage that is large enough to hold the largest variable type in the union What is the confusion?
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
hi VuNic,
VuNic wrote: Union takes up memory for only the thing that we assign value
i'm sorry to say that you are wrong.
a union occupies as much memory as the wider field of the union.
lets say we have this union :
union myU {
long l;
char c;
};
then, even if you assign c which is a char , so 1 byte, the union will weight 4 bits because the longuest field is l (long is 4 bytes).
myU u;
u.c = 5;
ASSERT(sizeof(u) == 4);
|
|
|
|
|
|
i'm sorry, but the author of that article is really not aware on what unions are !!!
all the fields of a union starts at the same address, so, they overlap, and the cosequence of this is that the union length (whatever data it's benn assigned) is the length of the larger field...
|
|
|
|
|
The SDK(telephony) which i'm using is based on 100's of Unions. in that its said that Not all of the items inside the union would be used at a time. moreover only one would be used at a time. so it saves memory when you use Unions. hmm.. i'll check it out again.
VuNic
|
|
|
|
|
The compiler has to allocate enough space for the largest item in the union. If you create a union that contains a char (1 byte), a 32-bit int (4 bytes), and a double (8 bytes), the size of the union will be 8 bytes - always (disregarding alignment and packing). If you create a union containing structures, the size of the union will be that of the largest-sized structure.
The reason the compiler has to use the largest possible size is that the union cannot change its storage size at runtime (just like a structure).
Also there is nothing inside of the union that indicates which data item inside of it is in use. Since this information is unavailable, the space allocated for the union has to use the largest possible size, just in case the largest member of the union happens to be in use, and the the union is passed around to other functions by value (for example). And, even if that information WAS available, there would be nothing stopping the called function from setting a different larger member of the structure, so all of its storage space would have to be there, anyway.
The documentation you read is correct - not all of the members of the union will be being used at the same time - but it says nothing about the storage required for them.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
union EU
{
int eu1;
int eu2;
}eu;
int main(int argc, char* argv[])
{
eu.eu1=10;
eu.eu2=13;
printf("%d",eu.eu1);
}
VuNic
|
|
|
|
|
easy
13
|
|
|
|
|
Hello,
I want to apply the transcoding of the images using C++.
Background :
As the bigger images with the high resolution are taking a long time to load I want to convert the images into low resolution format and to a restricted size. I am working with c++ and using the GDI+ functions to load the images.
Problem : To apply transcoding of images before actual loading.
Thanks in advance ...
Regards,
Mukta.
|
|
|
|
|
Hi,
where you want to load the image? In memory or any control?
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|