|
why my comboboxex doesn't show tooltip with mouse over editctrl? (cursor is edit's)
all difference i see comparing to another functional example is i have comboboxex, OnToolHitTest fills still absolutely the same, in calling function gets to TTM_ACTIVATE and HWND_TOP but nothing happens
(i tried when is over edit return edit's or comboboex's id etc. but all failed)
all is fine when mouse is not over edit resp. when i open it without edit (CBS_DROPDOWNLIST only)
has someone this problem?
t!
|
|
|
|
|
I've been looking at Memory Leak detectors and I've found this one 'Memory Sleuth 3' by Turbo Power. You can get a trial version here ...
http://www.turbopower.com/trialrun
They say 'Trial-Run Editions of TurboPower products are fully-working versions of our software. The only restriction is that your compiler's IDE is running. In other words, you cannot deploy your applications with the Trial-Run Editions.'
This sounds pretty handy to me, am I missing the catch?
Just in case anyone missed me going on about Memory Detectors recently, I found this one called GlowCode which I realy like, and you can get a free time limited trial here ....
http://www.glowcode.com/update.htm
If you are looking for this kind of tool too, try them and let me know what you think, because I can't decided which to choose.
Ali
|
|
|
|
|
Have you looked at the one Software Verification advertise on CP ? I got a copy for winning the C# screensaver contest, and while I've not had a chance to look at it too deeply, I'm impressed with what I have seen. I believe Rama won one as well, and so did James, maybe ask them also.
I seem to recall you are in the UK, and they are too, so that's probably a plus as well, in terms of support.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
Good idea, I'll give it a try.
Anyone else who might be interested the link is ....
http://www.softwareverify.com
(I've put that in because the advert is not always on screen.)
Ali
|
|
|
|
|
Have you tried Nu Mega's bounds checker?
I used a version on NT (a while ago). It worked quite well, however, it did not work too well when I was coding some low level RPC stuff.
Jeremy.
"Hey man, Taliban, Tali me Banana."
|
|
|
|
|
Hi,
I have seen some rulers designed by VC++, but is there a
ruler designed as a timecode (hour, minute, second and frame,
with 1 second = 30 frames)?
Did you have any purpose or ideas?
Thanks in advance!
chen
|
|
|
|
|
Couldn't you just take the code for an existing ruler, and modify it?
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Hi all,
I would like to copy a file from a remote machine.Since the machine is running on WINDOWS 2000.I have to connect it using account name & password.Can anyone tell me how can i provide account name and password through program?.
With regards.
Shibu K.V.
Senior Research Associate.
VLSI ASIC Hardware Design Group
Electronics R&D Centre,Trivandrum
India
|
|
|
|
|
Use 'WNetAddConnection2'.
|
|
|
|
|
Hello, folks,
I got some trouble using MFC CDialog class in my DLL (MFC static linked DLL).
Though my DLL is made MFC static linked, when I use MFC classes to create a dialog (pop-up or child), I always got a window creation error.
I know I can create dialog using win32 SDK (i.e, using CreateDialog(..) or DialogBoxParam(..), I did them before !), but I still want to use MFC to create my dialog. Because I also have something like CListCtrl or CListView on that dialog.
Could anybody help me ? Or I should use win32 SDK instead ?
And, are "list control" and "list view" same ?
Any response would be appreciated.
|
|
|
|
|
Yo Yo~~ wrote:
Though my DLL is made MFC static linked, when I use MFC classes to create a dialog (pop-up or child), I always got a window creation error.
Post your code, pls ... The code is more likely to be wrong than the MFC dll
~RaGE();
|
|
|
|
|
/// on MyGUIDlg.cpp; a dialog based application
void CGUIDlg::OnViewLog()
{
DWORD r = 0;
r = ViewLogFile( this->m_hWnd );
}
/// on MyDLL.cpp; a MFC static linked DLL
DLLExport DWORD WINAPI ViewLogFile( HWND hParendWnd )
{
CWnd* pParentWnd = new CWnd();
pParentWnd->Attach( hParendWnd );
CEventLogDlg* pLogDlg = new CEventLogDlg( pParentWnd );
if ( pLogDlg != NULL )
{
pLogDlg->Create( IDD_EVENT_LOG, pParentWnd );
///IDD_EVENT_LOG is resource ID
pLogDlg->ShowWindow( SW_SHOW );
}
}
/// class CEventLogDlg
class CEventLogDlg : public CDialog
{
........
}
|
|
|
|
|
There may be a confusion about the resource you try to load. Called from an application, your DLL will try to load application's resource.
To be sure what you are loading, try this:
In the dialog constructor:
CMyDlg::CMyDlg(CWnd* pParent /*=NULL*/) : CDialog(/*CMyDlg::IDD*/)
{
HINSTANCE hInstance = GetModuleHandle(_T("MyDLL"));
VERIFY(hInstance);
HRSRC hResource = ::FindResource(hInstance, MAKEINTRESOURCE(IDD_MYRESOURCE), RT_DIALOG);
VERIFY(hResource);
HGLOBAL hTemplate = LoadResource(hInstance, hResource);
VERIFY(hTemplate);
InitModalIndirect((HGLOBAL)hTemplate, pParent);
FreeResource(hTemplate);
}
We do not inherit the Earth from our ancestors. We borrow it from our children.
Antoine de Saint Exupéry (1900-1944)
|
|
|
|
|
I tried your suggestion, put that code in my dialog's constructor and compiled the dll. Then in my app, I added the dialog's *.h file, but when I tried to compile my app, I got and error about an undefined symbol in the dialog box's header file:
#ifdef _USRDLL
#define DllExport __declspec( dllexport )
#else
#define DllExport __declspec( dllimport )
#endif
class DllExport CMyDlg : public CDialog
{
// Construction
public:
enum { IDD = IDD_MYDIALOG_DIALOG };
I know that IDD_MYDIALOG_DIALOG is defined in the dll's resource.h file. Do I also have to include it in my app's *.cpp ?
|
|
|
|
|
Thanks ! It really helps.
I tried your codes and added something in my DLL as follows. Then it worked !
/// in MyDLL.cpp
CMyDlg* InitMyDialog( HWND hParent )
{
CMyDlg* pMyDlg = NULL;
AFX_MANAGE_STATE( AfxGetStaticModuleState() );
pMyDlg = new CMyDlg( CWnd::FromHandle( hParent ) );
if ( pMyDlg != NULL )
pMyDlg->ShowWindow( SW_HIDE );
return pMyDlg;
}
|
|
|
|
|
Hello gurus.
I'm currently programming am application for windows 2000 (in Visual Studio C++ 6.0).
It's a program that creates LDIF files that will be used to update a LDAP entries. (openLDAP)
I've run into one problem tough. Is there a function/library in VSC++ that is similar to the unix crypt()? (using md5 or the ldap {crypt})
Yes, I'm a beginner, but I'm learning.
|
|
|
|
|
Franz Granlund wrote:
Hello gurus.
Hi there.
Franz Granlund wrote:
Is there a function/library in VSC++ that is similar to the unix crypt()?
Try to use CryptoAPI. Maybe you will find it too complex, but it should fulfil your requirements.
|
|
|
|
|
Thank you for your answer, but that is way to complex for me.. =)
Do you know of any other library? Or could you help me get started? It's such a small application, that I don't wan't to spend to much time figuring the crypto-world out. (Yes, I wan't to learn someday, but not today. )
|
|
|
|
|
I am not sure if using some library would be easier. Try to write short pseudocode, what you are doing in your UNIX code and I will reply with MS Crypto API version.
|
|
|
|
|
First, thank you very much for trying to help me out!
Well, I wan't a crypt() functionality of a linux system that uses PAM and MD5 password enabled. (The linux dist is Redhat 7.3)
A short code written and compiled under linux:
#include <crypt.h>
int main()
{
char p[100]; // Allocate this dynamically later..
char s[100];
char *e;
strcpy(p, "fan");
strcpy(s, "xe");
e = crypt(p, s);
printf("Password: %s\nEncrypted: %s\n",p, e);
return 0;
}
The output:
$ ./m
Password: fan
Encrypted: xeY7nbSvmz7jU
Hope you get some information from this code..
Again, thank you for trying to help.
|
|
|
|
|
Well, when it is Linux, you have to have sources for it, including crypt() function, have you tried to port to Win32? And, do you expect to get the same result (xeY7nbSvmz7jU), or you just do not care and encrypted password is enough for you (I mean, you do not require interoperability then between your new code on Windows and old code on Linux)?
|
|
|
|
|
try crypto++. i think there is a tutorial somewhere on this site for it.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Franz,
See this article.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Anyone have free HTML Syntax Hilighting Class (MFC or ATL)? I found one at CP, but its not the best implementation...
Thank you!
|
|
|
|
|
I would like to ask two technical questions on a problem that I have bumped into and it is the following:
First Question:
Can you build a Windows DLL from implementations that are resident in a .hpp/.h file[ NOT corresponding .cpp dll implementation files like Jeffrey Richter assumes ], where the implementation is a template<> class and/or collection of template<> classes?
The concern is that I am building a middleware backend that has classes designed preliminarily with templates and parameterized polymorphic class types and of course all its implementation is in the header file, but Jeffrey Richter, the author of the well known Microsoft Systems Programming books has his samples on building DLLs using a classical non template classes where the header files do this:
//->DLL_Lib.h
#if !defined _DLL_LIB_H
#define DLL_LIB_H
#if defined DLL_LIB_INTER
//->the #define for the extern “C” __declspec( dllexport ) is in .cpp file
#else
#define DLL_LIB_INTER extern “C” __declspec( dllimport )
#endif //->DLL_LIB_INTER
#include <string> //->includes STL std::string
//->Define exported/imported( if DLL_LIB.h not in .cpp file function prototypes now
DLL_LIB_INTER void foo( std::string& token );
DLL_LIB_INTER void fooBar( std::string& token );
DLL_LIB_INTER void fooBarFoo( std::string& token );
DLL_LIB_INTER void fooBarFooBoo( std::string& token );
//->Define exported C++ class type definitions
DLL_LIB_INTER class Foo_ed { … }; //->DLL_LIB_INTER the class members also?
DLL_LIB_INTER class FooBar_ed { … };
DLL_LIB_INTER class FooBarFooBoo_ed { … };
#endif //->_DLL_LIB_H
and the corresponding source files are as below for example:
#include <iostream>
#include <windows.h>
#define DLL_LIB_INTER extern “C” __declspec( dllexport )
//->Now include the DLL_Lib.h header file to read the #define up top
#include “DLL_Lib.h”
//->DLL_LIB_INTER omitted from class member function and non-class functions //->This is OK. Windows compiler records DLL_LIB_INTER macro flag from the
//->DLL_Lib.h header file.
void foo( std::string& token ) { /* Impl */ }
void fooBar( std::string& token ) { /* Impl */ }
void fooBarFoo( std::string& token ) { /* Impl */ }
void fooBarFooBoo( std::string& token ) { /* Impl */ }
//->Define exported C++ class type definitions
Foo_ed::Foo_ed() { /* Impl */ }
~Foo_ed::Foo_ed() { /* Impl */ }
Foo_ed::Foo_ed( const Foo_ed& rhs ) { /* Impl */ }
bool Foo_ed::interpolate( std::string& tokenBlock ) { /* Impl */ }
//->Foo_ed:: member functions defined
FooBar_ed::FooBar_ed() { /* Impl */ }
~FooBar_ed::FooBar_ed() { /* Impl */ }
FooBar_ed::FooBar_ed( const FooBar_ed& rhs ) { /* Impl */ }
bool FooBar_ed::interpolate( std::string& tokenBlock ) { /* Impl */ }
//->FooBar_ed:: member functions defined
FooBarFooBoo_ed:: FooBarFooBoo_ed () { /* Impl */ }
~FooBarFooBoo_ed:: FooBarFooBoo_ed () { /* Impl */ }
FooBarFooBoo_ed:: FooBarFooBoo_ed ( const FooBarFooBoo& rhs ) { /* Impl */ }
bool FooBarFooBoo_ed::interpolate( std::string& tokenBlock ) { /* Impl */ }
//->FooBarFooBoo_ed:: member functions defined
But, with templates, the C++ export keyword to separate the C++ template interfaces in the .hpp/.h header file from a secluded and hidden support implementation in the .cpp SOURCE IS NOT supported globally yet, especially with the compiler the project I am working on, which has firmly decided on, Visual C++ 6.0 with Service Pack 5 OR even Visual C++ 7.0 .NET( at least not yet: if Lippman and Sutter have anything to say about it ).
Question: If I cannot use the export templates model to separate class templates intefaces from their implemenations, how CAN I BUILD Windows DLLS from solely C++ template header implementations or from a combination of C++ templates .hpp/.h files and auxillary .cpp files? CAN THIS BE ACCOMPLISHED?
Does the DLL NEED a corresponding .cpp file assuming all DLL implementations are in a templates class?
You help would be greatly needed and appreciated for my own learning.
LAST QUESTION:
When building C++ templates in their .hpp/.h files, and I say have a SINGLETON class that itself is a templatized version of the Singleton, where does the static class data members get initialized?
a) Outside the template Singleton class, but in the same .hpp/.h header file as the template class itself ?
OR
b) like non-template classes holding static data members outside the class definition( unless it is an integral type ).h header file and into the .cpp file at the top of the file, before its use?
AS A SIDE QUESTION?
*Do I need to extern “C” __declspec( dllimport/dllimport ) the individual C++ member functions, static functions, static data variables, and class data instance variables?
Thank You for help,
|
|
|
|