|
Thanks
m0n0
|
|
|
|
|
|
Thanks, it's really cool FAQ.
I found answer to a problem which mourned me for a long time i also wanted to do so that i was able to select full row in CListCtrl and it was explained here in one line , though i found many articles where this was achieved by writing several lines of code
m0n0
|
|
|
|
|
I am having a small problem using CRichEditCtrl on w9x (app built with VC6 sp6 on w2k). When I run the app on w2k, AfxInitRichEdit() loads RichEd32.dll which in turn loads RichEd20.dll that contains the code for version 3.0 of the rich edit control. But if I run the app on w98 the RichEd32.dll that gets loaded contains the code for version 1.0 of the rich edit control, and the control fails to be created. I tried to put the w2k copy of RichEd32 in the same folder as the app, but it does not get loaded, the app instead loads the older version found in the system directory. I had always had the understanding that the app would load the dll from the apps directory first before it went to the system directory, but apparently I was wrong on that. If I move the newer dll to the system directory, and remove the old dll, everything works great.
Question: Is it safe to redistribute the newer (v5) RichEd32.dll to w9x to replace the older (v4) dll that is already there? or is that just going to cause nothing but grief to other apps that may use the same dll? If I do that do I also have to redistribute RichEd20.dll? The RichEd dlls are not on the list of redistributable files that came with VC. I am guessing this is where the term "dll hell" comes from.
The only other option I can think of is not use MFC6's CRichEditCtrl, but to instead write my own wrapper that uses RichEd20.dll directly.
"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
|
|
|
|
|
I don't use W9x at all, so this based on reading MSDN, rather than practial experience, but the docs say that to use RICHED20.DLL, you have to call AfxInitRichEdit2 (note the '2' on the end).
|
|
|
|
|
I seen that to, but unfortunately that is a MFC7 function, it is undefined in MFC6.
[edit]
Or possibly my PSDK is out of date. Well either way I am going to write my own wrapper class to get around all the BS involved here. All I need are 6 functions and all MFC does is call ::SendMessage() so I can do that too.
[/edit]
"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
|
|
|
|
|
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
|
|
|
|