|
You May need to use PIPE, MailSlot, Socket, DDE for interprocess communications..
Try this also.
1. Create a Private clipboard and place the message
2. Send a message to the another application
3. In the another app, Read the data from the clipboard and clear the clipboard
Might have problem!!! in compatiblity or security reason..
" Action without vision is only passing time,
Vision without action is merely day dreaming,
But vision with action can change the world "
- Words from Nelson Mandela
Thanks & Regards,
Gopalakrishnan
|
|
|
|
|
|
thanx all for the replies!.....
but still i cant seem to get it right!.....
by the way sir!.....i have my own user defined message,i would like to send the CString data in the WPARAM!.....do u seem to have an idea?
is it becoz i am sending this to an another executable taht i am getting junk values?
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
As I mentioned in my earlier reply, you may want to take a look at the WM_COPYDATA [^] message. It seems like it will meet your needs.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
rateep wrote:
.i have my own user defined message,i would like to send the CString data in the WPARAM!.....do u seem to have an idea?
You can't send the CString data through PostMessage/SendMessage to some other application.. because CString Memory/Data is local to that application.
Now Better way TO SEND String data across the process boundry would be WM_COPYDATA as told by Mr. Ravi..., now you still insist to send data string data using Message you have to allocate global memory for same send the address through message api..
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
tahnk u all!!!!
cheerz!
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
Hello, may I know how to host a activeX control in WIN32 dll with non-MFC. Can anyone point me to a beginner guide to read on? I have background in neither ActiveX nor ATL.
Thank you very much!
cheok
|
|
|
|
|
Hallo
What to look for or how to manage, if i'd like to open my MFC Programm by double Clicking the corresponding file??
Th@nks to @all
|
|
|
|
|
Hi,
If it is SDI/MDI Application, it is quite easy...
You need to have IDR_MAINFRAME which values are like this SDI\n\nSDI\nSDI Files (*.dra)\n.dra\nSDI.Document\nSDI Document....
After creating the document template call, EnableShellOpen();
RegisterShellFileTypes(TRUE); function. This will do..
" Action without vision is only passing time,
Vision without action is merely day dreaming,
But vision with action can change the world "
- Words from Nelson Mandela
Thanks & Regards,
Gopalakrishnan
|
|
|
|
|
Click .dsw file
hjghjghjghjhgjgh
|
|
|
|
|
I have this new little app which is an SDI with a splitter window.
Anyway, when user right-click a treectrl, a floating menu appears and if user clicks one of it, a modal dialog box appears. Now the problem is that the dialog box seems to freeze, ie. no button/editBox etc respond to mouse. If user clicks on any point outside the window (eg. another application), then comes back to this window, this dialog box becomes 'live' again.
I think it may be something to do with hotspot?? anyone knows how to solve this problem???
please...
|
|
|
|
|
I think, you are doing the following
--> Click the POP up menu,
--> IT fires the event, in the event handler you are creating the Dialog Window.
Before create the modal dialog, delete the pop up menu and create dialog
" Action without vision is only passing time,
Vision without action is merely day dreaming,
But vision with action can change the world "
- Words from Nelson Mandela
Thanks & Regards,
Gopalakrishnan
|
|
|
|
|
MailtoGops wrote:
Before create the modal dialog, delete the pop up menu...
With MFC, this is handled automatically. One simply needs to call TrackPopupMenu() .
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Yes the dlg window is created when clicking the pop up menu. I have no problem with cleaning up the pop menu as it is a local variable, see the code below:
{
..........
CMenu zooMenu;
zooMenu.LoadMenu( IDR_MENU1 );
CMenu* pPopup = zooMenu.GetSubMenu( 0 );
pPopup->TrackPopupMenu( TPM_LEFTALIGN|TPM_RIGHTBUTTON,
point.x,
point.y,
this );
}
It must be because something else. any other idea?
|
|
|
|
|
Hi,
I am working on VC++ base application.
Would u suggest me how to get the physical font path, when we know the font name only.
Thanks in advance,
Ramesh.
|
|
|
|
|
|
one of the buzz about com components is that they allow location independence; to include com comp "import" key word is used along with name and path so where is location independence?
|
|
|
|
|
That is only one way of importing a COM definition.
You can also use the progid or libid:
<br />
#import "libid:0B482F67-46DD-4b1a-BD7C-204444F452E0" named_guids<br />
#import "progid:SomeCOMLibrary.MyCOM.1" named_guids<br />
Using the import directive in this way will ensure path independence from your client program.
I Dream of Absolute Zero
|
|
|
|
|
//onaccept i do like this
CUserSocket *usersocket;
usersocket=new CUserSocket(this);
if(Accept(*usersocket))
{
m_usersocketlist.AddTail(usersocket);
}
//I delete all the usersockets
POSITION pos;
pos=m_usersocketlist.GetHeadPosition();
while(pos!=NULL)
{
CUserSocket* pa;
pa=(CUserSocket*)m_usersocketlist.GetNext(pos);//save pointer
delete pa;//accert here
}
m_usersocketlist.RemoveAll();
when i delete pa
it give an accert in dbgheap.c Expression:_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
how can i delete a socket and free the memeory
-- modified at 9:20 Monday 19th September, 2005
|
|
|
|
|
Hello,
I need to print files using MS Word automation and MFC. I use the PrintOut method available in the application object and it prints perfectly fine. But i'm not finding any method of printing files to a particular tray of the printer.
Code for the same is attached
******************************************************************************
Word::_ApplicationPtr m_pWord;
Word::_DocumentPtr m_pDoc;
/* ms-word print api */
m_pWord->ActiveDocument->PrintOut(covFalse, // Background.
covOptional, COleVariant((long)4), // Range.
covOptional, // OutputFileName.
covOptional, // From.
covOptional, // To.
covOptional, // Item.
COleVariant((long)1), // Copies.
COleVariant(PageRange ,VT_BSTR), // Pages.
covOptional, // PageType.
covOptional, // PrintToFile.
covOptional, // Collate.
covOptional, // ActivePrinterMacGX.
covOptional, // ManualDuplexPrint.
covOptional, // PrintZoomColumn New with Word 2002
covOptional, // PrintZoomRow ditto
covOptional, // PrintZoomPaperWidth ditto
covOptional
);
******************************************************************************
For tray selection am using the following methods, but the desired results are not being achieved. The mentioned method is placed before PrintOut function is called.
******************************************************************************
m_pWord->Options->DefaultTrayID = Word::wdPrinterLowerBin;
******************************************************************************
Thanks for any help provided
Vikram Attiganal
|
|
|
|
|
Hi All,
My application has strings hard-coded in code. To Provide multi-language support in my application, i need to make these strings as a part of resource in the project.
If anybody knows any tool that will move these hard-coded strings to the Resource and write the code at those places to load them from the resource whenever needed, please tell me where to get tool or if u have it, send me at abhijeet23@gmail.com
Thanks in Advance..
Abhijeet Jadhav
|
|
|
|
|
I don't know of a tool to extract the string ( and put them in a text file ) , and replace them with SIGNIFICANT ids; you'd better take a few hours doing it manually.
as for the second part, you need to create a resource DLL ( see here [^] ) and load the DLL depending on the current user language.
and in your code, use CString::LoadString( UINT id ); to load the string from the resources.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hi All,
My application has strings hard-coded in code. To Provide multi-language support in my application, i need to make these strings as a part of resource in the project.
If anybody knows any tool that will move these hard-coded strings to the Resource and load them from resource whenever needed, please tell me where to get tool or if u have it, send me at abhijeet23@gmail.com
Thanks in Advance..
Abhijeet Jadhav
|
|
|
|
|
Hi,
When you disable the titlebar (and thus the minimize-button) in a dialog, the application wont minimize anymore on a taskbar click.
I was wondering if you can recreate that behaviour, so that the application minimizes even without a titlebar.
I tried already using an own WndProc-Method to catch the messages of the taskbar to look for a WM_LBUTTONUP or DOWN to minimize and restore the application myself, but the GWL_WNDPROC of SetWindowLong seems to only work for windows of the own process, so that didnt work...
Has anybody got an idea or maybe done that himself already?
thanks alot!
|
|
|
|
|
I hope this is what you're looking for. I've used ShowWindow(SW_MINIMIZE) to minimize my application. (Alternatively, ShowWindow(SW_MAXIMIZE)) Or you might want to check out CWnd::SetWindowPlacement().
Hope this helps!
Danny
|
|
|
|