|
First I'll apologize if this is the wrong forum, but I didn't see anything DirectX specific.
I'm making an .X file viewer. Using a rather helpful tutorial on CodeProject I've been able to play my animations, and even make transitions from one animation to the other nice and smooth. All of this using the Animation Controller. I would like to play a given animation in reverse. However, DirectX's animation controller doesn't give you any sort of interface to the animations frames.
I'm fairly new to .X files (although I've been reading a lot) so any help you guys can give will be greatly appreciated.
|
|
|
|
|
Hi,
my problem is that I have a CDialog1(myClass1) in which I insert a propetysheet (using Picture Ctrl) in this propertysheet i add a propertyPage which generate me a CDialog2(myClass2).
I want to get variable from this CDialog and pass it to the first one because I'm sending thoses data into an access table.
I tried to get those parameters with this function
void CGeneralUser::GetParameter(CString& sStatus,CString& sgender,CString& stel,CString& smobile)
{
sStatus=m_status;
sgender=m_gender;
stel=m_tel;
smobile=m_mobile;
}
then I call this function in the first class(myClass1)
like this in boutton OK
CMyClass2 user;
user.GetParameter(sStatus1,sgender1,sTel1,smobile1);
When I write AfxMessageBox(sStatus1) for exemple the messagebox is empty I put UpdateData(TRUE); but it doesn't work
why???? thank's for your help
c zizzzzzzzzzzz
|
|
|
|
|
Please, use the code or pre tags when you post code !
zizzzz wrote: CMyClass2 user;
user.GetParameter(sStatus1,sgender1,sTel1,smobile1);
What you will do here is create a new instance of your CMyClass2 class and retrieve the parameters directly. So, for sure they are still to the default value because it is another class. You have to retrieve the data of your existing class, and not create a new class.
This has nothing to do with dialogs or property pages but with how you manages your classes.
|
|
|
|
|
ok I tried to retreive data from my existing class so I put
in MyClass1.h : CMyClass2 m_classe2;
and I call my parameter like this m_classe.status
i should proceed like that ?
because i had errors when running the programm
thank's
c zizzzzzzzzzz
|
|
|
|
|
hello,
is it possible to have a 64 bit exe which reads the resources of a 32 bit resource-dll like stringtable, icons, bitmaps... ?
if yes, how?
i tested it and the loadlibrary failed.
where can i find more informations about this?
thanks for help
best regards
emmi
|
|
|
|
|
emmi wrote: ...loadlibrary failed.
With what error?
emmi wrote: where can i find more informations about this?
The docs state that if you are attempting to load a 16-bit DLL directly from 32-bit code, LoadLibrary() fails. I assume the same holds true for trying to load a 32-bit DLL directly from 64-bit code.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
You can't load a 32-bit DLL in a 64-bit process (or vice versa). Have you tried BeginUpdateResource() ? I don't know if that works on a 32-bit DLL in a 64-bit process, but it'd be worth a shot.
|
|
|
|
|
I realized that my dialogs are shown in XP-look only when I am using unicode.
Although the manifest is embedded, the look is only available when I use the unicode-option within my project settings.
Is there a real dependency between manifest and unicode or is VS2005 just playing tricks on me?
Thanks in advance,
rammle
|
|
|
|
|
In my experience, manifests work fine in non-unicode builds
|
|
|
|
|
Mhm, I can also easily toogle between manifest look and "old look" by switching the unicode-option within preferences...
|
|
|
|
|
Hello there,
I have recently updated to internet explorer 7 from firefox. I have Internet explorer 6 beforehand.
When I called, CreateWindow with "AtlAxWin" as the class, and the location of my flash file as the title, I can load flash movies from the hard drive.. but when I try and access them from the web, I cannot anymore... I get script errors obviously from the browser component it uses.
Dos anyone know why its doing this since I updated? Is it flash 9 that came with the browser that's doing it? or what?
Many thanks,
Eddie
|
|
|
|
|
When you run a javascript / html document in ie from your hard drive, it displays that "Allow blocked content".
I think that's whats stopping it.
Any other info on how to get around this?
|
|
|
|
|
I'm trying to convert a string into a region without much luck. I have found very few examples of how to do this, but those that I have found are basically the same as my own code.
HDC hMain = GetDC(NULL);
HDC hDcBuf = CreateCompatibleDC(hMain);
BeginPath(hDcBuf);
TextOut(hDcBuf,0,0,_T("Hello"),5);
EndPath(hDcBuf);
HRGN hPath = PathToRegion(hDcBuf);
DeleteDC(hDcBuf);
ReleaseDC(NULL,hMain);
The trouble is that the PathToRegion() API always returns NULL. I'm thinking that I must do something with the DC first, but due to the lack of examples, I am unsure what. Could somebody please help me out with this?
|
|
|
|
|
waldermort wrote: Could somebody please help me out with this?
My pleasure
If that really is your code, your DC has a very small drawing surface (1x1x1). You need to create a compatible bitmap and select it in before doing the beginpath/drawing/endpath calls, and then select it back out and delete it when you're cleaning up. I'm pretty sure that the path takes clipping into account, and the surface will be clipped by it's extent, hence a NULL path.
Steve S
Developer for hire
|
|
|
|
|
Selecting a bitmap into the DC doesn't have any effect. Also the example for using BeginPath() and EndPath() on MSDN doesn't use a bitmap.
|
|
|
|
|
You don't think I actually test some of my answers, do you ?
The MSDN sample doesn't use a bitmap because it's using a window DC, not a compatible one, so I was guessing that over-eager clipping was responsible.
"When the memory DC is created, its display surface is exactly one monochrome pixel wide and one monochrome pixel high. Before an application can use a memory DC for drawing operations, it must select a bitmap of the correct width and height into the DC. To select a bitmap into a DC, use the CreateCompatibleBitmap function, specifying the height, width, and color organization required".
Interestingly, the same documentation doesn't mention what the default font for the memory DC is, but there ought to be one.
Can't help with the OS question, since I'm XPSP2 everywhere except servers these days.
Steve S
Developer for hire
|
|
|
|
|
No worries. My first attempt to to use the window DC, but since that wasn't working I thought maybe it was something to do with the clipping regions I had already selecting into the DC. So I tried it out with a compatible one. But as you can guess, that didn't work either.
Regarding the DrawText() api, I might not even need to use it. It would probably be easier to use TextOut() to calc the region, then offset that region to wherever I need it. Instead of later drawing the text, I can simply fill the region.
|
|
|
|
|
I managed to narrow the problem down to not selecting a font into the DC before opening the path bracket. Even though the docs for TextOut() state it will use the system font. I guess it is because there is no real drawing going on. Not a big problem since I was meaning to add support for fonts anyway.
Now I have another question. MSDN gives a list of drawing functions which can be used in combination with path brackets for each OS. TextOut() and ExtTextOut() are in the list, but DrawText() is not there. Nontheless I tried it and it worked ( I'm running XP sp2 ). Does anybody know if this is supported on other OS's?
|
|
|
|
|
If I have a base class pointer &
want to call the Destrutor of the dervied class.
How do i do that ?
Vikas Amin
EATON
PUNE
|
|
|
|
|
Make ur destructor virtual and just use delete operator on base class pointer.
U can also call destructor manually using downcasting by converting base class pointer to derived class pointer.
Karnav Zaveri
|
|
|
|
|
How to get handle for all the open Child windows?
Thanks
Raji
|
|
|
|
|
Is EnumChildWindows helpfuls ?
|
|
|
|
|
Hi,
I've got 2 threads, one continuously uses "SendMessage" to tell main thread to perform some processing and update the GUI.
However, after running my application for anywhere between 1/2 hr to 5 hours, SendMessage will randomly get stuck.... IE: The window that's suppossed to receive the message never receives the message, and the application GUI just freezes.
Can anyone tell me if this has happened to them before, or what could possibly cause the message sent by SendMessage to not-be-received by the recepient window?
Thanks,
skyapie
|
|
|
|
|
Its called a deadlock and your thread synchronisation is not working correctly, SendMessage() will wait until the message has been processed before returning, you could try PostMessage() instead which will not wait but I would check your thread synchronisation first.
Darka [ Xanya]
"I am not a slave to a god that doesn't exist."
|
|
|
|
|
skyapie wrote: I've got 2 threads, one continuously uses "SendMessage" to tell main thread to perform some processing and update the GUI.
Secondary threads should post messages (i.e., PostMessage() ) to the primary thread.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|