|
Why are you using glDrawPixels ?
Can't you use glRect and then apply transformation on it (glRotate for instance) ?
|
|
|
|
|
hello,
i am using it because i was told to use it. I can't use OpenGL for rotation so somehow i need to apply the pixels from glDrawPixels to the rotation matrix...
please don't tell me not to use glDrawPixels and use something else because i am just following the assignment. I must use it. So i am curious having that.. how can go around and trying to rotate those pixels with rotation matrix. NOT OPNEGL...
I know it's not the best way to do it but this is what i am asked to do.
thanks
|
|
|
|
|
The entry NtfsDisable8dot3NameCreation under the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem is set to 0 by default. Now in one of the setups i tried to make this registry entry to 1 to disable short path generation. I did not find the short path getting disabled even after m/c reboot. This info is based on the article at http://support.microsoft.com/kb/121007.
The article mentions the below
NOTE: The change to the NtfsDisable8dot3NameCreation registry entry affects only files, folders, and profiles that are created after the change. Files that already exist are not affected.
Based on this I deleted the file and the folder for which I want the short path generated and later repaired the installation.
The problem that is coming is due to the degernation of short path the windows scheduler is not able to find the file to schedule with other command line params.
Does something related to changing user profile needs to be done?
|
|
|
|
|
Is there any explanation or hints here. Calling microsoft experts.
|
|
|
|
|
I have a rountine in an ActiveX control that is called from another thread (made by some other DLL). I want to be able to raise an event ('Error' in this case which takes a long and a string as argument) which will be caught by the VB6 app which will contain this ActiveX control. Unless I'm mistaken, the reason my VB6 app keeps crashing is because I'm not performing any kind of thread safety. Can someone please let me know what I should be doing here (or if my assumption is wrong)?
void __stdcall MyActiveXCtrl::OnReplyAudio(LPVOID pData)
{
if (CAN_PLAY_AUDIO)
{
ProcessAudio(pData);
if (!m_audioHardware->RequestAudio())
Error(23, _T("m_audioHardware->RequestAudio()=FALSE"));
}
else
UnloadAudio();
}
|
|
|
|
|
After some debugging, I found that the reason it was crashing out was because a FileSystemObject I had in the vb6 code was not playing nice on the thread that raised the Error event. When I take that out, the app stop crashing.
If I was in .Net, I'm sure I could do this stuff with delegates, but I'm not in .Net.
My question still remains, does anyone know the best way in an MFC ActiveX control to raise an event on another thread?
|
|
|
|
|
tadams1138 wrote: does anyone know the best way in an MFC ActiveX control to raise an event on another thread?
There's only one correct way, even though it may look differently depending on the implementation: marshalling.
"Raising an event" in fact means calling an interface implemented by the client from the server. The same rules apply as when calling an interface implemented by the server from a client.
As always, when crossing apartment boundaries you have to marshal the interface. Since the secondary thread in your case is another apartment, you have to marshal the client interface to the secondary apartment.
You also have to make sure you set up the secondary apartment properly by calling ::CoInitialize() from that thread before doing any COM related stuff and consequently call ::CoUninitialize() before exiting the thread.
Marshalling the client interface, or the "event sink", can be done using the GIT (Global Interface Table). You add an interface to the GIT that you want to marshal and get it in the apartment where you want to use it. When you're done with the interface you revoke it from the GIT.
Read more about the GIT here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
hello everybody in this forum . i would like to ask one question about calling com file from c++
i have a com file that is written in c++ also , i need to import that dll and then create object from one of its object classes and invoke its methods , how can i import and initialize Com files in c++ to be able to call its objects and methods in my c++ project ?
please help friends
thanks
Human knowledge belongs to the world.
|
|
|
|
|
[^].
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
[My articles]
|
|
|
|
|
Well done, you're using the right site now
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hey kids (you & 'that I.') stop mocking Daddy: elderly people deserve deference!
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
[My articles]
|
|
|
|
|
In addition to the search, you should also look for "#import", as that will get you started on the way.
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
I am currently writing an application using C++ and MFC. As you might expect in the method InitInstance, I call new to create an instance of the main window class. I assign this pointer to m_pMainWnd. However, I am never freeing the object being created there. I feel this is a problem.
I plan to delete the object in the routine ExitInstance. I would think this would be standard practice but I have not seen any examples in my MFC books that do this. I am wondering why. Could it be that these authors do not do this because they feel it is does not matter since the application will terminate anyway? I kind of feel that they should.
Please comment.
Thanks
Bob
|
|
|
|
|
BobInNJ wrote: I plan to delete the object in the routine ExitInstance
Seems reasonable.
BobInNJ wrote: I would think this would be standard practice but I have not seen any examples in my MFC books that do this. I am wondering why. Could it be that these authors do not do this because they feel it is does not matter since the application will terminate anyway?
Probsbly.
Personally, I use smart pointers[^] to hold pointers. For this case, I might well use a boost::scoped_ptr , which would deallocate the memory in the CWinApp destructor.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Your question is a good one.
But I'll save you the suspense. You'll find an equivalent to the following:
CMDIFrameWnd::OnDestroy ()
{
...
if (m_bSelfDelete)
delete this;
}
This is a the last (or near enough, it might be OnNcDestroy) message a window handles, so it will tidy up after itself.
LoadFrame will set the self delete.
Apologies if there's the odd error in here, this is from memory - but it gets the essence.]
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Yeah - what Iain said. I'd forgotten all about that stuff. In an SDI app, the view deletes itself in its PostNcDestroy method.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I am fetching the data from rtd server in using excel file .I want to store the data in database .Is there any way to to call the data in MFC application so that I can insert into the database.
Trioum
|
|
|
|
|
trioum wrote: Is there any way to to call the data in MFC application so that I can insert into the database.
Yes there is a way. Now can you explain what your sentence means? I mean because "call the data in MFC application" doesn't mean anything to me.
|
|
|
|
|
actually I want to store the data in my database by getting it from rtd server by calling the rtd function in MFC , in similar way excel call it .
Trioum
|
|
|
|
|
trioum wrote: by calling the rtd function
Really? "the" rtd function? You believe that provides us with specific information from which we can help you? Or maybe you are reading from a new Monty Python script?
|
|
|
|
|
led mike wrote: Yes there is a way. Now can you explain what your sentence means?
Welcome again in the CP's Memorable Quotes [^] (plus a plethora of led-points gained back).
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
[My articles]
|
|
|
|
|
trioum wrote: I am fetching the data from rtd server...
Real Time Data?
Database storage aside, are you able to retrieve the data from the server?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
yes I am able to retrieve data from the server in excel file .
Trioum
|
|
|
|
|
So are retrieving an Excel file or a stream of data from the server?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
It is actually third party rtd server .I linked to it via excel and getting the data in excel file .
data is updating within milliseconds .I see the rtd formula on the cell. I donot know it is excel file or stream of data . please suggest the solution for both condition .My AIM is to store every updated data in the database .
Trioum
|
|
|
|