|
I develop an appli.,which add the icon to system tray.
When I click right click a menu will appears.
I take menu items as Start,Minimise and ShutDown
Bottom menu item behaves like a default menu item .,it is appearing in thick letters. when double click the icon it is shutdown .B'coz I take ShutDown as last menu item.(Bottom menu Item)
If I take Start as a last menu item.It is appearing thick .
and taking defalut.when I double click on the icon Application is Starting.,
What is the Problem .
Praveen Chowdam Kumar
|
|
|
|
|
parims wrote:
What is the Problem .
As best as I can infer, there is no a problem. When the bottom menu item is Shutdown, double-clicking the icon shuts down the application. When the bottom menu item is Start, double-clicking the icon starts the application. What exactly is it that you are (not) wanting?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
i am programming a Socket with SSL .so i had to include header
file for encrytion and SSL.
#include <wincrypt.h>
#include <wintrust.h>
#include <Schnlsp.h>
in stdafx.h
even i mentioned #define _WIN32_WINNT 0x0500 in stdafx.so that crytoAPI can be used.
when i compile i got errors.when i clicked on errors i found that number of member variables of some of the structures in these header files r different from those mentioned in msdn.even some structures which r mentioned in msdn r not present in header files.
i want to know whether i have to update these header files.if it is then how
thanx for any suggestion
-- modified at 9:03 Friday 9th September, 2005
|
|
|
|
|
You cant change headers provided. There is certain version mismatch
|
|
|
|
|
i m working in VC++6 and my OS is Windows 2000 SERVER
|
|
|
|
|
sunit5 wrote:
#include <wincrypt.h> // not needed since it is included by wintrust.h
#include <wintrust.h>
#include <Schnlsp.h>
Are you including windows.h before these? Have you installed the Feb 2003 Platform SDK, and adjusted the search paths to look in it first for include and library files?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
-- modified at 10:11 Friday 9th September, 2005
|
|
|
|
|
Thanx a Lot Mr David Crow.thanx once again
|
|
|
|
|
So is the problem fixed? What was the solution?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Thanx for ur suggestion as i was baffled by this problem.i have to arrange CD for February 2003 SDK.As soon as i get and install it,I will notify you that whether the problem has been fixed.
|
|
|
|
|
Thanx for ur Sugeestion.
Yes the problem is fixed.The Solution was to Update the SDK using FEB 2003 Platform SDK.
I installed Core SDK (from Patform SDK) for updating wincrypt.h and wintrust.h .
And for Schnlsp.h(or one can include Schannel.h as Schnlsp.h includes Schannel.h)i installed Internet Development SDK from
Platform SDK
|
|
|
|
|
I am writing an NT Service which uses ADO to connect to an Oracle Database. I use the following statement to create an ADODB.Connection object.
_ConnectionPtr m_Conn = NULL;
m_Conn.CreateInstance(__uuidof(Connection));
The Create Instance statement fails to create a new Connection object and the m_Conn object is NULL even after the statement is executed.
However, when i try to run the application as a normal Windows Application it works fine.
I get the above problem only when running the application as a Windows Service. Can someone please help me?
Thanks in advance.
|
|
|
|
|
to asses problem just some checks,
use try catch,i.e.
catch _com_error and see what its decription says.
I strongly feels it is some thing related to security, access rights
|
|
|
|
|
Yes, you might end up discovering your service needs to be configured to run as a particular user - a user with some privileges on your local machine or on your domain - so that the service will have network rights or access to certain files. Just because some process runs as a service does not necessarily imply it has free reign of your machine or the LAN.
|
|
|
|
|
Adding a try catch block does not provide any assistance since no exception is thrown when i try to create a Connection object. The following is an extract of my code.
try
{
HRESULT hRes = m_Conn.CreateInstance(__uuidof(Connection));
if (m_Conn)
{
m_Conn->ConnectionString = strConn;
}
else
{
m_sErrorMsg = "Cannot create connection";
return FALSE;
}
}
catch( _com_error &e)
{
// get info from _com_error
m_sErrorMsg.Empty();
m_sErrorMsg.Format("%s : %s", (char *)e.Source(), (char *)e.Description ());
return FALSE;
}
Currently the service runs using the 'Local System' account. I have tried changing it to my user account, but it still doesn't work. The Connection object is null.
Any help is greatly appreciated.
Thanks.
|
|
|
|
|
chamilkab wrote:
Any help is greatly appreciated.
Perhaps you do it else where, but have you made the call to CoInitialize(NULL)?
Also, what is your HRESULT returning?
-------------------------------
DEBUGGING : Removing the needles from the haystack.
-- modified at 7:37 Monday 12th September, 2005
|
|
|
|
|
Hi!
I called ::CoInitialize before trying to create the connection. But still it didn't work when i ran the application as a service. However it works fine when running as a normal application.
However i found out later that since this is a Service Application you have to call ::Coinitialize from the ServiceMain Function.
Thanks for the help
|
|
|
|
|
chamilkab wrote:
However i found out later that since this is a Service Application you have to call ::Coinitialize from the ServiceMain Function.
Glad to hear you finally got it working. Good knowledge to know, I will have to remember that.
-------------------------------
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
Can somebody help me in developing a software for a different language, other than English under WinXP English. Such that, buttons of messageboxes should have caption and text in that language. Any help wud be appreciated.
Best Regards,
|
|
|
|
|
Write some string resources in what ever language you want,
then use them to set the caption (window text) of your controls
SkyWalker
|
|
|
|
|
|
How to create wizard based programs in vc++
Plz Give simple code to understand.
In my system there is no Property Sheet Active X Control.
Praveen Chowdam Kumar
|
|
|
|
|
|
Hello!
This will sound like a simple problem, but unfortunately I wasn't able to do it up to now: just resize a window at runtime.
I have a dialog with a few controls. I now want to reposition one control 10 pixels to the left and make it 10 pixels bigger (i.e. just extend it to the left).
How do I do this?
I tried all combinations of GetWindowRect, ScreenToClient, ClientToScreen, SetWindowPos and MoveWindow that come to my mind, but the control is always positioned incorrectly. Help!!
Best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Let's say, your control is a CEdit (but it can be whatever )
<br />
CRect R;<br />
CEdit *pE = (CEdit *)GetDlgItem(IDC_EDIT_1);<br />
pE->GetWindowRect(&R);<br />
ScreenToClient(&R);<br />
R.left += 10;<br />
R.right += 10;<br />
R.top += 10;<br />
R.bottom += 10;<br />
pE->MoveWindow(&R);<br />
This will move the control 10 pixels to the right and downwards.
SkyWalker
|
|
|
|
|
Ah, this works, many thanks!!
The problem with my attempts was that I called the ScreenToClient function of the window to be moved (pE->ScreenToClient ) instead of the parent dialog's.
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|