|
Thanks for taking the time to respond!
I'm new at this Services game...dmadden is my domain account. Could you tell me what I need to do to get this reading the right one (if this is incorrect...remember it doesn't work even if I set it up to use my Domain account)? The Service needs to connect to a Domain account when it starts. The Server will (of course) also be in the Domain (not to mention the Server where the mailbox resides).
Thanks in advance,
Dan
|
|
|
|
|
Daniel two questions:
(1) Which account are you installing this app into the SCM??
(2) Have you tried specifying your FULL domain name for the account name??
(ie. instead of "dmadden" have you tried "<domain>\dmadden"??
|
|
|
|
|
Hi guys,
i am somewhat new to GDI coding, and i am about at my wits end as to how to accomplish this....
What i want to do is have 2 CListCtrls, one on top of the other, and then animate the top one moving off (to reveal the other underneath). The top one animates out of view and all we are left with is the bottom one. I am attempting to create an effect somewhat like that in the bar on the left hand side in MS Outlook (though with CListCtrls).
My first thoughts as to how to do this nicely were to create two memory dcs and render each ListCtrl to one. Then, at regular time intervals i would BitBlt an amount from each DC to the screenDC and i would have my lovely animation
I can create a memDC for the ListCtrl which is at first on the top because i can do a GetDC and then bitblt() from it. However.. ...i cannot do the same for the ListCtrl which is initially hidden as its DC will be blank (it hasnt been painted). Is there anyone out there who knows how to get a window to paint itself to a given Memory DC?
Or is there anyone who has a better suggestion for creating this effect?
Any help would be greatly appreciated, thanks.
~Alex
|
|
|
|
|
Check out WM_PRINT - it renders a window into a DC that you supply.
--Mike--
http://home.inreach.com/mdunn/
This must be Thursday. I never could get the hang of Thursdays...
|
|
|
|
|
<<< In the name of GOD >>>
Hi all.
I have almost 50 buttons in 1 dialog.
I should write function that :
When user hited the one of them (buttons), then :
function should return :
* Number of button *
I need good algourithm.
Thanks.
Hadi Rezaie
|
|
|
|
|
hmmmmm
you could make an array of the button control id's and a value you want, ie,
struct myButton {
int nCtrlID;
int nMyValue;
};
all the button click events route to one function that decodes which button was clicked from its id value and returns the correct integer value to your app
kinda would work but i think its dodgy and would rather have 50 click events ... it is more robust
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes themint
|
|
|
|
|
better I think you can use map<int nctrlid,="" int="" nyourvalue="">.
good luck,
Dror
|
|
|
|
|
In the name of GOD ?
You could do this a myriad of ways. You could ensure the ID's of the buttons were sequential, and then in your pretranslatemessage you could intercept id's within the range and store the value stripped of it's excess ( i.e. for 0 based subtract the id of button #1 from the value, for 1 based, add one to that ), you could put in handlers for each button ( more donkey work, but probably more robust ), you could use radio buttons, where a 0 based value is stored anyhow, you could use a struct, as has been suggested, etc. You don't need an algorythm, you just need to decide on a process.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Hey Hadi,
Create a class that inherits from CButton and implement the OnClick event.
In the OnClick you should notify your parent that you have been clicked.
A simple way to do this would be to have your new class have the members:
HWND m_hwndWindowToNotify;
int m_iMessageToSend;
int m_iMyId;
Which you set when you create them all from the parent.
(I assume you have a variable length array)
So you set each CNewButton's hwndWindowToNotify to the parent.
The iMessageToSend to something like WM_USER+100 (which you don'y re-use!)
An m_iMyId as the number of the button (for ease on implementation).
CNewButton::OnClick()
{
::SendMessage(m_hwndWindowToNotify, m_iMessageToSend, m_iMyId, 0);
}
CParentDlg::OnCustom_SpecialButtonClick(LPARAM l, WPARARM w)
{
int iButtonIndex = (int)l;
// Do stuff for iButtonIndex button click
}
*** Don't forget to add ***
ON_MESSAGE(WM_USER+100, OnCustom_SpecialButtonClick)
to your parents message map (BEGIN_MESSAGE_MAP...)
Let us know how you go.
Jules
|
|
|
|
|
Here's a fun one -
Assuming MFC, you can use the ON_COMMAND_RANGE message map macro.
First, define all your buttons so that their ids are contiguous - i.e. IDC_BUTTON1 is 1000, IDC_BUTTON2 is 1001 etc.
Declare one handler as afx_message void MyButtons(UINT i) . Then use the range macro to send all of the buttons clicks to that fn:
ON_COMMAND_RANGE(IDC_BUTTON1, IDC_BUTTON50, MyButtons)
Remember to put this outside the //}}AFX_MSG_MAP stuff, but still inside the BEGIN_MESSAGE_MAP sandwich.
Then, your code can look like this:
void CTestDlg::MyButtons(UINT i)
{
}
i should hold the id of the button pressed.
|
|
|
|
|
Hi.
I Know that in Borland there're automatic .Bak files which are backup for any compiled file.
I was wondering if there're any such files in the VC++ 6.0 , and if not if there an option
to set VC++ to create back up files.
Thanks.
Gal.
|
|
|
|
|
No, but we could BUILD one ( spurious Black Adder reference )
To my knowledge, there isn't, but you can define a pre build or post build step, so it would be pretty easy to run something that did what you want, so it ran just before every build, or just after.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
HI All,
I have a situation where I need to have only one instance of a class at any given time. How would I do that. If you provide code it will be better. It is very urgent.
Thanking you
A.Santosh
|
|
|
|
|
|
Hi All,
I am trying to write an customised unistallation exe.
The problem I am facing is, after uninstallation,
the exe is left over..
So, I need to write a self destructing exe
which will destroy itself once uninstallation is complete.
Has any body tried this,
|
|
|
|
|
ummm
why not use the installers that are available?
installshield or the microsoft installer?
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
do you program clown chips?
|
|
|
|
|
i have a masters degree in them
along with clown fish
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
|
Thank you Jason. Excellent!
|
|
|
|
|
|
Is there a function or macro to convert an HRESULT to a win32 error code that can be set with SetLastError()? or can I just use the HRESULT value as the error code?
BOOL CMyWrapperClass::WrapperFunction()
{
HRESULT hr = IInterface.Function();
if (hr == S_OK) return TRUE;
DWORD error_code = Some_conversion_function(hr);
SetLastError(error_code);
return FALSE;
}
|
|
|
|
|
No. HRESULT values are determined by the server that produced them, they may or may not be standard Microsoft error values. You need to have the server's documentation to find out what HRESULT values mean.
|
|
|
|
|
There are some macros listed in the COM and MAPI docs that can extract the different portions of an HRESULT. Grep the MSDN for "Using Macros for Error Handling".
I think Mel has a point about their mapping to standard win32 codes - but at least you can get em.
There's also DECODE.CPP / .H. The readme warns that errors added after its release will not be recognized.
|
|
|
|
|
Thanks for the replies Where can I find DECODE.CPP / .H
I guess my best bet now would be to check all the HRESULTS returned from the functions and make sure they are defined in winerror.h before I do a SetLastError() with them, and change them to something close that is defined otherwise;)
|
|
|
|