|
<<< In the name of GOD >>>
Hi all.
I want to set Check Sign inside text in menu.
My program is in dialog based mode.
void CTestglobalDlg::OnUpdateKhar(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(TRUE);
}
So, please say to me, how can i set dynamicaly check sign ...
Hadi Rezaie
|
|
|
|
|
i am writing an audio codec as part of a larger project. it involves playing etc of wave and mp3 files. i am using a class that simplifies the use of idirectsound for wave and xaudio.lib for the mp3s. in the test file (dialog based) i have written my class works fine but when added to a console application it won't play anything or it is not outputting sound
can anyone shed any light on this matter?
can dsound.lib be used in a console based app or only dialog based?
thanks
ruth
|
|
|
|
|
Hi,
I am trying to compile and link a workspace for a dll which has
only resource files. Before it used to complie and link..
I changed a a bitmap file by just replaing it with a new one
with the same name..
After that whenever i try to build, i get the following errors:
"CVTRES : fatal error CVT1106: cannot write to file"
"res32.res : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt"
I cleaned and tried to rebuild all, also tried restarting the machine.
Still the same error is being displayed.. can anybody suggest me to avoid
this error? The recent bitmap opens perfectly in mapaint or vc editor..
Regards,
Nayan
|
|
|
|
|
have you tried deleting the output directory completely (ie, debug or release) ?
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
The linker seems to be invoking the coversion utility to convert an OMF object file to COFF format. This is default behavior. I found this note in the MSDN regarding ".Lib Files as Linker Input":
"LINK cannot link a library of 32-bit OMF objects created by the 16-bit version of LIB. To use an OMF library, you must first use the 16-bit LIB (not provided in Visual C++ for Windows NT) to extract the objects. You can then either link the OMF objects or use the 32-bit LIB to convert them to COFF and put them into a library. You can also use the EDITBIN.EXE tool to convert an OMF object to COFF. "
Not sure if this is the prob, but worth a look.
|
|
|
|
|
1) VC6 (no service packs applied I don't think - installed from MSDN January 2001 Enterpise CD's)
2) Windows 2000/SP1
3) Our app is an MFC MDI app with MFC is staticaly linked. I'm trying to embed a CPropertySheetEx in a dialog box. In Debug mode, it works fine, but in release it doesn't.
4) This code works on Windows 98 AND Windows NT 4 (SP5-6a) in both release and Debug modes.
5) It fails when I call the Create function in CPropertySheetEx, but since I'm in release mode, I can't trace into the code.
6) Do I have to install a VC6 service pack to fix this?
If anyone can provide any hints, tips, experiences or other helpful tidbits, I'd love to hear about it. Send mail here:
john.simmons@brooks.af.mil
Many thanks in advance.
|
|
|
|
|
hey john
i would strongly recommend applying service pack 4 at least (prolly 5 if you can get it) ... if the problem still persists it might be something more fundamental
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Applied service pack 4 after leaving the original message. No change. We had to deliver a laptop (wint Win2K installed) with the application on it and were running through all the dialogs. This dialog crashed the app. Since we had to deliver the machine on Friday, and in anticipation of not getting an answer in team through this forum, we re-wrote the dialog to not use tabs (took about an hour).
I am still curious as to why this wouldn't work on Win2k, but works everywhere else.
Since there's a moderate amount of source code involved, maybe I could post this as an article and let everybody else have a stab at it too.
|
|
|
|
|
> but since I'm in release mode, I can't trace into the code.
Go to the project settings for the Release build. In the C++ (General Category) select Program Database for Debug Info. Next, in the Link tab (also General) check the Generate Debug Info box.
You may not be able to see things as well in the watch window, but at least you'll be able to see code and call stack. This is a great help for dealing with the effects of optimizations, uninitialized vars etc.
|
|
|
|
|
|
Well, I wrote a little test app that includes only the code necessary to build a dialog box with an embedded property sheet, and ran it on three windows 2000 systems. It worked on every one of them. This leads me to the conclusion that it's something else in the app that's crashing when the dialog box in question is being initialized.
"Good thing" - It wasn't my dialog box code that was causing the problem
"Bad thing" - I still don't know what the problem actually is yet.
Grrrr...
|
|
|
|
|
What is the difference between ADO and ADODB?
Thanks.
|
|
|
|
|
What is the difference between ADO and ADODB?
Thanks.
|
|
|
|
|
What is the difference between ADO and ADODB?
Thanks.
|
|
|
|
|
What is the difference between ADO and ADODB?
Thanks.
|
|
|
|
|
Hi,guys
There's a question troubled me for a long while,that is
How can I know a process is RUNNING or NOT RESPONDING in my program,using Visual c++?
anyone can supply useful info is appriciate
|
|
|
|
|
thought i posted an answer to this when you originally posted the question
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
You might check out the docs for SendMessageTimeout . Looks to me like this might be the method Task Manager uses to send an initial WM_CLOSE to a process' main window. All you're really checking for here is if the message pump is pumping - if the app is just dutifully computing the first 23 gazillion digits of e, it will appear hung.
|
|
|
|
|
This is probably really easy .. but here goes
I have a CButton object in my dialog application and I have the x,y,x2,y2 coordinates of the actual dialog application but need to find out what the x,y coordinates of the top/left of the button object. How is this done?
Thanks in advance,
|
|
|
|
|
If you have a variable to the button
CRect rc;
m_myButton.GetWindowRect(&rc);
otherwise
CRect rc;
GetDlgItem(IDC_MYBUTTON)->GetWindowRect(&rc);
I believe this comes in co-ordinates relative to the dialog, in which case ClientToScreen will five you screen co-ords. If I am wrong, ScreenToClient gives you client co-ords.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Ok. I'm a VB/(wannabe Java/C#) programmer so don't flame me. I'm in a C++ class in college and my professor gave the class an odd assignment. I have no clue where to begin. Here is the problem:
Given the program:
#include <iostream.h>
main () {
cout<<” Hello, World\n”;
}
Modify it to produce the output:
Initialize
Hello, World
Clean up
Do not change main () in any way.
Now this is blowing my mind. He said there was a way to override the main function but I do not see how. Any help would be greatly appreciated. Thanks.
MCSD, MCSE
|
|
|
|
|
You don't overload (that's the term, not override) main(), you just write it.
THe way I'd do it is make a class with a constructor that prints "Initialize" and a destructor that prints "Clean up" and declare a global variable of that class. Globals are constructed before main() is called, and destructed after it returns.
--Mike--
http://home.inreach.com/mdunn/
I'm finger-lickin' good!
|
|
|
|
|
I meant overload, I'm always interchanging them by accident. Anyway, my teacher's English is not very good and I posted this during class. I talked with him and a few students and we all misunderstood him. Apparently, he wants us to somehow derive from ostream or streambuf and overload operator<< for cout. Not quite sure how but that is what he said. Thanks for the help.
However, I tried your approach but the destructor is never called.
Here is the output:
Initialize
Hello, World
Press any key to continue
Here are some code snippets:
//MyClass.h
class MyClass
{
public:
MyClass();
~MyClass();
};
//MyClass.cpp
MyClass::MyClass()
{cout << "Initialize\n";}
MyClass::~MyClass()
{cout << "Clean up\n";}
// test.cpp
#include <iostream>
#include "MyClass.h"
using namespace std;
MyClass myClass = MyClass();
int main()
{
cout << "Hello, World\n";
return 0;
}
MCSD, MCSE
|
|
|
|
|
I was in the process of coming up with a similar response when I saw Michaels reply, so I jumped into VC to give it a try, and the following
#include <iostream.h>
class MyClass
{
public:
MyClass() {cout << "Initialize\n";};
~MyClass() {cout << "Clean up\n";};
};
MyClass myClass = MyClass();
int main()
{
cout << "Hello, World\n";
return 0;
}
worked fine for me. I don't believe myClass needs to be defined, but I left it that way ;0)
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
I was in the process of coming up with a similar response when I saw Michaels reply, so I jumped into VC to give it a try, and the following
#include <iostream.h>
class MyClass
{
public:
MyClass() {cout << "Initialize\n";};
~MyClass() {cout << "Clean up\n";};
};
MyClass myClass = MyClass();
int main()
{
cout << "Hello, World\n";
return 0;
}
worked fine for me. I don't believe myClass needs to be defined, but I left it that way ;0) I noticed you had a .cpp file for MyClass, but it did not include MyClass.h ??
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|