|
|
Open the file in different mode or flag
|
|
|
|
|
|
hi,
i need to place a bitmap on button along with the text on the button. i tried using CBitmapButton but don't get the text or rather the caption of the button. any suggestions???
|
|
|
|
|
I think you can only do that on toolbar control buttons, not on standard buttons.
You can make the text part of the bitmap though May be a problem for a multi-language app
though.
|
|
|
|
|
isn't there a way to keep the caption of the button same and getting the bitmap in one corner of the button?
|
|
|
|
|
Can you derived CButton and use of WM_DRAWITEM ?
|
|
|
|
|
Sunshine Always wrote: isn't there a way to keep the caption of the button same and getting the bitmap in one corner of the button?
I agree with WhiteSky. You'd have to draw it yourself.
|
|
|
|
|
This is right approch to go with CBitmapButton. use LoadBitmaps after create cBitmapButton
Please give code how u r doing this
Subhash jain(Sundyne Technologies Pvt. Ltd. Lower Parel Mumabi)
|
|
|
|
|
why do you need LoadBitmap after CBitmapButton?
|
|
|
|
|
|
I think that your question is that has a function that set visibly.
|
|
|
|
|
Hi.
I have an issue understanding heaps. Here is the header file given and I am supposed to fully implement a max Heap ADT. Here is what I know about heaps:
A heap is a complete binary tree and it should be stored as a vector of keys.
and in a max heap each node in the tree has a key which is less than or equal to the key of its parent.
My questions are:
1-What happens inside the Constructor? Is it just like a regular tree where you set root = NULL?
2-What would the private data members be?
3-What is the difference between protected and private?
I would appreciate it if someone could take the time and explain this to me. Please note that I am not asking for a full solution, I just need to understand some basics so I can get rolling on the full implementation.
Thanks in advance for any tips.
typedef int key;
<br />
class heap<br />
{<br />
public:<br />
heap();
heap( xxx );
virtual int size() const;<br />
virtual bool is_empty() const;<br />
virtual key top() const;<br />
virtual void insert( const key &new_key );<br />
virtual bool remove()
protected:<br />
virtual void rebuild( int root );
virtual void rebuild();
private:<br />
<br />
}
|
|
|
|
|
HondaCBR600 wrote: What is the difference between protected and private?
protected members are visible to classes derived from this one.
Christian Graus - C++ MVP
|
|
|
|
|
Hi Experts,
I need to capture the Video frame buffer on Windows Mobile platform. I am using Windows Mobile 5.0 SDK for the same purpose. It provides me GAPI interface to get the framebuffer. (GX.LIB).
Unfortunately, I am not able to link with GX.LIB and I am getting the linking error when try to open the display.
error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GXOpenDisplay(struct HWND__ *,unsigned long)" (__imp_?GXOpenDisplay@@YAHPAUHWND__@@K@Z
Windows Mobile 5.0 Pocket PC SDK (ARMV4I).. fatal error LNK1120: 1 unresolved externals
I found GX.LIB and GX.H are present in the PATH.
I am new to Windows Environment is there anything else I have to do to get access to the functions of GX.LIB. I am sorry it's very silly question.
Thanks & Best Regards,
|
|
|
|
|
Verify the path where u r giving gx.lib and also give it refernce to gx.dll
Subhash jain(Sundyne Technologies pvt. ltd Lower parel Mumbai)
|
|
|
|
|
Recently, i develop an programme about sniffer by MFC.
in this period,i use TabControl which consist of two child dialogs.
now in order to correspond to the main dialog which the TabControl locate in,I need adjust the size of TabControl and two dialog to main dialog.
The size of tabcontrol has adjusted ,but I don't know how to realize the adjusting the size of two child dialogs to the main dialog ?
Thank you for your help !
|
|
|
|
|
I assume the dialogs are modeless ? If so, you need to call a method, instructing them to resize. If not, you should set them up to pass in a size when you create them.
Christian Graus - C++ MVP
|
|
|
|
|
Hello all,
I cannot access names[0] and names[1] inside function B. It is null if i try to access them. Can anyone help ?
funcA{<br />
char * Names[] = {};<br />
int next = 0;<br />
char * list = "Abc";<br />
<br />
<br />
Names[ next ] = malloc( sizeof( char )*( strlen( list ) + 1 ) );<br />
memcpy( Names[ next ],list,sizeof( char )*( strlen( list ) + 1 ) );<br />
<br />
list = "cdefg";<br />
Names[ next+1 ] = malloc( sizeof( char )*( strlen( list ) + 1 ) );<br />
memcpy( Names[ next+1 ],list,sizeof( char )*( strlen( list ) + 1 ) );<br />
<br />
printf("vsp list got is %s\n", Names[0] );<br />
printf("vsp list got is %s\n", Names[1] );<br />
<br />
funcB(....,...,(const char**)&Names);<br />
}<br />
<br />
funcB(...,...,const char ** names)<br />
{<br />
....<br />
...<br />
free( (char*)names[0]);<br />
free( (char*)names[1]);<br />
<br />
}
|
|
|
|
|
This is C, not C++ ?
I believe you want to cast Names to char **, and not the address of Names. I think an array is a pointer by definition. You could also declare Names as char **.
Christian Graus - C++ MVP
|
|
|
|
|
This is C. this is my first small exercise in pointers and arrays.
a.)Where do you say I have to cast Names to char**?
I should be able to access all the names inside function B. How should i do it?
b.)If i declare as char ** Names, then how do I do malloc on Names[0]?
It will be great help for me to understand better if you could show/make changes in the code snippet.
Thanks for your time.
|
|
|
|
|
In C++, I would do this:
char ** names = new char * [2];
names[0] = new char[len1];
names[2] = new char[len2];
Where len1 and len2 are the lengths of my strings. I guess you can use malloc in the same way.
I'm saying that when you pass &Names, I think it's a char ***, because a char * [] is the same as a char **. At least, I think so.
Christian Graus - C++ MVP
|
|
|
|
|
char ** names = new char *[2];
but I do not know if the names would be just 2 ...say if it is to be any number of names. then how do we do it?
|
|
|
|
|
I see what you'e doing. You can't dynamically add to an array. You can put a variable in place of the 2, but you can't add to the list, to do that you need to write a dynamically allocated array ( which typically keeps some space in reserve, and then reallocates itself to a new memory block when more is needed ).
C++ has classes to do this, I don't believe there is anything in C.
Christian Graus - C++ MVP
|
|
|
|
|
thanks for that.
If Say, i know the dimension of the array.
int count =4;<br />
int i = 0;<br />
char * Names[count];<br />
<br />
for(i=0; i < count; i++)<br />
{<br />
Names[i] = NULL;<br />
}<br />
and then do the rest. Is the initialisation correct?
is what i have done equivalent to doing
char *Names[4] = {NULL,NULL,NULL,NULL};
|
|
|
|