|
hi, i tries to load a .x file but keep failing... i got this code fragment from a text...
code as follows:
HRESULT result = m_pD3D->CreateMeshBuilder(&m_pMeshBuilder);
if(result != D3DDRM_OK)
return FALSE;
result = m_pMeshBuilder->Load("model.x", NULL, D3DRMLOAD_FROMFILE, NULL, NULL);
if( result != D3DRM_OK)
{
MessageBox("Load error");
}
QUESTION 1: I realise HRESULT is a COM structure. How can i get more specific hint from result?
QUESTION 2: is there any specification to how 3ds files are converted into .x files using conv3ds.exe? the original model.x that comes with the book works just fine. But when i use other .x files i got from other sources, result != D3DRM_OK... and i cant figure out why?
QUESTION 3: I cant find documentation for ???::Load method
QUESTION 4: LPDIRECT3DRMMESHBUILDER structure documentation?
Thanx
|
|
|
|
|
if the conv3ds.exe you're using does not come with the SDK version you're using I don't recommend you use as it might be an older format. IIRC the DirectX SDK comes with a MAX plugin. Look for it. It should be under the tools folder.
Do you have the Debug version installed and selected?
If you do, what does the debug spew say?
Always, always use the Debug version and look at what it says. It catches alot of useful stuff (redundant state changes for example). Also, if you have any rendering probs use REFRAST as it will allow you to separate bugs in your code from bugs in the drivers. If the problem persists when using REFRAST then the problem is in your code.
HTH
Brian Azzopardi
bibamus, edamus, cras moriemur [eat, drink, for tomorrow we die]
|
|
|
|
|
norm wrote:
QUESTION 1: I realise HRESULT is a COM structure. How can i get more specific hint from result?
Add a watch with "result,hr" to see the message. (without quotes)
Concussus surgo.
When struck I rise.
|
|
|
|
|
Hi!
I'm building an MFC application and I'm trying
to link a home made .lib to it. The library
uses the STL. When I try to compile the MFC
app, I get messages like these:
error LNK2005: "public: __thiscall std::basic_string<*snip*> already defined in MainFrm.obj
and
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _memmove already defined in libcmt.lib(memmove.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _vsprintf already defined in libcmt.lib(vsprintf.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in libcmt.lib(fclose.obj)
I can work around it, but I don't know what the
root problem is. I think it's releated to which
run time library the app uses. Any ideas?
Shawn
|
|
|
|
|
Try changing the C Runtime libs of your application to match your lib. This way, CRT symbols won't get duplicated.
Concussus surgo.
When struck I rise.
|
|
|
|
|
Most of this has nothing to do with the STL, but rather the C runtime library.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
Looks like that works. Thanks
Shawn
|
|
|
|
|
I have a list view and i want it so that when the user clicks on an item in the list, the box that surounds the selected item and greys it out a little does not appear. How can I accomplish this?
There's always one more bug.
|
|
|
|
|
Two ways AFAICS:
1) Override OnLButtonDown() in a derived class and have it save the current selection index (incase you need that item later) then SetCurSel(-1) to prevent any further selection.
2) Ownerdrawn or custom drawn your choice
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hi Everyone,
I have been stuck with this questions for two days, could anybody help me
out?
I want to add customized counters to Performance Monitor(PerfMon.exe) in
Win2000, so that in Performance Monitor I can monitor some data defined by
myself in my application. I have referenced two articles "Instrumenting
Windows NT Applications with Performance Monitor"
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnperfmo/h
tml/msdn_ntperf.asp) and "Enable your VB components to talk with the Windows
Performance Monitor"
(http://www.devx.com/premier/mgznarch/vbpj/1999/05may99/kk0599.pdf)
But these two samples all don't work correctly on my Windows2000, that is in
Performance Monitor I still can't see the performance object I want to add.
I have checked the Registry, everything seems fine.
Since these two articles all talk about WindowNT, I am wondering if this is
the problem because I am working on Win2000. What should I do in Win2000?
Has anyone ever written this kind of application, can you give me a hint on
how to make your application expose counters that can be analyzed in
Performance Monitor?
Thanks!
Sherry He
|
|
|
|
|
Hello,
As a matter of fact, I have written this type of application for a company I used to work at.
It's about 5MB, so if you tell me a way to send it to you, I will.
Chris
chris@outreach4him.50megs.com
|
|
|
|
|
Hi,
My app is performance critic and so I wanted to set the optimisations (VC 7.0) in the release verison of my app. Now when I fire up the application I give the user a startup configuration dialog. Before the optimisations it drew the background default grey as I wanted it to. Now the dialog background is white, the control backgrounds are grey though. Anyone else came across this problem?
|
|
|
|
|
its release version i suppose, but did u ASSERT in it, cos if u did ASSERT is nasty!! If u did ill tell u why!
|
|
|
|
|
Is there any way to detect if the user has locked the workstation in WinNT/2k/XP?
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
For W2K (only), you could look at :-
http://www.codeproject.com/useritems/winlogon_notification_package.asp
For NT, I havnt heard of this being successfully acheived without either :-
a) totally replacing the NT GINA, with one of your own,
b) (or) using a pass-thru GINA, which intercepts the items
you wish to trap, (actions them) and then calls the 'real' GINA.
Both NT methods appear complicated and dangerous !!! - If you wish to know more, Windows Developer Journal (WDJ) had a series of articles written by Pamela (something beginning with "T" [apologies to Pamela], who's an expert in this field, you could pick up the CD-ROM of back-issues if you were really serious about doing it)
Microsoft do supply a GINA example in the SAMPLES directory of the MSDK kits, as well (but the articles mentioned above are the way to go ...)
HTH
'G'
|
|
|
|
|
Thanks,
I think I must have a look at WDJ for those articles.
I did think that it might be just sending a WM_ message to the app, but then again, finding no info in MSDN made it doubtful.
Thanks for the info
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
You get teh answer you were looking for??????
Regards,
Brian Dela
|
|
|
|
|
Nope I didn't
I was looking through the Microsoft newsgroups and there doesn't seem to be a simple answer to this problem, and I don't have enough time to write the gina.dll.
Thanks Dela
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
can someone help me out with this c++ problem? here's the question..
User is required to enter a person's address. the address should contain oni numeric, alphabets and '/'. when user press <enter> key, it will passed to a function..lets call it charsok() that will return true if the entered text contains only alphabet,numeric and '/'-it will return false otherwise. it will then passed in to another function lets call it splitter. In here, it'll splits the line of entered text into few components.the components are returned by function splitter. components in the entered string are delimited by a slash, space or tab character. then it'll pass to another function to display the results. pass the component to display, do not make them available by declaring them as global variables. The output should be :
When user key in Duckworth Avenue..
the output will be Street Address = Duckworth Avenue.
another example 14 Melba crescent..output : Street Number = 14 Street Address = Melba Crescent.
and the last possibility is 13/240 William Slim Drive. the output : Unit = 13 Street Number = 240 Street Address = William Slim Drive
Please Help.. need it asap.. mail me at angieng@malaysia.st
Please please please..
|
|
|
|
|
it should be easy enough to do using cstring::spanincluding() and cstring::spanexcluding() and/or the crt functions isdigit() and isalpha()
my only concern is that the input looks a bit informally delimited when presented to the functions
hope this helps
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" sonork: 100.18128 8028finder.com
|
|
|
|
|
Hi.
I would like to know how to change the color and/or font of a CListCtrl box item. For example, let say you have the following listbox.
// Column header
Cars Year
// Column item
X 0
Y 1
Z 2
.....
I would like to make row 0 have yellow text and display font "blah."
I would like to make row 1 have green text and display font "blah2."
Thanks,
Kuphryn
|
|
|
|
|
|
|
|
Try something like this:
HTREEITEM selectedItem;
int index=0;
while( GetParentItem(selectedItem)!=NULL )
{
selectedItem = GetParectItem(selectedItem);
index++;
}
I'm not quite sure what you mean by index so that might not be what you want.
There's always one more bug.
|
|
|
|