|
SilverShalkin wrote:
Ive downloaded all my files for WTL, and printed out the headers that ill be using... But how do i exactly start programming in WTL? is it just by puting a atlapp.h header at the top? or can you open WTL as a project?
The easiest thing to do to get started is to make sure that you have installed the app wiard that comes with the installation. When you create a new project, select a ATL/WTL AppWizard. For your application you will want to select the single threaded SDI app. There will be choices to have toolbars and status bars if you want.
Once you create that you will have a shell of an app that you can expand upon.
As far as what elements do you need to specifically have to have a WTL app? After you create you app from the wizard, if you still want that question answered, post another question and I will help you.
|
|
|
|
|
At the moment im tired and i dont know if i should make any big disicions. Ill try the WTL tomarrow "and post any new questions then and there" as for DX, i think im leaning towards it a little more, that and Direct sound. But can i use DX to make a window and be able to make a tool from it, that'll allow me to do everything i need, "that WTL could"?
And where do you start programming DX? just in a normal win32app? where do i find info that'll help me begine in this area?
Thanks again
~SilverShalkin
I dont see anything now
Just can feel the relaxed
feeling of rest as my eyes
close and i fall in deap venturaus
dreams
|
|
|
|
|
DirectX is a set of classes that provide an interface to the video card. it is used for painting.
You can create a DirectX application with minimal windowing support, or you can create a small directX window in an application that is a large windows application.
One thing to be aware of with DirectX is that you have to write a lot of code to get started, it is not as simple as the GDI. A good place to start with DirectX is the sample programs that come with the directX SDK.
|
|
|
|
|
SilverShalkin wrote:
But can i use DX to make a window and be able to make a tool from it, that'll allow me to do everything i need, "that WTL could"?
I made another post but it seems it was lost.
At this point, I'd suggest you need to sit back and consider the ratio of the project you're considering and how little you know of how to go about it. It may well be better for you to first write some simple DX code before jumping into an engine and living with the design mistakes you're bound to make if a couple of hours ago you had no idea what DirectX was.
I'd suggest www.flipcode.com as a good resource for gaming programming info.
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
|
|
|
|
|
Check it out - this guy is going to JAIL !!!! I presume his source is the electronic versions that come with a lot of books, but whatever it is, I doubt that Microsoft are giving away titles like 'Programming Windows' and 'Programming Applications for Windows'.
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
|
|
|
|
|
Please can anyone explain to me with an example how to use the CFtpConnection::Command function. Ive tried it in both VS6 and VS.NET but when it comes to compiling it, both give an error that its not a valid member of the CFTPConnection class even though in MSDN it is listed as being one. I cant seem to find any articles on this either. I know theres the WinInet alternative FTPCommand, but was curious as to why this function doesnt work! ??
The MSDN link is below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/vclrfCFtpConnectionCommand.asp
|
|
|
|
|
Hi all -
I'm writing a C++ wrapper class around a GPIB instrument control interface. The interface is predominantly controlled by a trio of functions:
viPrintf()
viQueryf()
viScanf()
These functions are fairly similar to Printf, scanf, etc., in that they take a variable number of parameters. viQueryF() takes a pair of const char * -- it effectively does a concurrent viPrintF and viScanF via just one function call.
So here's my problem: how can I expose such functionality in my class? I can write a function that takes a variable number of parameters. I can access those, no problems.
But how can I take the variable length variable list and transform it into a single function call?
I thought up how to handle the viPrintf function -- basically use sprintf in sequence. However, the viScanf(instrument id, const char * str, ...) function requires return addresses of where responses will be stored.
Is there any way I can construct such a function call? ie, pass in all the arguments at once? Or do I have to attempt something astonishingly brilliant that I can't even conceive?
Thanks,
Andrew
|
|
|
|
|
I don't quite get your problem, but if what you want is forward the arguments passed in viPrintf to printf , use vprintf and va_list just like this:
void viPrintf(const char* fmt,...)
{
va_list v;
va_start(v,fmt);
vprintf(fmt,v);
va_end(v);
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Well, actually it's more that I want:
void MyWrapper(const char * fmt, ...)
{
va_list v;
va_start(v,fmt);
viPrintf(fmt, v);
va_end(v);
}
I saw mention of some parameterized version of the viPrintf function I'm wrapping that might accept an argument array as above... I suppose I'll have to try.
Is there any other way such magic might be worked?
|
|
|
|
|
OK, now I think I got what you're after. Indeed you can construct the variable argument list at run-time (non-portably) with some hackery along this:
char vargs[10000];
char *pargs=&vargs[0];
int x=5;
*((int *)pargs)=x;
pargs+=sizeof(x);
char *pc;
*((char **)pargs)=pc;
pargs+=sizeof(pc);
printf("%d %s",args); The idea is reserving space in the stack with args and fill this up with the parameters needed. This can be combined with reading the parameters from a va_list in an obvious manner (left as an exercise ).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
What caused MSOffice open doument file or ACDSee open image files?Is that only extension of file?I need to do something that MSOffice(or other programms) could not open .txt or .doc files but also I shouldn't change the file extension.Any suggestion for doing 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
|
|
|
|
|
As you guessed, it is only file extension that drives the system to select a program to open a particular file. If you want to change the "opening program" of extension .xxx to be program A , do the following:- Open a Windows Explorer and locate a
.xxx file.
- Right click on it while pressing the shift key. Select "Open with..."
- A dialog box appears for selecting the program to open the file with. Select program
A and tick on the checkbox "Use always this program..." (sort of, my OS is in Spanish).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thank you Joaquin,but my problem is not that,I wanna do something IN MY PROGRAM,that .doc files become unavaible for Office or ANY OTHER program to open,I don't want to change extension or delete content of files.
Do not tell this to anybody Joaquin,I can say its kind of VIRUS.
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
|
|
|
|
|
Do not tell this to anybody Joaquin,I can say its kind of VIRUS.
(in low voice) I don't have the slightest idea, but please tell me when you figure it out.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
(in low voice) I don't have the slightest idea, but please tell me when you figure it out.
Sure
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
|
|
|
|
|
Mazdak wrote:
I can say its kind of VIRUS
hmm... should I tell ya or shouldn't I...
.
.
.
.
.
.
.
.
.
okay... but I tell only tell ya a little bit!
All these information is stored in the registry!
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Rickard Andersson wrote:
All these information is stored in the registry!
No,Because maybe they have back up from registery or they can reinstall windows.
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
|
|
|
|
|
I know this has been addressed before in the forums, but i hav nt been able to locate the messages.
Can anyone tell me if I can install VC 7 on a system that contains VC 6 or VC 5, without screwing up the existing development system?
I need to run a trial of VC7, but it won't install on my laptop, so I'm going to have to use one of my production computers <gulp>.
|
|
|
|
|
Jim A. Johnson wrote:
Can anyone tell me if I can install VC 7 on a system that contains VC 6 or VC 5, without screwing up the existing development system?
Yes,it is possible.
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
|
|
|
|
|
Yep, they work fine together. Need a damn big hard disk though.
Giles
|
|
|
|
|
I've been making a program, and its been executing fine. But all of a sudden, it gave me this error (even though I didn't change anything):
--------------------Configuration: TestGL - Win32 Debug--------------------
Linking...
TestGLView.obj : error LNK2001: unresolved external symbol "public: __thiscall CColour::CColour(class CWnd *)" (??0CColour@@QAE@PAVCWnd@@@Z)
Debug/TestGL.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
TestGL.exe - 2 error(s), 0 warning(s)
I've had these types of errors (which i don't understand) before and usually if I reboot the computer its fine. But this time, its not going away. What does this error mean and how can I fix it? Also, when I double click the error, it doesn't take me to the spot in the file where the error is.
|
|
|
|
|
First thing would be to do a rebuild all.
If that doesn't help then for some reason the CPP file that contains the definition for CColour isn't being included in the link or isn't being defined. See if it has been removed from the project.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Somehow the linker is not finding the definition for the CColour constructor referred to. Possible reasons:- The definition is actually lacking.
- The definition is in some file that is not being linked (maybe you deleted from the project accidentally).
- Sometimes the precompiled headers feature makes funny thing and a "Rebuild all" drives it back to sanity.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I wanna use CFileFind to find all .doc files in my drive ,including sub directory.The thing I do is with GetFileName() get the string the name of each file and check the last three charachter if it is .doc .Is there any better and faster way for it?
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
|
|
|
|
|
Look at the example for CFileFind::IsDirectory in MSDN. I believe it contains what you are looking for. Just change the filter that is passed to the FindFile function from
strWildcard += _T("\\*.*");
to
strWildcard += _T("\\*.doc");
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|