|
YSRao wrote:
The Applications which I have written in vc++ are terminating when I press "Enter" Button or pressing "Escape" button.
I suppose they are dialog based. If it's so, then override OnOK and OnCancel handlers.
Pavel
Sonork 100.15206
|
|
|
|
|
I assume you've written a dialog based app.
Override the OnOK() and OnCancel() handlers to simply return; without calling the base class methods. Then, add a button (eg: IDC_BUTTON_EXIT ) to your dialog and call CDialog::OnOK() in its handler.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I guess this is a dialog-based app, so you need to override CYourDlg::PreTranslateMessage to catch WM_KEYDOWN messages with (wParam == VK_RETURN || wParam == VK_ESCAPE) . You may simply return TRUE from this function (with no base implementation call) to get rid of the behavior you mentioned.
Regards,
BB
|
|
|
|
|
on click OPEN file... get the data from the file as an array of characters (each line) and ... display it as a TREE
Please give me some hit. Thank a lot.
quoi
|
|
|
|
|
quoi wrote:
on click OPEN file...
Use CFileDialog.
quoi wrote:
get the data from the file as an array of characters (each line)
Use CStdioFile (::ReadString).
quoi wrote:
display it as a TREE
Use CTreeCtrl (::InsertItem).
Perhaps you should read some MFC tutorial first before asking in this message board?
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
|
I am developing IVR application for my organizational needs.I am using only tapi.h and linked with tapi32.lib using vc++.I am facing the problem that all the events are not fired when a call comes in.My telephone has the callerID capability.I am not able to capture the callerID also.
Can anybody suggest me to solve my problem.
Y.Srinivas
|
|
|
|
|
A couple of things,
What TSPI are you using, is it for a modem or a PBX?
How have you Initialised TAPI, are you using LINEINITIALIZEEXOPTION_USEEVENT or LINEINITIALIZEEXOPTION_USEHIDDENWINDOW.
What privilege have you used to open the device LINECALLPRIVILEGE_OWNER or LINECALLPRIVILEGE_MONITOR?
If supported by your TSPI, the CallID can be retrieved using lineGetCallInfo.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
i want to know by a system call whether that system is connected to the internet r not .for example i had an application how can i make that application run only when it is connected to the internet .is there any specialised commands for that.
|
|
|
|
|
BOOL CheckInternetConnection(LPCTSTR url)
{
DWORD flags = 0;
if(InternetGetConnectedState(&flags,0))
{
if(InternetCheckConnection(url,
FLAG_ICC_FORCE_CONNECTION, 0 ) )
return TRUE;
else
return FALSE;
}
else
return FALSE;
}
And use it like :-
if(CheckInternetConnection(_T("www.google.com")) &&
CheckInternetConnection(_T("www.yahoo.com")))
{
}
"I'm a bit bored at the moment so I'm thinking about writing a new programming language" - Colin Davies
My book :- Summer Love and Some more Cricket [New Win]
Review by Shog9 Click here for review[NW]
|
|
|
|
|
Ei! how do i open .hxi or .hxs files?
i recently installed the microsoft SDK Platform and the documentation files are type hxi and hxs.. it seems that i have no program to open these type of files... I have no MSDN yet... but can you give me another downloadable program that ha a small file size... that opens these files...
thanks...
|
|
|
|
|
|
|
Ok I have a private member variable CArray containing a structure of data. I have a worker thread working with it. It finishes and the thread is terminated.
Then I try calling a non-threaded function in the same class and try to access the array it returns a -1. Why can't it be accessed even when locked?
I've made sure that its unlocked after its unneeded in the threads.
-Steven "the yellow dart" Hicks
CPACodeProjectAddict
|
|
|
|
|
(Steven Hicks)n+1 wrote:
try to access the array it returns a -1
What is returning -1?
Software Zen: delete this;
|
|
|
|
|
The GetSize was. I fixed this by making a global class variable and accessing the arrays through this.
-Steven "the yellow dart" Hicks
CPACodeProjectAddict
|
|
|
|
|
I have a dialog based program that has a tree control in the middle of it. I want to convert that project to a single document interface. How do I use a tree control which this type of design?
Michael
Everything in moderation, including tolerance.
|
|
|
|
|
Create SDI with formView, copy your dialog, change formView to use it.
|
|
|
|
|
Thanks, are there any tutorials out there that address this approach? I notice I don't have the standard buttons on the toolbar, just a dialog kinda like in a dialog based application.
|
|
|
|
|
Here is my dilemma with status bars...
I'm trying to run OnTimer routines that update GPS coordinates on a cStatus bar pane
...whats actually happening is i see a flicker of text in the wnd_pane and then it gets wiped away
...the strange thing is that when i click on the menu buttons the GPS text pane is always visible and there is no flicker.
how can i get the main frame to behave the same way so i can constantly see the GPS text ................real time??
i tried implemeting the timer update of the statusbar within the view rather than the main frame... but the result is the same.... what am i missing??
-perseus
|
|
|
|
|
I know this sounds far-fatched... but is there any way to force the OS to unload a DLL without exiting the program itself? I am working with a 3rd party library, which apparently has some global data in it that is initialized when it is loaded. I, however, need to re-initialize this data at a certain point in my program, and would like to do it without having to physically exit the whole program and restart-- the thought came to mind that maybe i could just force an unload/reload on the DLL in some manner.
Thanks for any ideas,
|
|
|
|
|
LoadLibrary FreeLibrary?
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
I need to be able to access a remote pop3 inbox from a windows service. Is MAPI able to do this or will I have to use sockets? Any help is appreciated.
cc
|
|
|
|
|
Hi:
I have figured out how to pass data from VB to C++, but I am having troubles with sending arrays back to VB.
Suppose my C++ DLL created an array of integers and I have a pointer to this array that I pass back to the VB application along with the number of elements.
Now, how do I handle it on the VB side?
Do I have to allocate a buffer before I make the call, and let the C++ populate this buffer?
Or can I allocate the buffer in the C++ code?
What if I don't know the size of the buffer beforehand?
If I just have the pointer and the number of elements, what would be a VB equivalent to do something like this:
for( int n = 0; n < nTotal; n++ )
{
dValue = *( ( double * )cPointer );
cPointer += sizeof( double );
}
Thanks a lot.
|
|
|
|
|