|
I am using TSAPI writing a CTI service prog.
in TSAPI,function(acsEventNotify) allows an application to request that a message be posted to its application queue when an incoming ACS event available. when Telephony server's receive queue become non-empty,then it would post a msg(user defined) to application,and after application received this msg ,it will get the msg from receive queue to process.
RetCode_t acsEventNotify
(
ACSHandle_t acsHandle,
HWND hwnd,
UNIT msg,
Boolean notifyAll
);
hwnd: the window which receive notif
msg: user-defined msg to be posted when an incoming event become available
in my service,i create a window to receive this msg.but i can't receive any msg.however,but when my prog is an application,it can run correctly.why
can anybody tell me acsEventNotify,how to work?
|
|
|
|
|
|
Computer Telephony Interface
|
|
|
|
|
when we program by appwizard ,what,s the entrance of command line argument ?
i have seen msdn ,but i still feel it is abstract,please lend me a hand ,how to understand it specificly?
|
|
|
|
|
|
i have read a book on mfc,but i feel many concept i can not understand
thoroughly,so i want to see how do other people understand it?
i think even if very simple conception ,not all the people can give perfect explanation on it,if that,all the people are all greate,
many greate things are based on the trivial things,thank you
|
|
|
|
|
if every one can buy a book and get the solution from there then why do we need a forum like this?
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
CCommandLineInfo cmdInfo;
ParseCommandLine (cmdInfo);
use CWinApp::ParseCommandLine to initialize a CCommandLineInfo object with values reflecting the parameters entered on the command line, which often include a document file name. The statements
if (!ProcessShellCommand (cmdInfo))
return FALSE;
"process" the command line parameters. Among other things, ProcessShellCommand calls CWinApp::OnFileNew to start the application with an empty document if no file name was entered on the command line, or CWinApp::OpenDocumentFile to load a document if a document name was specified. It's during this phase of the program's execution that the framework creates the document, frame window, and view objects using the information stored in the document template. (In case you're wondering, the document object is created first, followed by the frame window and then the view.) ProcessShellCommand returns TRUE if the initialization succeeds and FALSE if it doesn't. If initialization is successful, the statements
i dont remember where had i seen this
greatest thing is to do wot others think you cant suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
thank you suhredayan,before seeing this thread i have draw a diagram about commandlineinfo,now i see your answer i understand more clearly,your explanation is specific,i am working hard ,i believe i will make progress soon.;P
|
|
|
|
|
>thank you suhredayan
i ll pass that to Jeff Prosise.
greatest thing is to do wot others think you cant suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
Its a good one, but I was not the one who needed the anwser.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
A handy reference is MFC Internals[^]. It's got a lot more concrete information on how the framework is put together and how it works. I didn't feel I understood MFC until I read this.
The book is a little out of date now, having originally been written for MFC 4.0, but the fundamental operation of the framework barely changed from MFC 4.0 to 6.0 (indeed, versions 4.2, 5.0 and 6.0 were upwards-compatible in binary form - a program built with 4.2 could typically run unchanged on MFC 6.0's mfc42.dll). 7.x has had more changes to accommodate the merging of ATL and MFC.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi all,
I am trying to load a bitmap in my window but without success. I am using win 32 api. i want to load the image from a file ( path to the file is found out dynamically) and display it.
could someone help me with this
thanx
|
|
|
|
|
|
|
MSDN has a sample name LoadPic.exe. It can load gif, bmp, ico, jpg, bmp... and much image format.
---------------------------
Auto Debug for Windows
http://www.autodebug.com/
|
|
|
|
|
|
I used LoadImage but am finding difficulty in displaying the image.
hbitmap = (HBITMAP)LoadImage(hinst,szFileName,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
i am not sure how to proceed after this
plz help me out with this
cheers
|
|
|
|
|
I used LoadImage but am finding difficulty in displaying the image.
hbitmap = (HBITMAP)LoadImage(hinst,szFileName,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
i am not sure how to proceed after this
plz help me out with this
|
|
|
|
|
|
Hi !!!
this is what I have been working on
hdc = BeginPaint(hWnd, &ps);
hdc = GetDC(hWnd);
hbitmap = (HBITMAP)LoadImage(NULL,szFileName,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
if(hbitmap==NULL)
MessageBox(hWnd,"coudnt load ", "error ", MB_OK);
break;
// this doesnt return NULL , so the image is getting loaded properly ????
HDC hdcMem = CreateCompatibleDC(hdc);
GetObject(hbitmap ,sizeof(bmp), &bmp);
SelectObject(hdcMem, hbitmap);
BitBlt(hdc, 0, 0, bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, SRCCOPY);
DeleteDC(hdcMem);
EndPaint(hWnd, &ps);
it would be great if you could help me out with this. thanx in advance !!!
|
|
|
|
|
hdc = BeginPaint(hWnd, &ps);
hdc = GetDC(hWnd);
hbitmap = (HBITMAP)LoadImage(NULL,szFileName,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
if(hbitmap==NULL)
{
MessageBox(hWnd,"coudnt load ", "error ", MB_OK);
break;
}
HDC hdcMem = CreateCompatibleDC(hdc);
GetObject(hbitmap ,sizeof(bmp), &bmp);
SelectObject(hdcMem, hbitmap);
BitBlt(hdc, 0, 0, bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, SRCCOPY);
DeleteDC(hdcMem);
EndPaint(hWnd, &ps);
Rest everything looks fine.
Gurmeet S. Kochar If you believe in God, it's because of the Devil
My CodeProject Articles: HTML Reader C++ Class Library, Numeric Edit Control
|
|
|
|
|
it loads fine ! thanks a million !!!
|
|
|
|
|
Why is the item of "IDR_***TYPE" more than "IDR_MAIN_FRAME"?
|
|
|
|
|
when our application is SDI,in working region ,in menu resource of resource,
there is only a "IDR_MAINFRAME",but if your application id MDI,this time,
you can find "IDR_MAINFRAME"and "IDR_****TYPE",then in app.cpp correspondingly,you will see when SDI,
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(C***Doc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(C****View));
AddDocTemplate(pDocTemplate);
but when MDI,
pDocTemplate = new CMultiDocTemplate(
IDR_***TYPE,
RUNTIME_CLASS(C***Doc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(C***View));
AddDocTemplate(pDocTemplate);
IDR_MAINFRAME is for matching with mainframe,IDR_***TYPE is for matching with ChildFrame,but only when MDI there is ChildFrame
|
|
|
|
|