|
Are you certain your activex control is registered on your client machines and that the users have turned all the security options dealing with unsigned controls on from within IE? Because what you've done should work; assuming your GUID is a valid control on the client PCs. If the control is proplery constructed, you should be able to reference the .object variable:
if( MyControl.object == null )
alert('Control not found');
Ron Ward
|
|
|
|
|
Hello,
I want to start learn HOOK, but all the tutoials I see here, is in Visual C++ 6, I prefer to start directly from Visual C++.NET.
Where can I start?
Thank's,
Itay.
|
|
|
|
|
|
Hello
I need a view class that can show formatted text with pictures, tables and font colors in two columns (MSWord-like with text flowing from one column to another) with page divisions.
It can be read-only, but with copy operation support.
I was adviced that I can use PDF format in some way.
Can anyone help me with at least a starting point to look for info - some MFC classes, custom controls or articles and sites in inet?
Thank you in advance
|
|
|
|
|
Cant you execute MSWord?
Archigal wrote:
It can be read-only, but with copy operation support.
Copy and paste seems to rule out any pdf-renderer like ghostview.
Only copy may or may not work with pdf (rendering results in a graphic!)
Maybe the easiest would be generating HTML and starting an IE on it?
(You could even design your own XML-dialect and use XSLT to make HTML from it)
You have endless possibilities , but it seems what you want is a several weeks project requiring some degree of experience (or learning on the fly, extending the time).
< edit >RTF (rich text format) might help you. I am sure it can do columns, and a renderer should be somewhere in the web (OpenOffice?)< /edit >
Hope this has helped (and not shattered your dreams).
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Hello,
how can i get the Geteway IP Address ( or List ) in a Windows NT system.
Thanxs
Marco
|
|
|
|
|
I'm trying to write a small program that shovels search parameters into Kazaa and then initiates a search. Almost a dynamic macro
I'm fairly new with Visual Basic and C++, and I while I understand basic DLL structure, I am confused as how I can control one program through another.
Any thoughts or ideas? I know I'm missing something.
|
|
|
|
|
If you want to do it for fun, do it, but if not (if you need it, try to download kazaalite 2.02 that includes that external utility)...
After having said that...
1. If kazaa gives you any DLL with some methods, you should use it.
2. If kazaa don't give you any DLL or OCX... you should intercept windows messages and throw the same (or other) messages to the application parts (I think...)
Hope this helps...
|
|
|
|
|
This is actually even pretty simple.
You search for the Kazaa window with FindWindow or EnumWindows .
Once you found the window, you search for the Kazaa client windows, namely the search edit field and search button with EnumChildWindows .
You enter the search text with SendMessage(wndSearchField, WM_SETTEXT, text, strlen(text)) and simulate a button press like that: SendMessage(::GetParent(wndButton),WM_COMMAND,MAKEWORD(::GetDlgCtrlID(wndButton),BN_CLICKED),(LPARAM)wndButton);
Hope this helps!
regards
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi all,
I'm traversing through a directory extracting information from files in it. I've noticed that the filelist seems to be sorted by name on windows NT, but is sorted by some other method on Windows 2000. Do you know anything about this? I'm using VS C++ 6.0 MFC to build my apps.
I really need to traverse the file list alphabetically, so is there a function out there where I can force the file list to be sorted alphabetically so my lists come out in the order they need to?
Thanks in Advance!
Dan Willis
|
|
|
|
|
FindFirstFile/FindNextFile do not guarantee any order
(probably the NT partition got defragged or sth like that lately, or maybe it's an "added goodie".)
So to play nice, you need to sort the stuff on your own.
So many people long for eternity that don't know what to do on a rainy sunday afternoon. [sighist] | [Agile Programming] [doxygen] If you look for evil in me you will find it whether it's there or not.
|
|
|
|
|
Sorta depends on what you mean by alphabetically.
For files which have numbers in their names and such,
I think that a lexical ordering is not usually
appropriate. I use a different comparator than std::less
for these kinds of things. (see below)
So if you want to process things in a more natural
order, use a collection class with a more
appropriate comparator.
struct MyLessC:binary_function<const char*,const char*,bool> {
bool operator()(const char* a,const char* b) const {
for (;; ) {
if (*a>='0'&&*a<='9') {
int _a=atoi(a);
while(*a>='0'&&*a<='9')
++a;
if (*b>='0'&&*b<='9') {
int _b=atoi(b);
while(*b>='0'&&*b<='9')
++b;
if (_a!=_b)
return _a<_b;
} else {
return *b>'9';
}
} else if (*b>='0'&&*b<='9') {
int _b=atoi(b);
while(*b>='0'&&*b<='9')
++b;
return *a<'0';
} else {
if (*a!=*b)
return *a<*b;
else if (*a)
++a,++b;
else
return false;
}
}
return false;
}
};
|
|
|
|
|
groover4life wrote:
I'm traversing through a directory extracting information from files in it. I've noticed that the filelist seems to be sorted by name on windows NT, but is sorted by some other method on Windows 2000.
I think you are dreaming this up - or more likely, you're mixing up FAT and NTFS.
NTFS is always kept in alphabetic order. That's an inherent property of it.
FAT is more like "thorow it in wherever there is space".
Btw, even if it's 5.0 (aka Windows 2000) or 5.1 (aka eXtreme Perversion), it's still Nice Try.
|
|
|
|
|
void COperDlg::OnButtonSave()
{
m_GridOper.UpdateData(true);
CTreeSet TreeSet;
TreeSet.m_strSort="indexs ASC";
if(!TreeSet.Open(CRecordset::snapshot,"tree"))
{
::AfxMessageBox("error!");
return;
}
int number=1,child;
CString str;
if((m_GridOper.GetRowCount()-1)<=num)
{
while(!TreeSet.IsEOF())
{
str.Format("%d",TreeSet.m_class);
if(m_GridOper.GetItemText(number,2)=="one")
child=1;
else
child=0;
if(m_GridOper.GetItemText(number,0)!=TreeSet.m_treename
||m_GridOper.GetItemText(number,1)!=str||m_GridOper.GetItemText(number,3)!=TreeSet.m_information
||child!=TreeSet.m_child)
{
TreeSet.Edit();
TreeSet.m_treename=m_GridOper.GetItemText(number,0);
TreeSet.m_class=atoi(str);
TreeSet.m_child=child;
TreeSet.m_information=m_GridOper.GetItemText(number,3);
TreeSet.m_indexs=number;
TreeSet.Update();
TreeSet.Requery();
}
number++;
TreeSet.MoveNext();
}
}
if((m_GridOper.GetRowCount()-1)>num)
{
while(!TreeSet.IsEOF())
{
str.Format("%d",TreeSet.m_class);
if(m_GridOper.GetItemText(number,2)=="one")
child=1;
else
child=0;
if(m_GridOper.GetItemText(number,0)!=TreeSet.m_treename
||m_GridOper.GetItemText(number,1)!=str||m_GridOper.GetItemText(number,3)!=TreeSet.m_information
||child!=TreeSet.m_child)
{
TreeSet.Edit();
TreeSet.m_treename=m_GridOper.GetItemText(number,0);
TreeSet.m_class=atoi(str);
TreeSet.m_child=child;
TreeSet.m_information=m_GridOper.GetItemText(number,3);
TreeSet.Update();
TreeSet.Requery();
}
number++;
TreeSet.MoveNext();
}
for(int i=0;i
|
|
|
|
|
Hi,
I created a small VC++ 6.0 application that creates a directory using the current time and date for the directory's name. This works fine.But then I want to copy files from another location into my directory, and CopyFile fails on me, with the error 'file not found'. Of course the file doesn't exist, since I'm trying to copy it into the newly created directory.
Any ideas?
n
|
|
|
|
|
|
hey....if file doesn't exist......how can you copy???
CopyFile() requires one file to exist to copy it to other.
C.R.Naik
|
|
|
|
|
We will have more than one EventMessageFiles and ParameterMessageFiles to get the description for some events.
I don't know how to use these files.
Please send me mail if anyone knows...
We will see the following default description if no message file is there in the registry.
"The description for Event ID ( Event ID) in Source ( Event Source ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event:"
How can I get this default description programatically..
Thanks in Advance,
Mittapalli
|
|
|
|
|
Hy, i really need help in this addin, i just dont get it!
What i want to do: an addin for the VC++ debugger, which, when i (while debugging) rightclick on a variable appears
in the context menue, and when i click my addin there, i want to calculate some things with the value of the variable. So my questions are:how do i bring my addin in the contextmenue, and how can i gain access to the value of the variable (on which i rightclicked) in the debugged code ?
any advice??
thanx a lot
andreas
|
|
|
|
|
Hi,
I'm trying to make an app which uses SDI + Splitter windows. I've successfully got the split I want, which is a full hight left pane, and the right pane being split into two panes top and bottom.
I did this by:- Initialising a Static type CSplitterWnd in my CMainFrame::OnCreateClient. The left pane gets a View, the right pane gets a CRightFrame (which i created&derived from CFrameWnd). The CRightFrame creates a top/bottom split and two views.
So far so good.
I think there is something not quite right with my window styles in the CRightFrame class. If you look at this screengrab http://draft.monster.co.uk/jon/samp.gif[^] you'll see that the right hand panes are framed with a thick line. I've fiddled with loads of different windows styles in the PreCreateWindow member of CRightFrame, but to no avail.
Can anyone point me in the right direction to get rid of these lines please?
Thanks
Jon
#include <beer.h>
|
|
|
|
|
I think the problem is, that the CFrameWnd draws a client edge and also the splitter does draws a client edge inside the views.
Perhaps removing WS_CLIENTEDGE from CFrameWnd does the job,
you could use a custom drawn splitter or change the method of creating the second splitter inside the CFrameWnd.
|
|
|
|
|
Thanks for the input. Unfortunately, it can't be that since my implementation of PreCreateWindow already removed that style:-
cs.dwExStyle &= ~WS_EX_CLIENTEDGE;
#include <beer.h>
|
|
|
|
|
Take a look at this example.
http://www.codeproject.com/splitter/flatsplitter.asp
You can use that class or modify your own class.
Kuphryn
|
|
|
|
|
Hi,
I have a problem in casting CDBVariant string object.
CDBVariant name<br />
...
recset.GetFieldValue("Name",name);<br />
CString str = name.m_pstring;<br />
CString str = (CString&)name.m_pstring;
Thank you in advance.
|
|
|
|
|
m_pstring is of type CString * , so
CString str = *(name.m_pstring); should work fine if the pointer is ok.
rechi
|
|
|
|