|
We kind of have a similar problem with the VCF.
I solved by first explicitly loading RichEd20.dll, then calling CreateWindow (or the appropriate MFC Create() call).
According to MSDN RichEd20.dll is supposed to be on Win98 boxes. If it's not, it is safe to redistribute the RichEd20.dll. SUpposedly this goes for Win95 as well.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
|
|
|
|
|
Thanks, I ended up doing the same (load RichEd20.dll and calling Create()) and it seems to work perfectly. Just to be safe I will include RichEd20.dll in the installer, but only install it if it is not already there, I will not overwrite an existing dll.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Hi Guys.
I posted this problem before, but now I've got the problem narrowed down
a bit. I made a network filetransfer program, with a client and a server.
When I build the client using MFC as a shared DLL, everything works perfectly.
When I build it using MFC as a static lib, the program produces a runtime
error when I try to initialize the sockets, i.e as soon as I try to send a
file. I have searched high and low, but I cant find any explanation, so if
anybody has tried something similiar, plz tell me about it
Shine
|
|
|
|
|
Are you including other DLL in your project? It depends upon how THEY were linked to MFC. For best results, ALL the DLL in your project should have linked to MFC the same way.
I am also wondering if you started other threads in the program? Did you use the CWinThread class to make the thread the sockets are using?
Chekc for uninitialized variables. Maybe the dynamic MFC has some intialization the static MFC does not, and you are missing it.
Lastly, what is the runtime error?
|
|
|
|
|
can anyone tell me how i can find out how much of proceeisng power my application is using...in temrs of percentage, or clock cycles or something like that. Would is an appropraute measure of seeing processor usage and how?
|
|
|
|
|
Ctrl-Shift-Esc brings up the Task Manager. Click on processes, and sort by use. When you see your app, click on it, sort by name and scroll until you can see it. Then you can monitor usage for as long as you like.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Mridang Agarwal wrote:
can anyone tell me how i can find out how much of proceeisng power my application is using...in temrs of percentage,
Task Manager?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi everybody,
I have a simple editboxand i want to do so that the user was not able to type in my editbox symbols like : "?[]\/`<>"
i think you understand i want to do smth like , when you mark "Number" in CEdit options dialog and the user can't type any letters like "abcd...."
Can anybody help???
Regards
m0n0
|
|
|
|
|
Validation and regular expressions were made for each other...
One
Two
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
void DDV_ValidateResult(CDataExchange* pDX,CString& rstrResult)
{
if(pDX->m_bSaveAndValidate)
{
if (rstrResult.IsEmpty())
return;
for(int index=0; index < rstrResult.GetLength() ; index ++)
{
int nAsciiValue=rstrResult.GetAt(index);
if((nAsciiValue>=33 && nAsciiValue<=47) || (nAsciiValue>=58 && nAsciiValue<=64)
||(nAsciiValue>=91 && nAsciiValue<=96)|| (nAsciiValue>=123 && nAsciiValue<=126))
{
if(nAsciiValue!=46)//here 46 is .
{
AfxMessageBox("Please enter a valid value.");
pDX->Fail();
break;
}
}
}
}
}
|
|
|
|
|
Hi everyone,
I have a CDaoDatabase connection, I open a CDaoRecordset with this.
The problem is: I have more of 30000 records stored in tables. How to get portion of this data.?
for example:
query1 : first 1000 records
query2 : next 1000 records (1001 to 2000)
query# :...
I'm using the RDBMS MSDE2000.
The statement "select TOP ..." only retrieve the first records.
Thanks in advance.
Ivan Cachicatari
www.latindevelopers.com
|
|
|
|
|
here's one way:
1. create a temp table with all the fields in your recordset and an identity int column.
2. put all the results from your query into that table (INSERT INTO...)
3. SELECT from that temp table WHERE ID BETWEEN 1001 AND 2000
or, if your original recordset has an identity column, you can just use that.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Thanks for you post.
This option downs the performance of the database server. I have a Pentium III 550Mhz on Win98 and MSDE2000 as data server. You Known another method to do this.
Ivan Cachicatari
www.latindevelopers.com
|
|
|
|
|
Ivan Cachicatari wrote:
You Known another method to do this
sorry, i don't.
i don't know of any Microsoft SQL iimplementations that allow it, but
with MySQL you can use "SELECT * FROM whatever LIMIT low,high".
with SQLServer and Access, i've always had to use the temp table+identitiy field trick
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
i had made the win32 static library in vc6 and code is given both decleration and implemention are
class CKeyLogger : public CObject
{
public:
CKeyLogger();
virtual ~CKeyLogger();
void KeyLoggerMain();
CKeyLogger::CKeyLogger()
{
}
CKeyLogger::~CKeyLogger()
{
}
void CKeyLogger::KeyLoggerMain()
{
MessageBox("library is called");
}
i made the new MFC application class that includes this as below.
#include "..\\KeyLoggerLibrary\\KeyLogger.h"
and in one of its function in this calss i used the code below.
CKeyLogger obj1;
obj.KeyLoggerMain();
it gives no compiler errors but gives the linking error described below.
error LNK2001: unresolved external symbol "public: virtual __thiscall CKeyLogger::~CKeyLogger(void)" (??1CKeyLogger@@UAE@XZ)
file2.obj : error LNK2001: unresolved external symbol "public: __thiscall CKeyLogger::CKeyLogger(void)" (??0CKeyLogger@@QAE@XZ)
file2.obj : error LNK2001: unresolved external symbol "public: void __thiscall CKeyLogger::KeyLoggerMain(void)" (?KeyLoggerMain@CKeyLogger@@QAEXXZ)
Debug/CH3.exe : fatal error LNK1120: 3 unres
can anybody tell me what to do,
ddd
|
|
|
|
|
You obviously didn't link your static library. I don't remember how to do it exactly in VC6, but look in the linker options for "additional libraries" or something like that.
--
Schni Schna Schnappi! Schnappi Schnappi Schnapp!
|
|
|
|
|
i had made the win32 static library in vc6 and code is given both decleration and implemention are
class CKeyLogger : public CObject
{
public:
CKeyLogger();
virtual ~CKeyLogger();
void KeyLoggerMain();
CKeyLogger::CKeyLogger()
{
}
CKeyLogger::~CKeyLogger()
{
}
void CKeyLogger::KeyLoggerMain()
{
MessageBox("library is called");
}
i made the new MFC application class that includes this as below.
#include "..\\KeyLoggerLibrary\\KeyLogger.h"
and in one of its function in this calss i used the code below.
CKeyLogger obj1;
obj.KeyLoggerMain();
it gives no compiler errors but gives the linking error described below.
error LNK2001: unresolved external symbol "public: virtual __thiscall CKeyLogger::~CKeyLogger(void)" (??1CKeyLogger@@UAE@XZ)
file2.obj : error LNK2001: unresolved external symbol "public: __thiscall CKeyLogger::CKeyLogger(void)" (??0CKeyLogger@@QAE@XZ)
file2.obj : error LNK2001: unresolved external symbol "public: void __thiscall CKeyLogger::KeyLoggerMain(void)" (?KeyLoggerMain@CKeyLogger@@QAEXXZ)
Debug/CH3.exe : fatal error LNK1120: 3 unres
can anybody tell me what to do,
ddd
|
|
|
|
|
Is there an echo in here?
--
Schni Schna Schnappi! Schnappi Schnappi Schnapp!
|
|
|
|
|
no dear !
i was not satisfied with ur answer so i re-posted aga in.
ddd
|
|
|
|
|
I am not sure what you called your static library, let us suppose it is called 'KeyLogger.Lib'
Open the workspace for your new program.
Go to he Project menu and select Settings.
Click on the Link tab and choose Input from the Category drop down list box.
You need to do separately this for the debug and release builds.
In 'Additional library path' enter the relative path to the folder where the KeyLogger.Lib file is located. You might have different folders for the debug and release versions of the KeyLogger static library.
In the 'Object/Library Moduloes" enter KeyLogger.Lib
Click OK for the project settings dialog.
Now your project should link.
|
|
|
|
|
i called it the static library bcos i had made by choosing the win32 static libraries in vc6.
i was not able to understand ur comment which is below
You might have different folders for the debug and release versions of the KeyLogger static library.
so tell me form which folder's relative path i should give. debug or relese of keylogger library. what is meant by relative path full path like C:\library\keylogger.lib" or "..\\library\\keyloger.lib".
ddd
|
|
|
|
|
You can enter a fully qualified path.
If you enter a relative path, it is from where your current project's .DSP file is located.
Also when you enter the relative path, do not use the double backslashes.
So you might have something like this in the 'additional library/path' field
..\Library\Debug
for the debug, and for the relase you would have
..\Library\Release
Then in the 'object/library module' settings, you only enter the name of the library by itself: KeyLogger.Lib
|
|
|
|
|
thank u it works perfectaly.
ddd
|
|
|
|
|
I have just asked a question the day before yesterday, And thanks to Alok and Jörgen Sigvardsson who gave me nice ways to solve my last question.
Now I have got a new question to ask. Can I set the keyboard focus on a radio button when the dialog pop up?
I use GetDlgItem(IDC_RADIO1)->SetFocus(); in the OnInitDialog(). But it didn't work.
//IDC_RADIO1 is the ID of the radio button in the dialog
//where I wish the keyboard focus to stay at when the dialog pop up
Thanks!
|
|
|
|
|
If you set the focus in OnInitDialog() , you must return FALSE from OnInitDialog() . If you don't, the normal Windows dialog handling will set the focus to the first control in the tab order.
Software Zen: delete this;
|
|
|
|