|
Hello
Are you sure that static members are on the heap? That would imply they are dynamically allocated would'nt it? Also if you have an item on the heap you would need to use 'delete' at some point for clean up. If you can send me a reference for this I would be most interested.
Thanks !
|
|
|
|
|
Sorry, I was wrong about this, it seems.
The most common place to store static variabels seems to be in the data segment of the program.
Sorry.
But the rest is true!
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
I did a google on 'static heap C++ allocation'. It seems on some systems its on the heap and others on the stack. But it is allocated at run time.
|
|
|
|
|
kakan wrote: Correct me if I'm wrong, but as far as I remember, a static variable gets a fixed position on the heap.
Nope. Not on the heap.
|
|
|
|
|
Add the following to your test:
void effect( void )
{
int change = 1;
}
int main( )
{
int *p;
p = create();
effect();
cout ...
...
}
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hi how are you ?
How can i get the caption of a bouton is it possible
thanks
zizzzzzz
|
|
|
|
|
zizzzz wrote: caption of a button
How about using GetWindowText()?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
zizzzz wrote: Hi how are you ?
fine since last day... what about you ?
zizzzz wrote: How can i get the caption of a bouton is it possible
sure it's possible... everything's possible in C++.
CString strCaption = _T("");
CButton* pMyButton = NULL;
pMyButton = (CButton*)GetDlgItem(IDC_MY_BUTTON);
pMyButton->GetWindowText(strCaption);
|
|
|
|
|
I m fine too !
I hope that there is nothing wrong with you
thank's
zizzzzzzzzzzz
|
|
|
|
|
What does _T mean in your code:
CString strCaption = _T("");
How would the following differ?
CString strCaption = "";
Thanks
|
|
|
|
|
it means that in ANSI, the string will be seen as "" (const char* ), but in UNICODE, the string will be seen as L"" (const wchar_t* ).
|
|
|
|
|
I know you already have the answer to your question, which is nice.
You really need to have a better title for your post than "o".
If someone hadn't already replied, I'd have ignored your message completely.
Iain.
|
|
|
|
|
I'm really sorry i didn't mean it because I left the title to
the end and then i hit the bouton post message without checking out
I forget it
sorry !
|
|
|
|
|
but you still can use the <small>[Modify]</small> link, even when posted
|
|
|
|
|
iam looking for ways to convert an ActiveX DLL created with MFC into an MFC executable application. Wanted to know the various settings changes that needs to be done in visual studio project settings. How to change the entry point function from DLLMain() to that of an WinMain()?
Thanks and Regards,
Pradeep
|
|
|
|
|
An activeX is contained in an application that interracts with it. If you have a standalone ActiveX, that's useless. Take for example the grid control: what's the purpose of having a 'standalone' grid that does nothing, except that you are able to write things in the cells ?
Why do you want to do such a thing anyway ?
|
|
|
|
|
I have a tree control in a form view.Now i want to change the views with in the form view by selecting the items in the tree control i.e,by selecting a item in the tree control the options related to that item should display(with in the form view itself).How can i do this.
Thanks.
|
|
|
|
|
|
Hi,
Thanks for ur reply.It is nice,but i want to change the view with in the same splitter pane in which i have the tree control.I want to change the rest of the view except the tree control i.e, the tree control remains fixed at the same place and different buttons related to each selected tree item should be displayed.As a whole switching views with in a splitter pane consisting of tree control.
Thanks.
|
|
|
|
|
I have a somewhat similar situation in that the right side of the view is actually a property sheet control (tree control fixed on the left) and I use the tree control to display different 'pages' of the property sheet. When a tree item is selected I simply call a SwitchPage rotuine to display the proper page. The property sheet doesn't display tabs or anything goofy so it is somewhat transparent to the user that the seperate views are actually property pages
hope this helps
cje
|
|
|
|
|
Thanks.Is there any article based on the above concept.
|
|
|
|
|
not that I am aware of
cje
|
|
|
|
|
There are tons of memory leak detectors out there, my personal favourite being 'Visual Leak Detector'. But I have found nothing that can perform a similar detection of GDI memory leaks. It has just taken me 2 hours to track down an unreleased DC. Does anybody have any suggestions for GDI leak detectors (preferably freeware/open source) that will make life a little easier?
|
|
|
|
|
Hi, I'm the author of Visual Leak Detector, and I keep hearing similar sentiments. To be honest, I don't know anything at all about GDI resources: how they are allocated, how they are freed... I know literally nothing about them.
However, if you could point me in the general direction of where I can learn the basics, or even just describe to me how you are using GDI resources, I could investigate this area and determine how, if at all possible Visual Leak Detector could be extended to also detect GDI resource leaks.
Cheers,
-- Dan
|
|
|
|
|
Hi all,
What can I use instead of the next line character ( \n ).
<code>
StreamWriter^ write = gcnew StreamWriter(holdSMSFileName);
write->Write("\n");
</code>
The \n character causes a problem in notepad.
Thanx in advance
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|