|
i dont have acess to these files as it's a university computer
|
|
|
|
|
Try these ugly links:
http://msdn.microsoft.com/code/default.asp?url=/msdn-files/026/002/258/Source%20Files/Simplec_c.asp
http://msdn.microsoft.com/code/default.asp?url=/msdn-files/026/002/258/Source%20Files/Simples_c.asp
|
|
|
|
|
|
Have a look at my TCP/IP class at
www.sfxangel.com
under the "FreeStuff" section
Dark Angel
|
|
|
|
|
Hi!
Can somebody tell me why the linker can't link the object files?
I'm writing (trying to write) a test application to use DirectX. I use a downloaded sample code to create it and it seems to work. When i compile it no error occours until the linker is executed. But then it says:
error LNK2001: unresolved external symbol _DirectDrawCreate@12
Why could this happen
Even the unmodified sample doesn't work.
If anybody knows the answer please help me.
Thanks!
P.s.: The code is too long to place it here but if you need it please tell it to me and i'll send it to you.
Vis
|
|
|
|
|
It means you included a header for DirectDrawCreate, called the function, but did not link the appropriate .lib file into your project.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Below your #includes simply add the line
#pragma comment(lib,"ddraw.lib")
modified 12-Sep-18 21:01pm.
|
|
|
|
|
<marquee>Thanks
Vis
|
|
|
|
|
How can I make a pointer to CMainFrame???
I'm working on the CView class.. how can i make a pointer to CMainFrame?, does the pointer definition change if we try to do it on other class?
Stay cool
Phoenix
|
|
|
|
|
You can use this :
CMainFrame *pMainFrame;
pMainFrame = (CMainFrame *) GetParentFrame();
Regards
|
|
|
|
|
AfxGetApp ()->m_hMainWnd
Best regards,
Alexandru Savescu
|
|
|
|
|
CMainFrame *pMainFrm = static_cast<CMainFrame *>(AfxGetMainWnd())
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
I have noticed a perculiar effect. I want to have a status bar and a dialog bar at the bottom of the screen. Now, it seems that my status bar is always above the dialog bar. On the top, the statusbar is always below the dialogbar. Anyway around this?
Also, if I want to have multiple dialogbars showing on one side (say bottom), the dialog bar that is created FIRST will always beat the very bottom, no matter what order lets say I call ShowWindow etc. Is there anyway around this?
Thanks in advance.
|
|
|
|
|
Hi there,
How can I play a sound by MCIWnd functions in a loop ?
I mean when sound finishes then MCI play the sound again and again …
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hello,
If I want to modify the cards.dll in windows which accompanies the Solitaire.exe to give the cards a new face, how to do it?
Thanks
Kidd
|
|
|
|
|
Why ?
It's a resource dll, just make your own.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Just open it in Visual Studio and set the file type as Resource and you can now edit the bitmaps
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Sorry if my terminology is wrong.
Anyways...How would I iterate an array of the following structure:
struct ITEM{
LPSTR Parent
LPSTR Caption
UINT Command
ITEM Child
}
I'm NOT looking for a C++ solution, but a generic psuedo-language answer would be GREAT!!!
I'm losing my mind trying to figure out how this would be done...if the array were simple it would be easy even if the number of levels were known it would be easier...a couple nested for loops would suffice. However...when each last field is a pointer to another just like it (but slightly different) that simple array transforms into something...I can't comprehend and it's driving me insane...
Anyone ever deal with such a data structure before...?
I thought this was a linked list or sort of anyways, but I can't just follow one elemnt to the next...I have to iterate each item in the array...
ie:
if there were 5 items, each had ZER0 children except the last which had 5 levels of 5 children each how would I loop through this kinda array and return all data...?
I'm playing with the idea of a windows menu data structure and my god...i'm lost...
Any ideas...?
Thanx!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Your main problem here is that you have a recursive definition. Creating an ITEM in turn creates another ITEM, which creates another ITEM etc.
It would be considerably wiser to redefine like this:
struct ITEM{
LPSTR Parent
LPSTR Caption
UINT Command
ITEM *Child
}
This way, you create all the ITEM's you need and no more.
Anyway, a suitable way to look at all these it to recurse. Just like you would to walk a directory structure:-
void RecurseItems(ITEM *p_Item)
{
cout << "Got an ITEM at %X" << (DWORD) p_Item << "\n";
if (Child != NULL)
RecurseItems(Child);
}
That'll do the job.
Jon
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
I'm pleased we both came up with the same solution, although it doesn't meet his requirements ( pointers are not exactly a cross language phenomenon, in that lots of languages don't have them ).
I'm chuffed by your sig as well, but there's only one s in Graus
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Apologies, i'll correct it now!
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
A NULL child already indicates no child/sub-items are available for that particular item though...?
Like a windows drop down menu...what kinda data structure would that require...?
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I have no idea what you're on about.
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
while (item)
{
// use the other members
item = item.Child;
}
Make item a POINTER to an ITEM, and use NULL to specify the bottom item. Otherwise you need a data memeber or magic number combination to show the end of the line. If it's a loop ( the last item points to the first ) then it's like this
ITEM item = (whatever)
ITEM item2 = item
while(true)
{
//deal with item
item = item.Child;
if (&item == &item2)
break;
}
so where-ever you start, when you end up at the beginning, you break.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Hey Christian...thanx for the reply...
Your correct about the pointer assumption...i'm actually using JScript to develope a menu in DHTML with unlimited children popup's...
Each AppendMenuItem() basically takes as parameters
Caption, Parent, CommandID and adds them to the array as needed.
If i'm to create a menu from a array I fail to see how the above would create all the popups and items in each...I have tried the above before and i'm obviosuly missing a important link...
File Edit View
New Undo History ->>> Object1
Open Redo --------- Object2
Save Wireframe Object3
Solid
In order to create all the popups I would need to iterate the array and when the end of a division was reached i'd need to stop and start back where I began, no...?
I'm thinking I need some nLevel variable to track my last known position...perhaps an array of nLevels...?
How does the code above allow me to find an item with a particular caption...?
Sorry for not getting it or repeating questions...
Thanx!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|