|
why not just:
combine=one+"\r\n"+two;
includeh10
|
|
|
|
|
Hi,
I am currently developping an outlook plugin using MAPI.
I inserted a new toolbar button in the new message window of outlook.
Now when the user clicks on this button, i need to get the info from the mail he has been creating (ie: recipients email adresses , to, cc, bcc, subject and body and attachments)
In order to do that, I retrieve the IMessage object using the IExchExtCallback ::GetObject method.
The problem is that the IMessage object doesnt seem to be up to date with the info the user just typed in.
So is there any way to synchronize the IMessage object with the latest info typed in by the user, or is this not the correct way to retrieve the infos i need at all ?
Thanks for your time
|
|
|
|
|
Hi all,
can u please give me the name of the functionwhich will be called everytime when the view is activated when there are two views opened on a framewindow...(not belonging to View Class as I have no View classes with me and I load them from a DLL)...
thanks and regards
Thomas
ThomasKennedyBose
|
|
|
|
|
I have a custom CView that has a CListCtrl inside and I want to handle whatever the user does in the ListCtrl in my CView class. (I think that is the appropriate MFC way besides making a custom ListCtrl, right ?)
so I put the ListView inside an tried in my CView:
direct handling in the messagemap like OnLButtonUp()
this just executes when I click outside the list.
so I tried OnChildNotify(), which is executed when I add an item in the initialisation, but that's all, never else.
Basically I just want to know if the user has clicked in the list, selected something, everything you also get in the listctrl.
Where is the correct place to handle these things ?
(I also have another view with a combo and an edit ctrl and I think, they'll give me the same problem, so a general answer to handle control messages in CViews would be nice.)
|
|
|
|
|
You can get notified about many things by adding an ON_NOTIFY handler to your dialog's message map. You can then handle mouse- and keyboard-events as well as control-specific envents, like LVN_COLUMNCLICK when a column of your list ctrl gets clicked.
|
|
|
|
|
It's not a dialog and so classwizard doesn't show me WM_NOTIFY when I try to add a message handler.
Does adding this manually work ?
|
|
|
|
|
As the control sends that message to its parent it should work. However I'm not really sure as I only tested such stuff on dialogs. Nevertheless you should try adding it manually.
But as I just saw, WM_NOTIFY is not sent by standard controls like combo boxes, edit fields etc - in contrast to list ctrl, which does.
|
|
|
|
|
It worked, I think I have to interfere with the Classwizard-done messagemap then
thx
|
|
|
|
|
Hello all,
I'm writing an application where I need to prevent users from deleting/moving/... files on my hard-disk. The only thing I found out is that you can do that for whole folders by use of ICopyHook. But are there other solutions, especially for single files, too?
Thanks,
Schlaubi
|
|
|
|
|
For single files you could set its attribute to write-protected. That would be the nicest way, because the user can still choose if he absolutely wants to delete the file.
However if you want to prevent the user from deleting/moving it during runtime, you could just open the file. The OS would not allow opened files to be deleted/moved.
|
|
|
|
|
Thanks for your hints, but I need to prevent the user form deleting any file on my disk. So both your solution will not work for me.
Thanks anyway!
|
|
|
|
|
Are you trying to build an anti-virus tool?
I don't think that is possible...
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Are you trying to build an anti-virus tool?
How did you come accross that idea? Do you write a virus and fear my tool?;)
No, in fact i wrote a "secure" browser for some kind of information terminals. And some kids tried (and even got it out ) how to delete files. That was the point I started to think about kind of forbid-to-delete-tool.
|
|
|
|
|
Maybe you can use File system access rights?
This would work under NT, 2K and XP prof.
The outdated(W95 to ME) and crippleware (XP Home) versions are out of the question, though.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Seems like I've to add another line.
I dont wanna play with access rights and that stuff - my goal is to prevent deleting only during runtime, not during the whole windows session.
But thanks for your hints anyway
|
|
|
|
|
Schlaubi wrote:
I dont wanna play with access rights and that stuff - my goal is to prevent deleting only during runtime, not during the whole windows session.
I do not think that I would <big>want</big> that to be possible - at least not with one of the "real" Windows versions. But I fear there could be some hook to do that.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
jhwurmbach wrote:
I do not think that I would want that to be possible - at least not with one of the "real" Windows versions.
Your opinion is not that wrong - under usual circumstances I would not want to have that, too. But in my special case I need it - for public information terminals available for everyone, also little hacker kids trying everything to get the system crashed.
|
|
|
|
|
Well, but then you only have ONE application running all day, and probably not IE6 with its deep OS integration.
Do not allow anyone to start any application, prevent your browser from calling a shell and no one will be able to delete a file.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
jhwurmbach wrote:
prevent your browser from calling a shell
That's a fact I never thought about - I only concentrated on a programmatical solution. But that did it! Thank you very much.
|
|
|
|
|
Hi,
How can i disable double clicking the maximise button?
If use HIWORD(GetQueueStatus(QS_ALLINPUT)); in wm_nclbuttonup.
it always returns 0,eventhough user has double clicked the maximise button.
|
|
|
|
|
hi,
have you written the code for single click too..if yes maybe thats the problem comment that bit and see if it works..
Himanshu
|
|
|
|
|
hi,
have you written the code for single click too..if yes maybe thats the problem comment that bit and see if it works..
Himanshu
|
|
|
|
|
I have been able to sniff network traffic by using raw socket. I want to block certain packets from entering the network. By making TTL 0, the program still receives the packet. Plz provide me with proper solution(i.e the proper mode of WSAIOCTL). Would it be possibe to block packets by just changing the mode and if there is something else to do plz suggest.
WSAIoctl(sniffsock, SIO_RCVALL, &optval, sizeof(optval), NULL, 0, &dwBytesRet, NULL, NULL);
Reply me soon
|
|
|
|
|
Hi all,
I am building an ActiveX control using MFC and I need to use it from RightToLeft.
I added the following statement at the beginning of the OnCreate procedure:
SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) | 0x400000);
InvalidateControl();
The RightToLeft option works just great but I am facing a problem when moving the control at design time using the mouse. When I mouse my hand to the right, the control moves to the left and the same when I move my hand to the left the control moves to the right. Does anyone know how can I solve this issue? Note that when I move the control using the arrow keys, the directions are compatible with the control movement. Please help!
Thank You,
Da'ed
|
|
|
|
|
hi i am working on a MFC project and i use an ActiveX on my project. i can register my ActiveX with < Regsvr32 c:\Chart.ocx >. is there any problem if i register my activeX with this command every time my project starts ???? i mean if i run project.exe on another computer (that this ActiveX is not registered on it) then the project.exe will not run. So if i Register my activeX every time my project Starts then i will be sure that the ActiveX is registerd.
if i can Register it with installShield then Plz tell me the instruction !
thanx.
|
|
|
|