|
I can't see how COpenGLView can be your top level window. This is a view within your MainFrame. It would seem to me that your other app is sending to the MainFrame window not the View.
Neville Franks, Author of ED for Windows
www.getsoft.com
|
|
|
|
|
ooops, you're completely right. i should have my wrists slapped for not taking the time out to really understand the document/view architecture. i am now rerouting the message to COpenGLView, which is a child of the the mainframe window. thanks.
|
|
|
|
|
Thanks for everyone's help with this one. Finally it works
The end result was to handle WM_KICKIDLE , as my parent dialog wasn't receiving any WM_IDLEUPDATECMDUI messages. I then had to use SendMessage to pass the message on to all of the child dialogs because PostMessage didn't work.
|
|
|
|
|
Hi,
I'm a begginer in C++ and I've a problem allocating memory on the heap and I'd really appreciate if somebody could help me.
Here's the code:
MyStructure *pMyStructure = new MyStructure[ELEMENTS];
// Do some code here
delete [] MyStructure
Where MyStructure is a structure I've created and I want an array of it.
The problem is when I try to delete the structure, I get some messages like that:
Expression:_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
I don't understand what is happening and what I'm doing wrong. Could anybody tell it to me?
|
|
|
|
|
Hi again,
Since I posted the message I've found what was happening:
MyStructure *pMyStructure = new MyStructure[ELEMENTS];
// Do some code here
delete [] MyStructure;
What whas happening is that somewhere in
//Do some code here
I had a loop where I increased pMyStructure (pMyStructure++) to access the elements of the array. I've found that if before deleting the array I decrease the pointer until it's initial value, I can delete it without any error.
What I'd like to know is why it happens and if I'm doing right accessing the array that way.
Thanks in advance,
|
|
|
|
|
the problem is that a pointer is just a number. there's nothing else to it. and when you change its value, it no longer points to the same thing.
but when you delete something, the pointer you're deleting must point to the start of the block of memory that was actually allocated - which it probably won't be, if you've changed the pointer's value.
so, do something like:
MyStructure *pMyStructure = new MyStructure[ELEMENTS];
MyStructure *pCur = pMyStructure;
pCur++;... whatever you want.
delete [] MyStructure;
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Thanks, I've understand it!
|
|
|
|
|
I would like to know how i could use in ADO, the method Item or GetItem, when i don't want to specify the name of the field i need but its index
How could i do that?
thanks in advance
gerald
|
|
|
|
|
Because of the pace of work I get very little chance to look at this discussion group but it's one of the single most useful resorces on the Net and has never let me down.
Does anyone know if there is any CD archive of the past threads or are there any plans to capture one. I would be willing to pay for such a service and I'm sure many others would be as well. I don't mean any fancy searchable database or anything like that - just a copy of the whole discussion group. It would be one of the most valuable resources for me.
Have Fun!
|
|
|
|
|
It'd be better to post this message in th Suggestions Forum, so Chris can see it
|
|
|
|
|
i am making an app using the CFtpConnection and CInternetSession classes.
when i try to connect (or any ther action to the server), my program freezes, the window is not refreshed, how can i solve this? by creating a new thread? if yes than who do i do that?
and another quastion: on my dialog i have a TListCtrl wich shows the files on the server, how can i extract their icons fot the display?
thanks
|
|
|
|
|
Hello
How can i inseret different font color lines to a TRichEdit?
some code will be great!
thanks
|
|
|
|
|
I think that people here are using VC++, not C++ Builder.
Or did you mean CRichEdit ?
Anyway, I can't help, sorry!
Paolo
|
|
|
|
|
Hello all...
I'm lost... maybe because I'm searching to deep, but anyway. My collega came to me for help, but unfortunately..
Let's take a look to this sample:
class CMySystems{
};
class CMyDetails{
};
void xxx::SomeMethod( void )
{
...
m_wndMyCtrlBar.AddView("Systems", RUNTIME_CLASS(CMySystems));
m_wndMyCtrlBar.AddView("Details", RUNTIME_CLASS(CMyDetails));
...
}
Now the problem:
In the class CMySystems I want to be able to use methods from the class CMyDetails.
How can I at runtime pass the 'this' pointer of the CMyDetails class to the CMySystems?
Thanks in advance,
EiSl
|
|
|
|
|
It seems that TabControlBar creates CMySystems and CMyDetails objects for you - one of the CRuntimeClass responsibilities is creating CObject-derived objects. If your question is how to get actual object after it is created by CRuntimeClass, the answer is: you depend on TabControlBar. This class should give you access to its views; I'd expect something like TabControlBar::GetFirstView/GetNextView. Since it's 3rd party class, I can't help you futher.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi!
Does anyone know, how can I create new NT user?
Thanks a lot.
|
|
|
|
|
Look up the NetUserAdd() function in MSDN.
Jon Sagara
"Left-handed nunchakus!"
|
|
|
|
|
Hi,
I would like to create a function with 8 Inputs and the result is in 4 Ouputs.
How can I declare it?
Best Regards
youssef
|
|
|
|
|
Hi
Are you really shure that you want to have that many in and outputs in one function? Maybe the function is doing too much and you should consider splitting it up in several functions.
Else, while a function only can return one value you have to get the result through the parameters in the function using pointers or references. Something like: myFunction(in1,in2,in3,in4,in5,in6,in7,in8,*out1,*out2,*out3,*out4).
/Per
|
|
|
|
|
the other asy is to group your values into structures or clases (input and output)
then it's easy...
COutputInfo DoSomeCalcs( CInputInfo in )
{
:
}
=)
|
|
|
|
|
Hi!
Does anyone know, how to determine (until preprocessor defines) the app use MFC or not, if included support MFC in static library ?
|
|
|
|
|
When using the DLL version of MFC, the symbol _AFXDLL is defined. When using the statically-linked version, it's not defined.
As for whether MFC is being used or not... it looks like you can check for __AFX_H__, which is defined when afx.h is #include'd.
--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
-- Chris Maunder
|
|
|
|
|
Hi,
I know how to import say a dialog box from another project,
project->add to project->files->the_resource_file.rc
But don't know how to import that dialog's class from the other project.
I want to be able to import a dialog box and it's class, so I wont have to recreate member variables and all the rest of them things. How can I go about that?
Thanks
|
|
|
|
|
Import the h and cpp files.
|
|
|
|
|
I did, that didn't work, might there be something wrong with my compiler?
Because even though I could see the dialog class in the class view, when I right clicked on the dialog box (in the resource editor) and chose class view, that gave me the options:
1)create a new file and
2)Choose an existing one
when I chose to associate it with and existing one, the class (of that same dialog box-imported)that was supposed to be there WASN'T, and I repeat, I could see it in the class view, and I could see the .cpp and .h files in the file view.
Now, what is going on? I really need help, I wouldn't like to waste a whole day remaking the old things.
Thanks a lot
P.S. I hope I make sense
|
|
|
|