|
Hello all,
I have some questions about the windows console. If my main GUI windows create a new console windows attach to the main process by calling AllocConsole(). Is there any way to get notify when the console get closed by the user? For example, the close windows button in the top right get clicked by the user. The problem what I have is that if the console windows get closed, then my main process will also be terminated. However, it happen without letting my free my application resource. Any suggestion? Thanks for advance!
Nachi
Nacho
|
|
|
|
|
|
I need to write a program to check if an application is playing any sound through the sound card.
Has anyone had any experience with this? What library should I hook?
This is for Windows XP. The program can be built on any platform (.NET, C++).
I've tried hooking kernel32.DeviceIoControl but I don't know which functions to look for to intercept the Wave output (format and buffers). Should I hijack the sound card drivers? Or is there an easier way?
I appreciate any ideas or thought.
Thanks.
|
|
|
|
|
Hello,
I am trying to declare the above mentioned
and on compile I seem to be getting an error
message,
can any body help?
It seems to work fine, with some sample code Ive got
can anybody help?
Thanks v much
Simon
|
|
|
|
|
simon alec smith wrote: It seems to work fine...
How can it work fine with a compiler error?
Have you included afxtempl.h ?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Thank You,
It seems to compile now,
but what I dont get, is that I have some sample
code from a manual I downn loaded
and it works with out the afxtempl.h
if you have an answers that would be great
anyway thanks once again
cheers
Simon
|
|
|
|
|
wow CTypedPtrList without afxtempl.h
is should be included in some other header files , did u check ?
Vikas Amin
My First Article on CP" Virtual Serial Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
|
|
|
|
|
Yes I've checked,
but knowing me it something I've overseen
anyway I dont think this website is into advertising
but If you really want to know then I will be happy
to disclose
i'm just happy that i'm in the right ball park
|
|
|
|
|
hi.
i write a program that is dialogbased.
i have 2 dialogbased form in my program and every of this 2 form want to access to another form
first dialog can access the data from another form but when i define one variable from another dialog error happen.
can u help me?
|
|
|
|
|
keyvan_jaferzade wrote: ...error happen.
Is it the red error?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
the error is
c:\documents and settings\kone\desktop\fractal\decompress_dialog.h(20) : error C2146: syntax error : missing ';' before identifier 'com'
c:\documents and settings\kone\desktop\fractal\decompress_dialog.h(20) : error C2501: 'CCompressor_Dialog' : missing storage-class or type specifiers
|
|
|
|
|
keyvan_jaferzade wrote: c:\documents and settings\kone\desktop\fractal\decompress_dialog.h(20) : error C2146: syntax error : missing ';' before identifier 'com'
What is to the left of com ?
keyvan_jaferzade wrote: c:\documents and settings\kone\desktop\fractal\decompress_dialog.h(20) : error C2501: 'CCompressor_Dialog' : missing storage-class or type specifiers
Have you included the file where CCompressor_Dialog is declared?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
|
i included that file but yet there is error
i use VC++6.
i hear if i use newer version this problem can solve
this means that i can include first class into second
and second class into once without error in compiling
can i upgrade my code into newer version of vc++ without any loose?
|
|
|
|
|
This is my code for first Dialog
#if !defined(AFX_DIALOG1_H__F50AB9B4_5FA3_4068_843C_01A10ED22766__INCLUDED_)
#define AFX_DIALOG1_H__F50AB9B4_5FA3_4068_843C_01A10ED22766__INCLUDED_
#include "dialog2.h" // Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// dialog1.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// dialog1 dialog
class dialog1 : public CDialog
{
// Construction
public:
dialog2 d2;
dialog1(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(dialog1)
enum { IDD = IDD_DIALOG1 };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(dialog1)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(dialog1)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DIALOG1_H__F50AB9B4_5FA3_4068_843C_01A10ED22766__INCLUDED_)
//**************************************************************************
And second dialog Code is
#if !defined(AFX_DIALOG2_H__B49F8072_EB87_4558_8CE9_E83A7852E553__INCLUDED_)
#define AFX_DIALOG2_H__B49F8072_EB87_4558_8CE9_E83A7852E553__INCLUDED_
#include "dialog1.h" // Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// dialog2.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// dialog2 dialog
class dialog2 : public CDialog
{
// Construction
public:
dialog1 d1;
dialog2(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(dialog2)
enum { IDD = IDD_DIALOG2 };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(dialog2)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(dialog2)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DIALOG2_H__B49F8072_EB87_4558_8CE9_E83A7852E553__INCLUDED_)
|
|
|
|
|
Do you want to have access of one dialog at two dialog and vice versa?
|
|
|
|
|
first class want to access to second
and second want to access to first just this is my problem
|
|
|
|
|
Sounds like a circular reference problem.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hello all,
Please tell me is it possible to send the WM_KEYDOWN message to the program without pressing any key in the keyboard. I want to call a method which has been written in the keydown event without pressing any key for the first time only. Please help me.
Many thanks in advance.
|
|
|
|
|
Yes you can send a WM_KEYDOWN message but it doesn't make a lot of sense. Why don't you instead move that specific code into a separate function that you call from within your key down handler and that you can call directly instead of sending the WM_KEYDOWN message.
|
|
|
|
|
You can use the well named (for a change) SendInput funcion. Or rearrange your question to give an answer of "SendMesssage (WM_KEYDOWN,...".
But as Cedric said, this is a TERRIBLE idea if you have any sort of access to the software involved. Otherwise there are lots of errors for you to make. If you don't send a matching WM_KEYUP for example, there could be all sorts of "fun" !
Iain.
|
|
|
|
|
|
If in a Visual C++ 2008 I have an image which i set up by BITMAPFILEHEADER and BITMAPINFO and BITMAPINFOHEADER, how can I enclose it in a device-context so that graphics functions can draw lines and write text on it, as if it was a screen?
Currently the MSDN Library http://msdn.microsoft.com/en-us/library/default.aspx is 404 or not answering queries, else I would have looked in it. When is there the least load on the MSDN Library?
|
|
|
|
|
Look for the Cbitmap and CDC classes, where you can make an output.
Greetings from Germany
|
|
|
|
|
Do you mean something like this?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|