|
There are libraries now for doing Office 2007-style toolbars, such as the recently-released MFC feature pack, but it's highly unlikely that they'll work in VC 6. I love VC 6 as much as anyone, but even I don't (or rather, can't) use it for new development anymore because newer libraries and SDKs will only work with the last 1 or 2 revs of VC.
--Mike--
Dunder-Mifflin, this is Pam
|
|
|
|
|
Hi All.
I am looking to implement event handling between non-COM classes in C++ using the Visual Studio 6 IDE but am finding it very difficult to find any help on doing this.
Does anyone have any links to articles or sample code that shows me how to do this? I can't use any of the .NET Framework environments as the target machine does not have these installed.
Many thanks.
|
|
|
|
|
I would use something like libsigc++[^]. This implements a 'signal-slot' arrangement almost exactly the same as .NET events, but in plain C++.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks for the reply, I'll take a look.
|
|
|
|
|
We use sigc++ at work. Once you get past the learning curve, it's very powerful.
--Mike--
Dunder-Mifflin, this is Pam
|
|
|
|
|
Personally, I'd tend to use Boost.Signals, as I know I'll be using other bits of Boost as well. BUt I'm not sure if the new version of that is VC6 compatible, so.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hello friends
What is the message Notification when we change view in a dialog?
thanks & Regards
Yogesh
|
|
|
|
|
What do you mean by "change view in a dialog" ? There's no "view" in a dialog...
You should really learn to ask a question properly if you want help: all the questions you ask are just so cryptic that a lot of people have to ask you question about what you are trying to do. If you really want help, you should learn to formulate your question so that others can understand you.
The big problem with your questions is that you assume that everybody knows what you are talking about, which is of course not the case. So, next time you ask a question, take the time to introduce the context (what are you trying to do at a high level, not just blindly focusing on the point you are trying to solve). A question like this taken out of its context doesn't mean anything... Keep in mind that we can't see what you are doing.
|
|
|
|
|
OK sir,From next time i will do more clearly.
Now I am using openfilename and when dialog is open,we can change view for that to list ,icons etc..
So for that I am using lpfnhook and i want to know IS there any notification when we change the view?
Thanks for your valuable time in my postings.
|
|
|
|
|
yogeshs wrote: What is the message Notification when we change view in a dialog?
From the yesterday's post, I guess you want to know the style of the list control while the open file dialog is closed. For that I answered you yesterday.
You will get WM_STYLECHANGED message, when the view of the list control is changed. the applciation is using common control version 6, you will get LVM_SETVIEW message.
|
|
|
|
|
thanks Naveen
But I m not getting WM_STYLECHANGED notification while changing view in a dialog.I am having the handle of listview But I need some notifiction from where i can get viewtype?
Please suggest something other.
Thanks & Regards
Yogesh
|
|
|
|
|
yogeshs wrote: But I m not getting WM_STYLECHANGED notification while changing view in a dialog
Do the open file dialog have windows XP theme?
yogeshs wrote: .I am having the handle of listview But I need some notifiction from where i can get viewtype?
You have to subclass the window proc of the list view and inside that, you have to check for the WM_STYLECHANGED/LVM_SETVIEW message. You can use SetWindowSubclass() function to subclass the window proc.
|
|
|
|
|
yogeshs wrote: ...where i can get viewtype?
Have you tried sending the control a LVM_GETVIEW message?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi,
Is there a way to configure a CFileDialog so that it displays the files in date order by default without the user having to choose this?
Thanks
Tony
|
|
|
|
|
Just look this [^]
Величие не Бога может быть недооценена.
|
|
|
|
|
Great thanks.
Tony
|
|
|
|
|
how to encrypt / decrypt a text file(*.txt) using vc++
|
|
|
|
|
This looks promising: Example C Program: Encoding and Decoding Data.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
kamalilam wrote: how to encrypt / decrypt a text file(*.txt)
I suppose the file format doesn't matter.
See here for sample how to use win32 cryptoapi.
Life is a stage and we are all actors!
|
|
|
|
|
|
hi all
i want to develop an application in which i need to find unused disk space in a disk. please guide me how it will possible using C++/VC++/MFC
|
|
|
|
|
Use can use GetDiskFreeSpaceEx API to get the free disk space in a disk. Just refer for more details[^]
Величие не Бога может быть недооценена.
modified on Tuesday, October 27, 2009 2:43 AM
|
|
|
|
|
Use these functions and get the free space Smile
double funcToGetDriveFreeSpace(LPSTR drive)// give drive name here
{
BOOL success;
CString driveName = drive;
driveName.Append(_T(":\\"));
//LPCTSTR DiskDirectory = _T("C:\\"); // directory name
__int64 AvailableBytes; // number of bytes on disk available to the caller
__int64 TotalBytes; // number of bytes on disk
__int64 FreeBytes; // free bytes on disk
DWORD SectorsPerCluster=0; // pointer to sectors per cluster
DWORD BytesPerSector=0; // pointer to bytes per sector
DWORD FreeClusters=0; // pointer to number of free clusters
DWORD TotalClusters=0; // pointer to total number of clusters
//char FmtNumber[20];
double Size;
char Units[3];
success = GetDiskFreeSpaceEx((CHAR*)driveName.GetString(), (PULARGE_INTEGER) &AvailableBytes,
(PULARGE_INTEGER) &TotalBytes, (PULARGE_INTEGER) &FreeBytes);
if (!success)
{
success = GetDiskFreeSpace((CHAR*)driveName.GetString(), &SectorsPerCluster,
&BytesPerSector, &FreeClusters, &TotalClusters);
FreeBytes = FreeClusters * SectorsPerCluster * BytesPerSector;
TotalBytes = TotalClusters * SectorsPerCluster * BytesPerSector;
if (!success)
{
return -1;
}
}
if (success)
{
fmtsize(FreeBytes,(double&) Size, Units);
return Size;
}
}
void ::fmtsize( __int64 Number, double &Size, char Units[3])
{
const int KB = 1024;
const int MB = 1024*1024;
const int GB = KB*MB;
double DIV;
if (Number>GB)
{
DIV = double(GB);
strcpy(Units,"GB");
}else if (Number > MB)
{
DIV = double(MB);
strcpy(Units,"MB");
}else
{
DIV = double(KB);
strcpy(Units,"KB");
}
Size = Number / DIV;
}
If you like the answer mark this answer as GOOD and close the Thread.
Regards,
Kushagra
I hate coding but I luv to develop
modified on Tuesday, October 27, 2009 3:12 AM
|
|
|
|
|
hello
basically i am developing an application in which i have to wipe the files/data from a disk those are deleted from the hard disk so tell me how i should do.
|
|
|
|
|
See its not clear what you want to achieve. Give more details on what exactly is your goal, and please spare some time in explaining what have you achieved till now and what is required to be achieved. Please be specific in asking about what you want to do , else its all too vague.
Reagards,
Kushagra
|
|
|
|