|
mohdshiraz wrote:
any help ?
http://www.adobeforums.com/cgi-bin/webx?14@@.eed56a0
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I am trying to automate Outlook using Visual C++. Here is what I am trying to do:
void CTestOutlookDoc::OnFileTest()
{
Outlook::CApplication pApp;
if (!pApp.CreateDispatch(_T("Outlook.Application")))
{
CString str;
str.Format("CreateDispatch() failed w/error 0x%08lx", e.m_sc);
AfxMessageBox(str, MB_SETFOREGROUND);
return;
}
pApp.m_bAutoRelease = TRUE;
pApp.Quit();
return;
}
When the code is executed, an instance of Outlook is created. However, even I call Quit() in my code, OUTLOOK.EXE still remains in Windows Task Manager after the program is quit. What should I do in order to kill the OUTLOOK process when I call Quit() in my function?
Regards,
Frank
|
|
|
|
|
I am a domain administrator for a Win 2K system. My domain a/c is included in the administrators list. Though I have these privileges, I am not able to register any dll. But I can register dll as a local admin. Is there any changes tobe done, so that I can registe Dlls from the domain A/C.
Shenthil
|
|
|
|
|
|
Hi, Friends,
I developed a shareware to protect and manage passwords, which has following features:
1. USB-Disk and Floppy disk supported
2. MD5 Algorithm supported to store User account info
3. Industrial-Standard Encryption Algoritm to protect password items
4. Bird-Eye (C) Technology adopted to prevent peering
5. Hacker Hooking prevented
Welcome evaluate it from http://www.annexsoft.com/kingpass/index.htm
and send any comments to me (relations@annexsoft.com).
//***************************
I believe ideal is not always so far away...
|
|
|
|
|
Idea number one - if you want to advertise your products, run an add, they appear on the left. If you want people to evaluate your code, post your code.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Nicely said, Christian.
Heard in Bullhead City - "You haven't lost your girl - you've just lost your turn..." [sigh] So true...
|
|
|
|
|
hehe;P,
So sorry for the disturbance. Of course, I know the way to ad a software is AD, but for the time being, I have no any feedback from customers of my product, that's to say, I have not enough info to determine if this ware deserves the relatively high AD fees
Sorry again if this message dirties your eyes, but can someone tell me some forums for software UI and Usage evaluations?
CC
//***************************
I believe ideal is not always so far away...
|
|
|
|
|
Hi,
I am developing an application which uses Microsoft SQL Server 2000 . My program should try to catch all possible errors including network related problems and handle it my self. I am using CRecordset class to handle my SQL connection.
My problem is this: Whenever I execute the Open() function of CRecordset class during which network connection is down, the Microsoft SQL Server Login appears. I don't want to show this message to the user but instead I want to replace it with my own error message. I used try{..}catch(CDBException *e){..} but failed. Here some part of my code:
// Clot_sum_server is CRecordset derived class
Clot_sum_server lot_sum_server(NULL);
lot_sum_server.m_strFilter = "lot_id = \'" + localLotID + "\'";
try{
lot_sum_server.Open();
}
catch(CDBException* e)
{
e->Delete();
MessageBox("Failed to connect to SQLServer","Warning",MB_ICONSTOP);
}
This code, could not display "Failed to connect to SQLServer" message box. Instead, the default Microsoft SQL Server Login dialog box appears.
Any help will be highly appreciated.
Thanks !
Mar
Mar Solero Jr.
|
|
|
|
|
You aren't providing any credentials, or specifying that you want to use NT Authentication;
Have you set up your own ODBC connection, or are you just using the default one?
There are flags you can pass to OpenDatabase which say not to bring up the UI if there is insufficient information to connect, but to fail instead.
Steve S
|
|
|
|
|
Hi Steve,
I am using SQL Server authentication. I also setup my own ODBC connection by programatically editing the registry. In CRecordset class I included the
UID and PWD. Below are the contents of GetDefaultConnect() function. The Clot_sum_server is derived from CRecordset class. My OS is WinXP.
CString Clot_sum_server::GetDefaultConnect()
{
return _T("ODBC;DSN=sync_lotsum_server;UID=mhar;PWD=mhar");
}
Below are the contents of sync_lotsum_server in the registry:
Database REG_SZ sample
Description REG_SZ sample data base
Driver REG_SZ C:\WINDOWS\System32\sqlsrv32.dll
LastUser REG_SZ mhar
QueryLog_On REG_SZ Yes
QueryLogTime REG_SZ 900000
Server REG_SZ amkor.com
Trusted_Connection REG_SZ No
Here is my sample code:
#include "lot_sum_server.h"
//<< check the Win2k server database >>>>>>>>>>>>
//<<<< set flag to true >>>>
Etc_var.SQL_Connection = true;
// server connection to tfm dbase table 'tfm_lotsum'
Clot_sum_server lot_sum_server(NULL);
try
{
lot_sum_server.Open(); //here I cannot catch the default SQL Message
}
catch(CDBException *e)
{
e->Delete();
Misc_func.log_error("error open() ");
Etc_var.SQL_Connection = false;
}
if(Etc_var.SQL_Connection)
{
while(!lot_sum_server.IsEOF())
{
m_List1.AddString(lot_sum_server.m_lot_id);
try{
lot_sum_server.MoveNext();
}
catch(CDBException* e)
{
e->Delete();
Misc_func.log_error("error MoveNext()");
Etc_var.SQL_Connection = false;
break;
}
}// while(!lot_sum_server.IsEOF())
lot_sum_server.Close();
}// if(Etc_var.SQL_Connection)
Thanks in advance !!
Mhar
Mar Solero Jr.
|
|
|
|
|
Hey all.
I've been looking around for an API that will do this for me easily but can not seem to find what I really am looking for. As usual, I'm probably typing in the wrong keywords.
I want to generate a unique "session" string key. IE. When you hit some websites that use a sessionID, you can see the unique key in the URL (if they have turned cookies off). That long sessionID=jk1239123jkasdnlxmn1823123lkjasdfbnlkasjdfks) ... where the odds of two of the same ID's being generated are fairly nill!
I am looking for an API that will do that. Create a "random" big long string full of letters and numbers.
Any suggestions?
|
|
|
|
|
You want to create a GUID. Look up GUID.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Thanks!
That is dead nuts on what I was looking for!
I wrote a nice routine that goes through that generates them, adds them to a list, and then checks the list to make sure that a duplicate entry has not been found.
I just finished processing 50,000 and not one duplicate found. (hehe, and I did debug my list-check code to make sure it was finding dupes!) Exactly what I was looking for!
Thanks again.
Shultas
|
|
|
|
|
shultas wrote:
I wrote a nice routine that goes through that generates them, adds them to a list, and then checks the list to make sure that a duplicate entry has not been found.
If you are using Guidgen.exe, or this algorithm, there should be no need to check for uniqueness.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Which hook do I need to use? I was thinking SYSMSGFILTER since its a global hook.
|
|
|
|
|
i get the handle of a textbox in an opened window using the function
EnumChildWindows(,,)..
after i obtained the handle of this textbox i want to set a specific
string in this textbox.
"HINT" : the function SetWindowText(,) isn't a valid to this task(why?)
more--->
the opened window has a textbox ,a button ,a label;
and when i used the spy++ program of Microsoft tools to get the caption
to each of them after using SetWindowtext(,),i observed that:
the caption of the label is same as the value appears on it<the
caption="" and="" value="" appears="" are="" equal="" to="" each="" other="" the="" string
posted="" by="" setwindowtext()=""> ,BUT
the caption of the textbox isn't the same as the value appears on it
<the value="" is="" nothing="" but="" the="" caption="" equal="" to="" string="" posted="" by=""
setwindowtext()="" function="">then i want an API function to set the value of the textbox not the
caption..
thank you very much for any help..
Sender :Amr abdel mohsen
Email: app_prog@yahoo.com
|
|
|
|
|
amr abdel mohsen wrote:
then i want an API function to set the value of the textbox not the
caption..
I think you are a bit confused as to the purpose of the WM_SETTEXT message. For an edit control, the text is the contents of the edit control. For a combobox, the text is the contents of the edit-control portion of the combobox. For a button, the text is the button name. For other windows, the text is the window title. SetWindowText() is the function you want.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hello, there.
I have a dll, which is loaded by the host application, and in the exported function I show a dialog. I had no problem until I put a custom control in the dialog. If custom control is present in the dialog m_dlg.Create(IDD_DIALOG1) returns 0. (does not properly create a dialog).
I traced the problem down to the
hWnd=::CreateDialogIndirect(hInst,lpDialogTemplate,pParentWnd->GetSafeHwnd(),AfxDlgProc);
All parameters has some values (not NULLs), but, if a custom control is present in the dialog, returned value is 0, which makes hWnd to be NULL. If custom control is deleted everything is just fine!
Immidiatly after that there is ::GetLastError(), but it also returns 0 (operation is successful) even though hWnd is NULL.
I do not associate custom control with any class. I just drop it down on the dialog (it does not work with an associated custom control either).
Any ideas? Thanks in advance.
Regards,
Alexander.
|
|
|
|
|
Hi:
I have an MFC dialog based app. When someone clicks on ENTER button while dialog is up, the dialog window disppears. I have no idea how to make the dialog responds to "Enter" clicks.
Any help will be appreciated.
Thanks.
|
|
|
|
|
I guess you just have to override the OnOK() method, like this...
SampleDialog.h:
virtual void OnOK(); SampleDialog.cpp:
void CSampleDialog::OnOK()
{
} If a user now presses enter the dialog won't close anymore...
Regards, mYkel
|
|
|
|
|
I tried that, and thanks it worked.
|
|
|
|
|
Maybe you also want to to another action when the Enter button is pushed. for that, you have to change the default button of your dialog. the default button is the one that is pushed when Enter is pressed. you also have one associated to the Esc key.
TOXCCT alias Nicolas C.
|
|
|
|
|
Hi all;
I am writing an application which will have an ADO-based database connection. In order to send stuff to the DB, i need to convert variables from CString, char, int or Date into variants. However, it does not work for int and i still cannot figure out how to add data in a field whose type is date.
Could somebody please help me.
Thanks guys
Krugger
|
|
|
|
|
_variant_t( double dblSrc, VARTYPE vtSrc = VT_R8 ) Constructs a _variant_t object of type VT_R8 or VT_DATE from a double numerical value. Any other VARTYPE results in an E_INVALIDARG error.
(msdn...)
greatest thing is to do wot others think you cant suhredayan@omniquad.com
|
|
|
|