|
what is the Difference Between CDC and CClientDC.Please explain a bit.
Be FaithFull To Your Work.
|
|
|
|
|
Hello
As MSDN said:
"The CDC class defines a class of device-context objects. The CDC object provides member functions for working with a device context, such as a display or printer, as well as members for working with a display context associated with the client area of a window."
and
"The CClientDC class is derived from CDC and takes care of calling the Windows functions GetDC at construction time and ReleaseDC at destruction time. This means that the device context associated with a CClientDC object is the client area of a window."
So, CDC is for working with any devices, while CClientDC is for windows client area only.
Andrew
|
|
|
|
|
First i am sorry if its not a proper place for my questions.
1)What is the procedure to make an activex control signed.
2)Is there any description or article available that how cab files are executed by the OS.I am just interested in knowing how does OS execute them.I have tried searching them on Net but can't find any relevant description.
Be FaithFull To Your Work.
|
|
|
|
|
OK. now here's what I want.
1. I have remote ftp server(with ip, user, pwd).
I want to make virtual ftp folder using shell extension which directs me to ftp server after asking about the user, pwd.
Can anyone tell me about the detailed descriptive article on this issue.
Any hint will also be welcome.
|
|
|
|
|
Hi,
is it always possible to upgrade
a VS 6.0 c++ project to vc++ .net ?
Thanks
|
|
|
|
|
Porting and Upgrading (Visual C++)
Explains how to upgrade a project built in a previous version of Visual C++ to Visual C++ .NET, how to port your applications to Visual C++ from a different language, and how to port your Visual C++ application to a different developer tool or operating system.
|
|
|
|
|
I am using MDI Doc- View architecture.
I want to display a new window( Not an MDI Child Window) in full screen format so that i can display GDI information on this window.This new window should close/destroy on mouse click or keyboard hit.
Can anyone give me some
laiju
|
|
|
|
|
laiju wrote:
I want to display a new window( Not an MDI Child Window) in full screen...
Look near the bottom of the app's InitInstance() method. There is a call to ShowWindow() there that you can change.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
thanx..how do i restore this window into its previous state on mouse click or keyboard hit.
laiju
|
|
|
|
|
You'll need to save the frame's initial size with GetWindowRect() .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
You have to use ShowWindow(SW_SHOWMAXIMIZED);
|
|
|
|
|
thanx..how do i restore this window into its previous state on mouse click or keyboard hit.
laiju
|
|
|
|
|
<br />
lRet = lineMakeCall(m_hLine, &m_hCall, szAddress, 0, lpCallParams);<br />
LINECALLSTATUS stLineStatus;<br />
memset(&stLineStatus, 0, sizeof(LINECALLSTATUS));<br />
stLineStatus.dwTotalSize=sizeof(LINECALLSTATUS);<br />
lRet = lineGetCallStatus(m_hCall, &stLineStatus); <br />
I wanted to get the current status of the call.
stLineStatus.dwCallState returned 512.
What does this state imply?
|
|
|
|
|
lphCall
Pointer to an HCALL handle. The handle is only valid after the LINE_REPLY message is received by the application indicating that the lineMakeCall function successfully completed. Use this handle to identify the call when invoking other telephony operations on the call. The application is initially the sole owner of this call. This handle is void if the function returns an error (synchronously or asynchronously by the reply message).
From tapi.h - learn to look up status values...
512 is 0x2000 in hexadecimal
#define LINECALLSTATE_PROCEEDING 0x00000200
Probably because you don't have received the LINE_REPLY message yet, your call is still in progress of dialing, establishing connection, etc.
|
|
|
|
|
Thanks for the information you provided.
I have a few more doubts regarding the line device messages.
As you mentioned in your reply the HCALL handle is valid only after the LINE_REPLY message is received.
Does a SUCCESSS(dwParam2 = 0) in LINE_REPLY indicate that the modem could detect dialtone?
If a call has been successfully made what is the order in which the messages appear?
Is this the order??
LINE_REPLY///success
LINECALLSTATE_DIALING
LINECALLSTATE_RINGBACK
LINECALLSTATE_ACCEPTED
LINECALLSTATE_CONNECTED
I found a sample program here http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dntapi/html/msdn_tapi_30.asp[^]
In my case(that is using the info in above link) the order of messages that i receive is:
LINE_REPLY (always successfull whether dialtone present or not)
LINECALLSTATE_DIALING
LINECALLSTATE_CONNECTED
One final question..
What is the equivalent function to the physical action of picking the receiver from the hook to dial a number???
|
|
|
|
|
1. I am pretty sure the initial LINE_REPLY means that the line is in the ready state to make a call. Not necessarily that a dialtone or any other 'hardware or network signal' has been received or detected.
2. I am not sure of order of messages. It has been several years since I programmed any TAPI and I don't have samples handy to help you troubleshoot. Sorry about that.
3. I think you can pick up receiver by following these not so obvious steps (from MSDN):
The lineDial function can also be used in partial dialing. To initiate a call using partial dialing, the application calls lineMakeCall and specifies a partial dialing string. A partial dial string is any dial string terminated by a semicolon. The call will typically transition to LINECALLSTATE_DIALING after which lineDial can be called to specify more dialing strings, each terminated by a semicolon. Dialing is completed by calling lineDial with a dial string that is not terminated with a semicolon (such as an empty string). This technique allows applications to perform interactive partial dialing with the user or enable more sophisticated dialing than a TSP may be capable of.
Basically, you are initiating a call, but 'failing' to provide a number to initially dial. This would take 'line' off hook and allow you to enter digits at your leisure.
|
|
|
|
|
Hi,
After printing a file, from MFC, i need to get the confirmation from the winspool or the printer about the status of the print [whether printed or failed]. Are there any api's to achieve the same.
Thanks for any help
Vikram Attiganal
|
|
|
|
|
Hello All,
I have to get integer value which is stored in a CString object.
My code
CString str = "-123";<br />
int i;<br />
sscanf (str, "%d", &i);<br />
This is what i followed. Is there any better approach than this?
Thanks for your time
Ravi
|
|
|
|
|
Try this Ravi:
CString str = "-123";
int i = atoi((LPCSTR)str);
If it didn't work, simply remove '(LPCSTR)'
|
|
|
|
|
LPCSTR is not necessary. CString has a built-in operator that returns a LPCTSTR.
|
|
|
|
|
Hi Ravi,
We have ready made function for data conversion. You can use the following function to convert CString to int.
CString str = "-123";
int i = atoi(str);
This may be helpful you.
Regards,
Venkat
|
|
|
|
|
we can use that CString class method
such as string Format
CString str = " ";
int i;
i = str.Format("%d",str);
|
|
|
|
|
maheswara wrote:
i = str.Format("%d",str);
CString::Format() dosen't return any value.
suhredayan There is no spoon.
|
|
|
|
|
yeh
it does not any return any value
|
|
|
|
|
maheswara wrote:
yeh
it does not any return any value
So your following suggestion :
i = str.Format("%d",str);
is not correct and CString::Format function is not for converting a string to integer, though you can use it for the reverse purpose.
|
|
|
|