|
Try WM_ACTIVATE, WM_ACTIVATEAPP, WM_NCACTIVATE, etc...
- NS -
|
|
|
|
|
Thanks, WM_MOUSEACTIVATE works. The parent window always gets this message when I click on its child, even it is already active. This is a little different from that mentioned in document. Not perfect but it works for me.
For other solutions, they are good ideas, too. Maybe I can use them in other cases. Thanks a lot.
|
|
|
|
|
Welcome
I think you may have to take care about the following MSDN description:
"The parent window receives this message only if the child window passes it to the DefWindowProc function."
Anyway I didn't have done any further dig on it...
- NS -
|
|
|
|
|
Thanks. Finally, it's my fault. MSDN says only the top-level windows can be activated. My child window is, of course, not a top-level window, so I always get the clicking message. And the parent window doesn't get WM_ACTIVATE message because it is not a top-level window either.
Anyway, this website is really helpful. There are so many resources and I can usaually get my answer in a short time. Unfortunately, I'm working on embedded systems instead of PC systems. If anyone knows where I can find as many resources as this website has, please tell me. Our product is set top box. Thanks.
|
|
|
|
|
Hi there!
I'm trying to build a simple dialog-based application for a Windows Mobile 5.0 Pocket PC which uses the Windows Media Player SDK to play audio as well as video. But I can't get it to work...
I downloaded the WMPSDK 10, created a new dialog-based app and included a ActiveX-Control as provided in the SDKs Help. Compiling works well without any warnings or errors. But after deploying either to the emulator or the device, i get the following debug-message:
<br />
Persistence not supported on OLE control {6BF52A52-394A-11D3-B153-00C04F79FAA6}.<br />
>>> Result code: 0x00000000<br />
Warning: Resource items and Win32 Z-order lists are out of sync. Tab order may be not defined well.<br />
On the device i get a 'Debug Assertion Failed!' referring to 'occont.cpp' file.
google didn't help me any further. Is there anybody out there how as a small hint?
greetings from Munich,
m.
PS: sorry for my bad english...
|
|
|
|
|
|
Hi,
I'm creating the setup of my application, I need to execute an exe file during the setup, so I added that exe to the setup files and I added an custom-action to run it.
It is runned as well, but I need to create 2 different solytion types (like Release and Debug), and I need that that exe is runned only in one case (i.e. for example in "Release" case and not in "Debug" case). To do this I'm thinking that I can use the "condition" related to the custom action.
But,... what I have to write there? I tryed "Release" and "!Debug", but this isn't well understanded to the setup compiler.
Any suggestions?
thanks
Russell
|
|
|
|
|
Hello,
I have Consts.h file where all my identifiers are defined and I need this Consts.h file in two of my .cpp files.(A.cpp and B.cpp)
When I #include Consts.h in both the files I get linker error 'identifier already defined' and if I don't include in one .cpp file I get error identifier not defined.
What changes should I make in my inclusion method?
Thanks
|
|
|
|
|
In Consts.h write very first statement as
#ifndef CONSTS_H<br />
#define CONSTS_H<br />
.....<br />
.....<br />
.....<br />
#endif // CONSTS_H
Regards,
Paresh.
|
|
|
|
|
Did you put include guards in your header file ? Something like this:
#ifndef MYFILE<br />
#define MYFILE<br />
<br />
<br />
#endif
(of course, MYFILE should be unique for each of your header file).
You can also use #pragma once at the top of your file.
|
|
|
|
|
Hello,
Thanks for your replies.
I had already tried this .The Consts.h file has these statements
#ifndef CONSTS_H
#define CONSTS_H
// Code here
#endif
But still I get the same linker error.
Prithaa
|
|
|
|
|
Can you post your Const.h file if it is not too long ?
|
|
|
|
|
Rebuild all.
Prasad
MS MVP - VC++
|
|
|
|
|
Create Const.cpp where you can define the identifiers, so in Const.h put only the declarations, ... like you do with functions.
And/or put on the top of the file Const.h the command #pragma once
Russell
|
|
|
|
|
Dear All
I write one MFC DLL in visual C++ 6 IDE.
in this project I have to use one runtime Class like this :
RUNTIME_CLASS(CMyLine)
I dont instantiate any object from CMyLine Class and use only the RUNTIME version of it in my project.
I dont know how this class destroys when I want to exit from application which uses the DLL.
When I want to close The application that uses DLL I get following Exception :
Unhandled exception in program_name.exe (kernel32.dll): 0xE06D7363 : Microsoft C++ Exception.
When I comment the RUNTIME_CLASS line , I dont get any exception.
I think that this error is because of exiting from runtime class.
If you have any idea to remove this bug please inform me.
Regards
Monhi
|
|
|
|
|
m_monhi wrote: RUNTIME_CLASS(CMyLine)
This is meaningless to us.
How and why are you using this macro?
If you don't know what it's for then why are you using it at all?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have used following code for loading and displaying *.EPS file
Image myImage(L"c:\\GMap_View_20060906.eps");
// Image myImage(fileName);
g->DrawImage(&myImage,0,0,myImage.GetWidth(),myImage.GetHeight());
But it does not work. How can I get the exact result?
|
|
|
|
|
What was return value of DrawImage ?
|
|
|
|
|
Image myImage(L"c:\\GMap_View_20060906.eps");
The lastvalue of myImage = OutOfMemory.
|
|
|
|
|
Im not sure you can load EPS with Image,but on the Codeproject is an article CXImage did you see it it can opens some graphic files.
|
|
|
|
|
Did you initialized gdi plus ? the code seems to be ok.
If u can Dream... U can do it
|
|
|
|
|
Hi All,
How to calculate the total number of vertical and the total number of horizontal lines in a .png file?
Please help..
Thanks
|
|
|
|
|
Please refer here[^].
Regards,
Paresh.
|
|
|
|
|
Hi,
I want to add a slider control as a toolbar button in the toolbar. Can anyone please tell me how to do that. I am using SDI/MDI window.
|
|
|
|
|