|
|
See here.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am trying to create an activex object using VBScript and I want to release the object after usage. I used the following to do it:
//create
Set obj = CreateObject(SomeProgId)
//code
....
....
//release
Set obj = Nothing
The last part "Set obj = Nothing" which is supposed to release the object from the IE memory does not seem to work. Can some one help me in this regard because this looks like a generic problem that someone would have faced earlier.
sunil
|
|
|
|
|
i need help!
if is someone who can help me?
i write a dialog base aplication ! and i use 2 edit box and a list control . What i want to do! : i must write some text in first editbox and (the program must search in list control for that text) give me the answer in another text box if the text exist in list control or not an if not i need a dialog to start and answer me what i must do if the text don t exist "we will save new one" the text in list control is from a database in visualfoxpro 6.0.
Please someone HELP ME !!!!!!!!!
Bravoone
Bravoone
|
|
|
|
|
do not repeat ur question.
modify previous one or keep for waiting.
|
|
|
|
|
Flaviu_2006 wrote: write some text in first editbox and (the program must search in list control for that text)
First get the string from edit control, you can use GetWindowText(..) or GetDlgItemText(..)
then check for the string in CListCtrl using CListCtrl::GetItem(..) or CListCtrl::GetItemText(..)
then if the string matches do your logic to get the information and display it in second edit box SetWindowText(..) or SetDlgItemText(..)
Hope this'll help
Do your Duty and Don't expect the Result
|
|
|
|
|
Parthi_Appu wrote: using CListCtrl::GetItem(..)
CListCtrl::FindItem() will be more appropriate.
nave
|
|
|
|
|
;):->
Do your Duty and Don't expect the Result
|
|
|
|
|
<br />
(1)m_Edit.GetWindowText(str)<br />
(2)CListCtrl::FindItem<br />
(3)m_Edit2.SetWindowText("exist")<br />
USES_CONVERSION;
m_List1.InsertColumn(0,"a");
m_List1.InsertItem(0,"a");
m_List1.InsertItem(0,"b");
m_List1.InsertItem(0,"test");
LVFINDINFO find1;
find1.psz = A2T("test");
int index;
find1.flags = LVFI_PARTIAL|LVFI_STRING;
index=m_List1.FindItem(&find1,-1);
if(index!=-1)
MessageBox("Exist");
|
|
|
|
|
In CWnd sub-class, ScrollBars have been successfully displayed by function SetScrollInfo(...).
but, in both message handles:
OnVScroll(UINT nSBCode,UINT nPos,CScrollBar*pBar)
and
OnHScroll(UINT nSBCode,UINT nPos,CScrollBar*pBar)
the value of pBar is NULL.
GetScrollBarCtrl(...) also returns NULL.
scroll bars are visible and info (nPage ...) is correct, but why pointers to bars can not be obtained.
Do you have idea to get scroll bars of CWnd?
|
|
|
|
|
this is because in the CWnd sub-class, the scroll is not a window. Its just a painting. If there is no scroll bar then how can GetScrollBarCtrl() return a winow handle?
nave
|
|
|
|
|
I think the pointer is non-null only when the message came from a separately scroll bar control. If the message came from a window having WS_HSCROLL or WS_VSCROLL style, then there is no scroll bar controls (since window uses built-in scroll bars), and the pointer is NULL .
In this case you have to manipulate the scroll bar using CWnd ’s members like SetScrollInfo .
|
|
|
|
|
hy all !
i need help!
if is someone who can help me?
i write a dialog base aplication ! and i use 2 edit box and a list control . What i want to do! : i must write some text in first editbox and (the program must search in list control for that text) give me the answer in another text box if the text exist in list control or not an if not i need a dialog to start and answer me what i must do if the text don t exist "we will save new one" the text in list control is from a database in visualfoxpro 6.0.
Please someone HELP ME !!!!!!!!!
Bravoone
Bravoone
|
|
|
|
|
do u use MFC?
u only need to read text of edit by function GetWindowText() then check if it is inside of list-box by FindStringExact() (MFC function) - if u use Win32, try to do a little research by read docs/help-files about list-box.
|
|
|
|
|
Hi all,
I have successfully automated MSWord in VC++, I hve tried to open a doc file and save it as a txt. But while executing saveAs statement , it is encountering an Unhandled Exception(Run time Error)
My Code is
if(!AfxOleInit()) // Your addition starts here
{
AfxMessageBox("Could not initialize COM dll");
return FALSE;
}
else
{
AfxMessageBox("Inint");
}
_Application app; // app is the Excel _Application object
if(!app.CreateDispatch("Word.Application"))
{
AfxMessageBox("Couldn't start Excel.");
}
else
{
//Make Excel Visible and display a message
app.SetVisible(TRUE);
AfxMessageBox ("Word is Running!");
}
//COleVariant covTrue(true),covFalse(false),covOptional(NULL);
COleVariant
covTrue((short)TRUE), covFalse((short)FALSE), covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR), covFormat( short(7));
Documents docs;
_Document oDoc;
oDoc.AttachDispatch( // opening file
(docs.Open(COleVariant("D:\\george\\geo.doc"),
covTrue, // Confirm Conversion.
covFalse, // ReadOnly.
covFalse, // AddToRecentFiles.
covOptional, // PasswordDocument.
covOptional, // PasswordTemplate.
covFalse, // Revert.
covOptional, // WritePasswordDocument.
covOptional, // WritePasswordTemplate.
covTrue,
covTrue,
covOptional,
covOptional,
covOptional,
covOptional
)),
FALSE);
//saving to txt format
//Problem comes from here
oDoc.SaveAs(COleVariant("D:\\george\\win.txt"),
covFormat,covOptional,covOptional,
covOptional,covOptional,covFalse,
covOptional,covFalse,covTrue,
covTrue,covTrue,covTrue,covTrue,
covTrue,covTrue);
//Can Anyone tell what alteration should I make to run my programme without error
Please Help me
Thanks in Advance
George K Jolly
|
|
|
|
|
Maybe you should try this:
Documents docs = app.GetDocuments();
_Document doc = docs.Open(....);
doc.SaveAs(....);
I hope this works.
|
|
|
|
|
Hi Viorel,
Thanks a lot ,Its Working Perfectly,
George K Jolly
|
|
|
|
|
Hi, how I create Bitmap (HBITMAP or bitmap for CImage) from CMemFile???
Thanks
|
|
|
|
|
|
Hello,
Does winapi have function on add ip for host, or I have to do parser for hosts file located in system32\drivers\etc\?
Thanks in advance
|
|
|
|
|
Anybody could please provide some useful link to know more about C++ VTABLE.
How the compiler constructs vtable? is it per object basis or per class?
I'd like to know more about some internal stuffs regarding vtable.
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
|
|
|
|
|
|
|
Hi,
In my windows application I want to detect scrolling events in IE. I have written a hook which handles mouse and keyboard events. How to detech scrolling events in IE
Regards,
Hemant Kulkarni.
|
|
|
|
|
Hemant kulkarni wrote: written a hook which handles mouse and keyboard events
WH_MSGFILTER or WH_GETMESSAGE hook will be good. Inside this u can monitor the WM_HSROLL and WM_VSCROLL message...
nave
|
|
|
|