|
Hi
Right then...
In order for your app to be able to behave as a container you'll have to have selected Container on the Compound Document Support form when you created your app (or you'll have to set the framework up your self). You'll also have to have a Doc/view architecture but I believe you already mentioned you were using one
One the project is created you'll find a method called OnInsertObject in your view class. If you follow the help files you'll probably be fine from here on, just remember that it's all about the IDispatch interface. If your not sure what that is you'll certainly make your life easier if you look into it.
All the best
Tom
|
|
|
|
|
Hi,
I have 2 questions?
[1] How to create a service application in vc++ ? What are the steps to install this service application and make it run??
[2] How to trap the winlogon events in this service???
A code snippet will be of great help..!!!
Sunil
|
|
|
|
|
sunilpv1982 wrote: [1] How to create a service application in vc++ ?
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
i have one class in which i create
tree view control with it's Create method.
e.g
class CDocTree : CSizingbar
{
public :
CTreeCtrl m_wndTreeCtrl;
};
in this way i am working till now
but i am not able to know when someone right clicks on the
node.
actually i want to do something like this if somebody
right clicks on leaf node then i want to display a popup menu at that position and then on some menu event i wanted to show the dialog box.
in this process i want the label associated with that leaf node..
currently i am catching events in this manner
BEGIN_MESSAGE_MAP(CDocTree, CSizingDocBar)
ON_WM_CREATE()
ON_NOTIFY(NM_DBLCLK,1234,OnTreeNotify)//**
ON_NOTIFY(TVN_KEYDOWN, 1234, OnTreeKeyDown)//**
ON_WM_CONTEXTMENU()
END_MESSAGE_MAP()
how i can achieve it
Thanks and regards
Harshal
|
|
|
|
|
Hi,
Try to
ON_NOTIFY( NM_RCLICK, IDC_TREE, OnRclickOnTree )
in OnRclickOnTree, You can send WM_CONTEXTMENU message.
-----------
Mila
|
|
|
|
|
Check the WM_CONTEXTMENU is called for your tree control.
then check the point where right clicked (lParam value has the point)has any item,.. the handle to the tree will be passed in wParam
if so then check it is leaf node (by checking its child you can find out).
Show your context menu and handle occrdingly..
Hope this'll help...
Do your Duty and Don't expect the Result
|
|
|
|
|
I need to convert a vector to an array. It's no problem really, only one thing bothers me. If i use an iterator to iterate through the vector, i have no counter for the array, unless i declare an extra variable for that. If i use a counter to go through the vector, i bypass the recommended STL-way for iterating - iterators. So, does anyone know any elegant way for that ? I know that it's not really a problem, i'm just trying to optimize my solution.
wbr Mr.Brainley
|
|
|
|
|
A vector 's storage is contiguous, so you can do &my_vector[0] to get an (array-like) pointer to the first element.
|
|
|
|
|
Michael Dunn wrote: A vector's storage is contiguous, so you can do &my_vector[0] to get an (array-like) pointer to the first element.
very encapsulated
|
|
|
|
|
The C++ Standard Library requires that the elements of a vector are in contiguous memory. There's no problem with code like Mike suggested and encapsulation has not been violated as the contiguous storage requirement is documented and required behaviour for a std::vector .
Steve
|
|
|
|
|
Hi
You know we can download all issues of MSDN magazine.
But where can we find recent issues of Microsoft Systems Journal? (http://www.microsoft.com/msj/default.aspx)
I need its recent issues and if you look to the adrees above they are not fully available anywhere.If anyone have recent issues of MSJ,
can please upload anywhere.Or where can i find them.
Thanks
(Sorry if this is wrong forum)
|
|
|
|
|
sawerr wrote: (Sorry if this is wrong forum)
It is, but never mind. MSJ is no more, and hasn't been for some time. Instead, the content was merged with MSDN Magazine.
Steve S
Developer for hire
|
|
|
|
|
sawerr wrote: But where can we find recent issues of Microsoft Systems Journal?
Which one are you interested in?
MSJ merged with MSDN back in 2000 so "recent" is subject to interpretation.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks for all answers.
I you looked http://www.microsoft.com/msj/ some articles are still there.Some links are active but 1986-94 articles are not active. In api hooking revealed article http://www.codeproject.com/system/hooksys.asp author gave link of [9] "Load Your 32-bit DLL into Another Process's Address Space Using INJLIB" MSJ May 1994 but i can not reach this article.
If you can provide
Back Issues — 1995-1996
and
Back Issues — 1986-1994
If you can do all of the articles this will be amazing but few of them are also very good for us.
This is perfect for young programmers.MSJ's articles are really profesional.
Thanks for answers again.
If necessary e-mail: sawerr@gmail.com
|
|
|
|
|
sawerr wrote: ...MSJ May 1994 but i can not reach this article.
The source code is available.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am using WNetAddConnection2 to connect to a remote system in the lan.when i am connecting i want it to connect to the remote in the application level but its getting connected in the user level. Is there any way to connect to the remote in the application level.
thank you.
KIRAN PINJARLA
|
|
|
|
|
What do you mean by "application level?"
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
What do you mean by 'application level' and 'user level' ?
-----------
Mila
|
|
|
|
|
when i am connecting to the remote system by typing the system ip in the windows startButton->run, i have to submit the user name and password.And if iam connecting from my application also i have to submit the username and password.
Now the problem is if first time i am connecting through my app and if i try to connect from strat->run its not asking for username and password because the system is already connected to this user. This can bring me a security problem.
I hope u understood my problem. Thankyou.
KIRAN PINJARLA
|
|
|
|
|
Hi,
If you trying to connect with WNetAddConnection2 and connection's already established, you get 1219 error code (if I remember). Then you can simply disconnect existing session by WNetCancelConnection2.
-----------
Mila
|
|
|
|
|
Hi there!
I'm working on an alarm monitoring app, which may show modeless popup dialogs when needed. All this works fine except when the main application window is iconic (== minimized). When the main window is iconic and a popup dialog is displayed, the popup dialog sort of becomes the main window of the application.
This is quite confusing, since when the user clicks on the application icon in the Start menu only the recent popup is displayed, but the main window is not restored. Right-clicking the start menu icon and selecting "Restore" does the trick, but is not too user-firendly.
Does anyone have ideas about how to handle the creation/display if the popups correctly? I've tried sending the dialogs a WM_SHOWWINDOW message with "parent closing" info, right after creation, but this doesn't seem to help.
Of course I could prevent showing these popups when the app is minimized, but that's not really the way to handle it. What I'm after is to have the popups behave like they do when there are popups when minimizing the main window; the popups are hidden when minimized and redisplayed when the main window is opened again.
Any ideas on this are greatly appreciated!
-Pete
|
|
|
|
|
The behavior looks weird because the dialog's parent window is hidden.
You could
a) Restore the main window then show the dialog
b) Don't restore the main window and use NULL for its parent window
c) Don't restore the main window, create the dialog, but don't show it
If you go with c), make sure the visible style is turned off in the dialog resource.
|
|
|
|
|
Thanks for a VERY quick answer, Mike!
I'll have to see what my my options are here and select the best one. I have thought about a), but not all these windows are probably such that they should restore the main window. I really didn't come to think of the main window being hidden, but of course it is! The button on the start menu isn't really the main window, but just a thingy representing it.
-Pete
|
|
|
|
|
hey my dear code project members,
i am having a problem trying to know the length of a wave file
i tried
mciSendCommand(wDeviceID,MCI_STATUS,MCI_TRACK | MCI_STATUS_LENGTH ,(DWORD)(LPVOID) &mciStatusParms);
actually i don't know how to initialize the MCI_STATUS_PARMS "mciStatusParms"
to get the length (duration) of the wave file
so is this the right way and how can i get it work
if it is not, wat is the right way to get the length of a wave file
thnx alot 4 ur time and concern
|
|
|
|
|
May it be a LAN or internet, How do we detect it? using VC++? anyway through Winsock?.
?
|
|
|
|