|
|
|
RasSetEntryProperties changes an existing Dialup entry or creates it if none exists by the name provided. If you want to make sure the entry you are creating is fresh, use RasDeleteEntry first.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
Hi all..
i have a problem as follows
i created an VB activex dll which is using another 2 VB activx dlls and one c++ dll can any one tell me
how can i use this VB activex dll in vc++
thanks in advance
anju
|
|
|
|
|
if it's registered, and has a typelib, you can add a wrapper class to your VC project. Project menu / Add to Project / Components And Controls. then VC will create a wrapper class for the ActiveX control that you can use.
-c
For men use, if they have an evil turn, to write it in marble:
and whoso doth us a good turn we write it in dust.
-- Sir Thomas More
|
|
|
|
|
Thak u for reply.
still i have problem
i registered my activex vb dll
and followed your steps it is
giving me the following error
"The file you have selected is not a recognizable component"
can u clarify me it needs to me very urgent
thank u
anju
|
|
|
|
|
I have create a .dll which compiles fine that I am trying to call from within VB. It seems like something must be wrong somewhere because when I call the function it actually creates a new file and it just starts getting huge very fast, soon I had a file that was around 200 meg. Does something look goofy with the one function in you dll?
#include "Append.h"
void __stdcall AppendFile(char *pcMainFile, char *pcAppendThisFile)
{
ifstream inFile;
ofstream outFile;
int c;
inFile.open(pcMainFile, ios::in);
outFile.open(pcAppendThisFile, ios::app);
while(! inFile.eof())
{
c = inFile.get();
if(c != inFile.eof())
{
outFile << (char)c;
}
}
inFile.close();
outFile.close();
}
VB portion is declared as such
Private Declare Function AppendFile Lib "C:\Documents and Settings\User\Desktop\file\AppendFile\Debug\AppendFile.dll" (ByVal pcMainFile As String, ByVal pcAppendThisFile As String)
Private Sub Form_Load()
Call AppendFile("C:\Documents and Settings\User\Desktop\file\hello.txt", "C:\Documents and Settings\User\Desktop\file\nick.txt")
End Sub
Thanks in advance.
Nick Parker
|
|
|
|
|
while(! inFile.eof())
{
c = inFile.get();
if(c != inFile.eof())
so which is it: does it return EOF or is EOF a property of the file?
-c
For men use, if they have an evil turn, to write it in marble:
and whoso doth us a good turn we write it in dust.
-- Sir Thomas More
|
|
|
|
|
Should it not be both EOF being a property of the file, which I am checking as I cycle through it. Did I miss something?
Nick Parker
|
|
|
|
|
There are two eof() methods, which are easily confused due to the crappy STL docs.
basic_ios::eof() returns a bool indicating whether the stream has hit the end of the file.
char_traits<char>::eof() returns the character value that is returned by get() when the stream hits the end of the file.
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Are the strings coming in to the C function correct? VB uses BSTRs, doesn't it?
Also, your if (c != inFile.eof()) should be if (!inFile.eof()) . Your code compares c with the EOF flag of the stream, which isn't what you intended.
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Ok, thanks Mike, I fixed that little bug however I am still creating a new file that dramatically gets large really fast. The only thing I am not really sure about now is the .def file used. It looks like this, I am not sure exactly how this is suppose to be structured, I used this structure as I read it in an example.
LIBRARY AppendFile
DESCRIPTION 'Append one file to another'
EXPORTS
AppendFile @1
Nick Parker
|
|
|
|
|
Nick Parker wrote:
I am still creating a new file that dramatically gets large really fast
here's a simple way to debug in this situation:
start VC. load your DLL workspace. put a breakpoint in AppendFile.
"run" it. when VC asks "which executable to use?" give it the path to the VB EXE (the actual Visual Basic IDE, not your VB app).
load your VB app and run it.
-c
For men use, if they have an evil turn, to write it in marble:
and whoso doth us a good turn we write it in dust.
-- Sir Thomas More
|
|
|
|
|
Is there a way to create a pane in a static splitter window based on an existing dialog resource? I've tried using CFormView and I've decided that the doc/view architecture is way to complicated. I am trying to achieve something similar to the Class View in VC++ 6.0 for a custom game editor I am working on.
Thanks,
-Matt
|
|
|
|
|
derive anew class from CSplitWnd, over load next two virtual function:
virtual CWnd* GetActivePane(int* pRow = NULL, int* pCol = NULL);
virtual void SetActivePane( int row, int col, CWnd* pWnd = NULL );
implement as follow:
CWnd* CTSplitterWnd::GetActivePane(int* pRow, int* pCol)
{
ASSERT_VALID(this);
CWnd* pView = GetFocus();
if (pView != NULL && !IsChildPane(pView, pRow, pCol))
pView = NULL;
return pView;
}
void CTSplitterWnd::SetActivePane( int row, int col, CWnd* pWnd)
{
CWnd* pPane = pWnd == NULL ? GetPane(row, col) : pWnd;
pPane->SetFocus();
}
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
redbomberman wrote:
I am trying to achieve something similar to the Class View in VC++ 6.0 for a custom game editor I am working on.
Then you're after docking windows, not a splitter. CP has a number of solutions, IMHO the best is this one:
http://www.codeproject.com/docking/sizecbar.asp [^]
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
I want to hide certain item's in my list view but I don't know how to do it. I've thought of making the hiden items having a height of 0 or simply not drawing them using custom draw but I have no idea how to do either of the two. I don't want to remove them from the list, just hide. Any ideas on how to do this?
There's always one more bug.
|
|
|
|
|
|
Anyone knows how to disable edit boxes w/in your program? Thx
ralf.riedel@usm.edu
|
|
|
|
|
MyEdit.EnableWindow(FALSE);
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
or GetDialogItem ( THE_EDIT_ID )->EnableWindow( value );
value = TRUE --> ENABLE
value = FALSE --> DISABLE
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I would use
m_Edit.ModifyStyle(0, ES_READONLY) ;
This would allow the ocntent to still be copied to the clipboard by the user, but not change it.
Roger Allen
Sonork 100.10016
I think I need a new quote, I am on the prowl, so look out for a soft cute furry looking animal, which is really a Hippo in disguise. Its probably me.
|
|
|
|
|
I have a VB activeX dll. How does one call this from an MFC application?
Thanks,
ns
|
|
|
|
|
Try to import the methods of dll. For that try to make a new class from the dll....
I never tried that but you can try to do...
Best Regards....
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|