|
hello,
im speaking about sample project of carlos Jimenez de parga
i have a few simple questions and i will be glad if you can answer me,
1. i have win98.i assume i have directX in it.how can i be sure?
2. i tried to use your midiMusic files, in a win32 console application project , i put StdAfx files, and in "dmusic.h"
there are those includes:
#include <dmusicc.h>
#include <dmusici.h>
#include <dmksctrl.h>
although i linked the dxguid.lib, my compiler doesnt recognize them. why?should i download something?
im a total begginer, actually i try to write a simple c++ application that runs midi files.
thank you very much, Rachel.l.
|
|
|
|
|
Hi,
I'm (attempting) to make a MFC Dialog based application.
In my application I have a dialog box that calls another dialog box. Each have there own class "CDialog1" and "CDialog2". When Dialog1.cpp wants to call CDialog2 I created a private variable of CDialog2 called m_dDialog2 (in CDialog1) and in Dialog1.cpp it calls it using m_dDialog2.DoModal(). This was all working fine but now when I compile I get the following errors:
c:\proj\interf\dialog1.h(18) : error C2146: syntax error : missing ';' before identifier 'm_dDialog2'
c:\proj\interf\dialog1.h(18) : error C2501: 'CDialog2' : missing storage-class or type specifiers
c:\proj\interf\dialog1.h(18) : error C2501: 'm_dDialog2' : missing storage-class or type specifiers
I didn't make any changes myself to any of the code in dialog1.h
But the strange this is that sometimes (not all the time) when I delete the variable and add it again using "Add Member Variable" it compiles and runs fine. Then after running it I compile it again (without making changes) and the three errors return.
I'm getting really frustrated so any comments would be really welcome.
Thanks,
Aoife
|
|
|
|
|
Aoife wrote:
c:\proj\interf\dialog1.h(18) : error C2146: syntax error : missing ';' before identifier 'm_dDialog2'
#include "Dialog2.h" inside the dialog1.h file.
Maxwell Chen
No code is good code.
|
|
|
|
|
It was already there, but when I deleated #include "Dialog2.h" and added the variable again that worked.
Thanks,
Aoife
|
|
|
|
|
Hi all,
I am not quite familiar with ATL, and I am now develepoing a MFC project on VC 7.0.
I want to load an bitmap from a resource and set its transparent color and then pass the HBITMAP to another function that I am using.
So I did like this:
CImage a;
a.LoadFromResource (AfxGetInstanceHandle (), IDB_OK);
a.SetTransparentColor (RGB (192, 192, 192));
My program asserts on SetTransparentColor on the following line:
ATLASSERT( (m_nBPP == 4) || (m_nBPP == 8) );
and m_nBPP reprezents Bits Per Pixel. The problem is that my Bitmap is 24bpp.
Can anyone provide any help? Has anyone used this before?
Thanks
Best regards,
Alexandru Savescu
|
|
|
|
|
I'm loading some temporary files into an MDI app. They appear on the 'Most Recent Files' list. As they are temporary and the user will not want to select them I need to delete them from the MRU list, anyone know how?
Cheers,
ali p
|
|
|
|
|
You need to look at the CDocument::SetPathName() function for you document class. The default implementaion automatically adds the filename to the recent file list by one of the parameters that are passed to it when it is called. Find out where, and pass in a new value when its a temporary file to stop it being added to the file list.
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
That's great, thanks for the help.
My MRU looks fab now!!!!
ali p
|
|
|
|
|
I removed VS.NET beta from my machine, but it left behind a beta version of IE6 which is preventing the installation of IE6 final version. There's no entry in Add/Remove Programs for it, so I can't uninstall the damn thing. Any solutions?
|
|
|
|
|
The documentation for VS.NET beta has always stated that you'll need to format your machine when uninstalling VS or installing a new version.
Cheers,
Tom Archer
Author, Inside C#
Author, Visual C++.NET Bible
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the af
|
|
|
|
|
How can I copy a visual c++ project from one machine to another?
I've tried to copy all the files in the project's root and the res directory, not copying the debug and release directories. That gives about 300 kb.
But when I open the project on the other machine, there are several things that are not working anymore.
For example, the inline autocomplete (when you press . or -> a choicebox appear with the member functions) doesn't work for mfc classes (but for own classes it works fine).
Is there a standard procedure for copying projects?
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Myself, I backup each of my projects each day. Those Visual C++ projects each contains about 270 .cpp and .h files individually. The biggest one is 4.82 mega-bytes, no Debug and no Release folders, just some .cpp, .h, and .ico files only (total 350 files include .ico ). The 2nd biggest one is 4.49 mb, 257 cpp + h files (total 326 files, include .ico ).
Each day I just use the Explorer.exe to perform File Copy and Paste, zip it, and delete the backup file which is 3 days ago.....
When I am going to copy, I always delete .aps, .ncb, .opt, .plg, Debug and Release folders, etc. And after copied to another PC, the project works fine...
Maxwell Chen
No code is good code.
|
|
|
|
|
So, all you have to copy from the project's root are these: *.cpp, *.h, *.clw, *.dsp, *.dsw and *.rc.
Is that correct?
And the autocomplete still works fine?
Thx, gonna try this later on...
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Not exactly though...
Here's the list:
.dsp .cpp .c .h .rc res folder
.dsw is the Workspace setting, not that important.
.clw is the ClassWizard data, it can be generated again, so you may delete it.
.aps is the resource intermediate file like .obj.
.ncb is the data for ClassView letting you browse the class tree.
.opt for how many .cpp or .h child windows opened and where the caret is.
.plg is the build log file.
.bsc is the source code browse database.
Maxwell Chen
No code is good code.
|
|
|
|
|
Copy the .dsw file. It is VERY VERY important.
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?
|
|
|
|
|
One day when I splitted horizontally a single .cpp file to code, the caret got crazy (I pressed BACKSPACE for the intension to delete line one, and some other characters far away at line six got eaten). Just that specific project happened to this strange condition, all other projects of mine were still normal. Therefore, I deleted the .dsw file, and everything got normal again finally... All the project settings of this project were still there, like : preprocessor definitions, imported modules, optimization options... Nothing got lost!
I read MSDN after having read your msg, MSDN says dsw has the relation with SourceSafe. I don't use it... And MSDN says dsw stores the project settings.
But I doubt it after testing. You may define some preprocessor definitions like _MY_DBG, save the settings, and then delete .dsw. When you reopen the project, you see _MY_DBG still is there!
Maxwell Chen
No code is good code.
|
|
|
|
|
By the way, if your app loads some external files dynamically, as .dll, .AVI, .MP3, .BMP, .JPG.... You must keep them!
And if you import some others DLL statically, you need that .H and .LIB to compile and link. Keep that .LIB and .DLL also.
Maxwell Chen
No code is good code.
|
|
|
|
|
Thx
It works, but I left the .dsw, since it is a little file .
The inline autocomplete-sh*t works fine, though.
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
frisco wrote:
The inline autocomplete-sh*t works fine, though.
You mean CompleteWord found in the menu Edit->CompleteWord ?
That works fine...
Maxwell Chen
No code is good code.
|
|
|
|
|
It didn't work anymore after I had copied the project to another machine, although the option was still enabled.
Now it works. So I guess you can't copy too much files.
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
I am porting an application from Unix to Windows NT. The complete
application consists of one executable built with FORTRAN source code and
Unix shell scripts. I have already built a console application with the
FORTRAN source code and the Unix shell scripts have been converted to Perl
scripts.
Problem : The original shell scripts is setting some environment variables,
which are looked for by the executable. One of the variables is set to
the value returned by a Unix utility 'tty'. This utility on Unix displays
the terminal name. The problem I am facing is that the Fortran
executable is opening with the filename specified as this terminal name. The
subsequent READ and WRITE statements using the Unit
pecifier,( specified with the open statement while opening this terminal)
are now directed to this terminal. Since there is no such utility as 'tty'
on Windows, what I need to work out is same logic in which the open
statement should open a unit directed to CONSOLE. The following subsequent
READ and WRITE statements with the Unit specifier, as specified in the
open statement while opening file directed to CONSOLE, should now
read and write on the CONSOLE.
What I have tried : I have already tried the following.
Given open statements with File name specified as 'CON', 'USER',
'CONOUT$' and 'CONIN$'. While the subsequent WRITE statements are
successful for the first three and the READ statements are failing, the READ
statements are successful for the last one and WRITE statements fail.
Please let me know how can I work out a solution for this. How can I achieve
the similar functionality for the application when ported to Windows NT.
Nitin Shukla
|
|
|
|
|
I don't know any FORTRAN (hence, I don't know the details of the READ and WRITE statements you speak of), but in a console app on Windows STDIN and STDOUT is the console being used to run the app (unless not called from the console, but that's another story). You can perform any read/write operation you need to.
Jeremy L. Falcon
"You do not know the power of the dumb side."
<nobr>
Homepage : Sonork = 100.16311 Maybe my mangling might misguide malicious miscreants momentarily?
|
|
|
|
|
Hi!
Recently I have started learning API/WIN32 from a certain book .
I m very unpleased from the way Threads are explained.
not so clear.
I would like to get a recommandation for a good and comprehensive book/tutorial
on this subject
Thank You so much !
Eynat S
Have a good day!
|
|
|
|
|
|
|