|
Check this.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
hi,
i have just a couple of questions.
1. Does anybody know how to read pdf files or a class that exists to download?
2. Does anybody know how to control Word and / or explorer from within a program
Cheers
Dor
|
|
|
|
|
I don't know about your first question but for your second take a look at this article in MSDN:
Interacting with Microsoft Excel: A Case Study in Automation
Yeah, its about Excel but I belive that the same ideas can be applied to Word.
Hope it helps.
|
|
|
|
|
How do i get started in DirectX? What files do i need to read and/or important info i should know before starting?
Thanks all!
~SilverShalkin
|
|
|
|
|
You need to install the latest DirectX SDK, which will also add help files to your MSDN installation. If you don't have MSDN, I don't know if it installs help just for DX, you may need to read it online instead.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
Christian Graus wrote:
You need to install the latest DirectX SDK
But that thing is 172 MB's or em i looking at the right thing?
Thanks
~SilverShalkin
|
|
|
|
|
Your looking at the right thing.
I do not know if you can still do this, but about two years ago I went to Microsofts website and they sent me a disk with the DirectX SDK on it. They may still do that.
Once you get the SDK though, there are many sample programs in the SDK to get you started.
|
|
|
|
|
Dont worry ive downloaded 35% already. "Its just alot!" Oh well, when im done with installation and stuff, ill be back
with questions like, how do i make a window using Direct Draw enstuff like that if i dont find it in the help files
Thanks!
~SilverShalkin
|
|
|
|
|
As we said yesterday, you DON'T create a window using directx. You may well make a window display a directx surface, but you'll use Win32, WTL or MFC to do so.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
Oh fine.... Then my next question would be, how do you make a windo using Win32?
Dont you hate it when you download somthing and it stops at the last second, like at 99%? Well i do. I have now downloaded DirectX8.1 SDK twice. But somthing happends at the last second and it doesnt save the info to the intended folder
oi, i guess i could try it again
~SilverShalkin
|
|
|
|
|
SilverShalkin wrote:
Oh fine.... Then my next question would be, how do you make a windo using Win32?
Ask Visual C to build a Win32 app for you, it will give you all the core code you need. It will define a WndProc, which is where you process windows messages, and a WinMain, which is the entry point.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
SilverShalkin wrote:
Dont you hate it when you download somthing and it stops at the last second, like at 99%? Well i do. I have now downloaded DirectX8.1 SDK twice. But somthing happends at the last second and it doesnt save the info to the intended folder
oi, i guess i could try it again
Get a download manager like gozilla. It does the downloading in pieces, and it saves the state of your downloads if you get disconnected or an error occurs.
|
|
|
|
|
First time useing templates and allthough they arnt needed im useing
them to get used to templates. Im getting erros with i try to declare
my key_table (the class) like key_table< apstring, int> kt;
it give the error:
error LNK2001: unresolved external symbol "public: __thiscall key_table< class apstring,int>::key_table< class apstring,int>(void)" (??0?$key_table@Vapstring@@H@@QAE@XZ)
i dont have anything else in my main except for the statment:
key_table< apstring, int> kt;
i dont know why it would be complaing about it but if im using the
templates wrong please correct me.
#include "assoc.h"
template< class S, class L> class key_table
{
public:
key_table();
key_table(const key_table< S,L> &table);
int length();
bool empty();
void store(const S &target);
bool get_string(const S &target);
key_table operator =(const key_table< S,L> &table);
protected:
int table_length;
int current_string;
assoc< S,L> data[MAX_TABLE_SIZE];
};
#include "onetable.h"
#include <assert.h>
template< class S, class L>
key_table< S,L>::key_table(){
table_length=0;
current_string=0;
}
template< class S, class L>
key_table< S,L>::key_table(const key_table< S,L> &table){
table_length=table.table_length;
for(int j=0;j< MAX_TABLE_SIZE;j++)
data[j]=table.data[j];
}
template< class S, class L>
int key_table< S,L>::length(){
return table_length;
}
template< class S, class L>
bool key_table< S,L>::empty(){
if(table_length==0)
return true;
else
return false;
}
template< class S, class L>
void key_table< S,L>::store(const S &target){
int probe = 0;
bool found = false;
L item=target.length();
assert(table_length< MAX_TABLE_SIZE);
assoc a(target, item);
data[table_length+1]=a;
++table_length;
}
template< class S, class L>
bool key_table< S,L>::get_string(const S &item){
bool success=false;
if(empty)
success=false;
else if(current_string=table_length)
success=false;
else{
current_string++;
item=data[current_string].get_string();
}
return success;
}
|
|
|
|
|
You can't declare the implementation of template classes in your .cpp files. Try moving all the functions inline into your template classes .h file and see how you go.
Hope this helps.
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
but how do i keep from having one big .h file, i do not wish to declare all my classes in the .h file, thats what the .cpp is for? is it proper/normal programing to defile all the functions in the .h?
|
|
|
|
|
You've hit a limitation of VC and templates, the template code has to be visible in every CPP file, so it has to be in header files.
--Mike--
"Jobs that don't allow you to visit the Lounge 25 times a day at the minimum are not worth having anyway."
-- Nish, 3/28/2002
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan and Jamie Salé.
|
|
|
|
|
Is the API functions to create sync files to a folder.
|
|
|
|
|
Folks,
How can I link a DLL (that i wrote years ago) into an EXE. I thought I saw a web page or something in MSDN on how to do this but after searching for this afternoon w/o turning up anything I'm turning to you guys to see if there is an answer.
(Yes I know it defeats the whole purpose of DLLs but I really need to release a single binary module.)
Thanks,
Al
|
|
|
|
|
Here has a Tool that may help you.
http://www.binary-soft.com/dll2lib/dll2lib.htm
|
|
|
|
|
Does this thing actually work? I have been looking for something like this for a LONG time, I will be VERY happy if this thing works!
Chris Hafey
|
|
|
|
|
Questioner? (Visitor)
I need to write a small program that will assign the letter 'S' to an array a number of times, depending on how many times I ask for;;
That means if I chose number 5, then the program will assign S five times inside the array "let's say array[0]" so array[0]=SSSSS
Thanks
|
|
|
|
|
memcpy( array_to_write_to, char_to_write, num_of_chars_to_write );
i.e. to write S 5 times to array we would do this, assuming the array was already initialized:
memcpy( array, 'S', 5 );
you need to put the S in the '' so the compiler knows it's a "character constant", rather than the name of a variable.
Hope that helps,
Pete
|
|
|
|
|
Hi,
I actually have 3 ?s:
1- How can I convert a CString to a c-char (char[25]) and vice-versa.
2- How can I convert a CString to a int, fl int or other number holder.
3- How can I extract a certain portion of a CString, like the first 2 chars for example.
// JS Paquet
cout << "Thank you all" << endl;
|
|
|
|
|
1) If you don't need to modify the char array, you can simply cast a CString to an LPCTSTR (long? pointer const TCHAR string):
LPCTSTR apszBuffer = (LPCTSTR)m_MyCstring;
If you need to modify the buffer, you need to use GetBuffer and ReleaseBuffer:
LPTSTR apszMyBuffer = m_MyCString.GetBuffer(m_MyCString.GetLength());
m_MyCString.ReleaseBuffer(25);
2) Use atoi, atof (or _ttoi for wide-char compatibility):
int viValue = atoi("25478");
float vfValue = atof("123.456");
3) Use CString::Mid():
CString vstrBit = m_MyCString.Mid(0, 2);
CString vstrAnother = m_MyCString.Mid(5, 4);
Hope this helps.
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
Hello. I'm just starting out in VC 6.0. I'm using MFC Appwizard, and have created a test program. I've got it so far where you click on a button and a MessageBox pops up. I was wondering, I want to add some code in there that will automatically Minimize the current window. So, you'll click on my "test" button, and it will automatically minimize the window. Can anyone please point me in the correct direction?
|
|
|
|