|
I guess the reason your message has gone unanswered is that its tough to answer - here's just a couple of thoughts...
First, there's a mix of win32 messaging architecture and MFC here - MFC has a way cool way of allowing you to map command messages to classes that you wouldn't ordiarily expect to get them (i.e. have no hwnd), and this mech is the stuff of DiLascia-like articles in itself, but I would think we should get the win32 stuff nailed down first.
Second, a recommendation - I've been struggling lately with a messaging problem that has me baffled - I picked up Jeffrey Richters book 'Advanced Windows' to check out his chapter on Windows Messaging and Asychronous Input - I think now I better read the whole book! You might want to check it out.
There's so much to look at here - just hard to do all at once. HTH
|
|
|
|
|
<<< 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
|
|
|
|
|
<<< In the name of GOD >>>
There is an article on Codeproject on doing this in a dialog app, I remember seeing it.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
<<< 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
|
|
|
|
|
<<< 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
|
|
|
|