|
toxcct wrote: is it associated to the correct control ?
in the dialog class he will be able to map only the WM_KEYDOWN for the Dialog. not for any controls. Isn't it?
nave
|
|
|
|
|
yup... but he'll get a DWORD indicating which on control the event is happening
actually, i never had to use it, so wasn't aware of this handler parameters
-- modified at 6:26 Wednesday 2nd August, 2006
|
|
|
|
|
toxcct wrote: but he'll get a DWORD indicating which on control the event is happening
how?
Can u plz explain with the below eg:
// The message map
BEGIN_MESSAGE_MAP(CFaceDlg, CDialog)
ON_WM_KEYDOWN()
END_MESSAGE_MAP()
// the funtion
void CFaceDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// This function gets called only when a keydown event happends in that dialog. and
// that too if there is no controls in the dialog
}
in the above example where we get the DWORD indicating the control?
nave
|
|
|
|
|
I use PreTranslateMEssage as follows even it does not happen anything...
if( WM_KEYDOWN == pMsg->message )
{
if( ::GetParent( pMsg->hwnd ) == m_Edata.m_hWnd )
{
TCHAR tcChar[2];
tcChar[0] = pMsg->wParam;
}
}
return CDialog::PreTranslateMessage(pMsg);
Anu
|
|
|
|
|
Anu_Bala wrote: it does not happen anything...
i didn't find anything in the above code for some thing to happen
if( WM_KEYDOWN == pMsg->message )
{
AfxMessageBox( _T("KeyDown"));
}
and check if the message box is comming or not.
whats the purpose of the checking
if( ::GetParent( pMsg->hwnd ) == m_Edata.m_hWnd )
nave
|
|
|
|
|
Ya, i checked like that..MessageBOx came..But the control does not go to OnKeyDown()
Anu
|
|
|
|
|
I already said.. the OnKeyDown() will not be called.
U can do all the thing that u want to do in the OnKeyDown() in the PreTranslateMessage() function.
nave
|
|
|
|
|
I coded like this in my pretransalateMessage() now its working..
Thaknks for all
BOOL CFaceDlg::PreTranslateMessage(MSG* pMsg)
{
if( WM_KEYDOWN == pMsg->message )
{
//AfxMessageBox( _T("KeyDown"));
OnKeyDown( static_cast< UINT >( pMsg->wParam ), LOWORD( pMsg->lParam ), HIWORD( pMsg->lParam ) );
}
return CDialog::PreTranslateMessage(pMsg);
}
Anu
|
|
|
|
|
hello,
i convert .txt file into .wav file ,now i want to know that how to convert .tiff file into .wav file, or is there any way to convert .tiff file into .txt ,so that later i convert it into .wav file
reply soon....
|
|
|
|
|
I would convert the tiff in a txt-File.
I hope you know what youre doing?
Greetings from Germany
|
|
|
|
|
Do you want to convert text to sound and sound to text?
|
|
|
|
|
What you ask for is meaningless without a good explanation. Converting TXT to TIF to EXE to DLL to BIN to WAV is a very simple thing if you don't define what you want. If you don't believe me just create a TXT file and rename it to EXE and you will see how easy it is!!
The best way for us to help is if you explain what you are trying to acomplish. Otherwise simply use the ::rename() function to convert between file types.
|
|
|
|
|
Now there's a project of Dunctment/View that want run another programming file name extension .exe which run in the only directory with many *.dll. I did it by the API CreateProcess, the first arugment is a full file path like "D:\\work\\WorkWithDlls.exe" result with the programming
run error when I put a path like "D:\\work\\WorkWithOutDlls.exe" result with all right.
I just wanted excute the EXE file int the right directory but it seem the API fuc CreateProcess can't do it.
Someon can give some suggestion, thanks!
|
|
|
|
|
hi,
look at this Api's
1) WinExec(..)
2 CreateProcess(...)
3 ShellExecute(...)
This will help you to solve you problems.
uday
|
|
|
|
|
::ShellExecute(NULL, "open", "D:\\work\\WorkWithOutDlls.exe", NULL, NULL, SW_SHOW);
|
|
|
|
|
Hi,
You try this and let me know if this solves u r problem.
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
// Start the child process.
if( !CreateProcess( NULL, // No module name (use command line).
"C:\\Sample\\Debug\\sample.exe", // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
TRUE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi ) // Pointer to PROCESS_INFORMATION structure.
)
{
AfxMessageBox( "CreateProcess failed." );
}
Ashok
|
|
|
|
|
All above haven't understand my problem. After some rest I find the truth.
I only need use API ::SetCurrentDirectory first, and then erverything is right, howerver thank you very much.
|
|
|
|
|
|
|
Make a complete path and it work.
BTW: if this doesnt work it should be that you havent set the Current Directory right.
Greetings from Germany
|
|
|
|
|
Can we add a web page to a dialog box in vc++?
KIRAN PINJARLA
|
|
|
|
|
hi,
1) There is a ActiveX Control to Display a Web Page.
2) You can show a Web Page by using Api's like Shell Execute,CreateProcess.
but in my view there is no method to add a WebPage to a Dialog.
Uday kiran
|
|
|
|
|
kiran.pinjarla wrote: web page to a dialog box in vc++
Yes. You can for this you would need to know about CDHtmlDialog
The CDHtmlDialog class is used to create dialog boxes that use HTML rather than dialog resources to implement their user interface. CDHtmlDialog can load the HTML to be displayed from either an HTML resource or a URL.
You can also create a view by CHtmlView
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
You can also do it as a control: CHtmlCtrl[^]
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
I am using vc 6. its not supporting "afxdhtml.h".
whats the Solution?
KIRAN PINJARLA
|
|
|
|