|
Can anyonme help me on finding info oin defragmenting a hard drive programatically. Are there any projects on CodeProjects?
gabby
|
|
|
|
|
Gabby,
You could always try www.sysinternals.com
http://www.sysinternals.com/ntw2k/info/defrag.shtml
This information is regarding the built in native support for disk defragmentation on NT and later.
The pointer also includes source code and examples.
Hope it helps
Regards
Darren
|
|
|
|
|
Thank you very much for your help.
I will check up the site right now
gabby
|
|
|
|
|
I've been working on a Phone Book program for a few days and have hit a snag on the graphical part.
I wanted 5 buttons with bitmaps (for home, mobile, work, ect) with text, to do that I would have to make them ownerdrawn, I did'nt want to go through the hastle of that.
I decided to make the buttons bitmaps, then when the mouse is over them change the styles to text to show the text.
I got that working fine but when you click the buttons (actually check buttons) they stay in there current state! When you mouse over the other buttons then come back to the one you just checked it works fine!
Here is the link to a zip with the source+workspace/exe http://www.kruncherinc.com/PhBk.zip
Please, any ideas?
wWw.KruncherInc.cOm
|
|
|
|
|
Are you Invalidate()ing the window of the button who's state changes? The window will only redraw itself in response to a WM_PAINT message- perhaps the action of moving the mouse is triggering this.
There are loads of graphic/bitmap button classes here on codeproject that would probably suit your needs. Yes, you'll need to apply BS_OWNERDRAW to a button for it to appear properly, but these classes will handle all of the details for you.
jon
using System.Beer;
|
|
|
|
|
Hi
I'm facing the following problem using AddFontResource function.
I've got Type1 fonts' files embedded in my programs resources. And I want make them(fonts) automatically install on programm startup and remove on programs shutdown. I'm doing the following:
1) extracting binary data from resources and saving them in temporary files
2) trying to add them by calling
AddFontResource("c:\\windows\\temp\\DIN-Bold.pfm | c:\\windows\\temp\\DIN-Bold.pfb");
But this function always returns 0.
The same procedure works well for single-file ttf fonts.
Could anybody help me to find out why it doesnt install pfm+pfb fonts.
I'll be glad to get any help from you.
|
|
|
|
|
I reckon there's a defect in MSDN - there should be no spaces surrounding the | character, i.e.
AddFontResource("c:\\windows\\temp\\DIN-Bold.pfm|c:\\windows\\temp\\DIN-Bold.pfb"); You might have more luck with that.
Untested, but there are some examples on Google's groups archive.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I'm looking for a library that can convert ASCII, Multibyte and WideChar strings to and from different UTF encodings
- at least UTF-8 and UTF-16
- free (preferrably with source)
- fast
Any sources?
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen
|
|
|
|
|
http://www.unicode.org/Public/PROGRAMS/CVTUTF/
From Unicode.org themselves
Handles UTF-8, UTF-16 and UTF-32.
There's also some UTF-7 code up there, if you care.
You can also use MultiByteToWideChar() and vice versa to do UTF8 and UTF16 conversions. See MS docs for the constants.
|
|
|
|
|
|
hi,
i'm tring to set up BlueTooth communication between 2 PDA's.
in my client side,i wrote this part of code:
WSAQUERYSET Wsaq;
ZeroMemory(&Wsaq,sizeof(Wsaq));
Wsaq.dwSize = sizeof(Wsaq);
Wsaq.dwNameSpace = NS_BTH;
Wsaq.lpcsaBuffer = NULL;
if(WSALookupServiceBegin(&Wsaq,LUP_RETURN_ALL ,&hlookup) == SOCKET_ERROR)
{
ErrorValue = WSAGetLastError();
ErrorString.Format(_T("%d"),ErrorValue);
AfxMessageBox(TEXT("WSALookupServiceBegin() Error
Number ")+ ErrorString);
return;
}
.
.
.
also,in my header file there is #include<winsock2.h> & i've imported ws2.lib,
but i always gets this error:
BTexampleDlg.obj : error LNK2019: unresolved external symbol "int __cdecl
WSALookupServiceBeginW(struct _WSAQuerySetW *,unsigned long,void * *)"
(?WSALookupServiceBeginW@@YAHPAU_WSAQuerySetW@@KPAPAX@Z) referenced in
function "protected: void __cdecl CBTexampleDlg::Onstart(void)" (?
Onstart@CBTexampleDlg@@IAAXXZ)
ARMV4Rel/BTexample.exe : fatal error LNK1120: 1 unresolved externals
(i've got the same error with WSALookupServiceNext() function and
WSALookupServiceEnd() function).
can someone please help me?
my email is : Eliv@Roadeye.co.il
thanks,eli.
|
|
|
|
|
|
Have you imported "ws2_32.lib" ?
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"
|
|
|
|
|
Hello,
I would like to know whether it is possible to listen to a specific EM_/EN_ message from CEdit informing the caret has been moved to a different position? Is there such a message? Or do I have to listen to the OnChar event and from there call GetSel(...,...) to know the caret position?
All comments are very appreciated,
David
|
|
|
|
|
Hi..
I have created some directories and sub directories using the Unicode function "CreatedirectoryW()" as the full path exceeds 260 chars..and it was succesful from the code point of view..
Though I created these when i decided to access them from windows I couldn't do so..It is throwing an error that "can't access this folder.Path is too long"..
If this is the case what is the purpose of Using Unicode function to create directories which exceeds 260 chars limit??
Is there anyway we can access these files???
Thanks
Sudhakar
|
|
|
|
|
Sudhakar Pasupunuri wrote:
If this is the case what is the purpose of Using Unicode function to create directories which exceeds 260 chars limit??
Is there anyway we can access these files???
You can access paths over 260 characters by adding "\\.\" to the beginning of the filename. Remember to escape the backslash.
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"
|
|
|
|
|
Thanks for the valuable info But my question here is :
I want to acceess these files from windows explorer and not through code..
The end user want to open the file and want to see the contents using windows explorer..But then windows throws error that "cann't access the folder/file path is too long "..
Plz help me out in this..
Thanks
Sudhakar
|
|
|
|
|
Sudhakar Pasupunuri wrote:
I want to acceess these files from windows explorer and not through code..
The end user want to open the file and want to see the contents using windows explorer..But then windows throws error that "cann't access the folder/file path is too long "..
Oh, well in that case there's absolutely nothing you can do about it. It is a limitation of Windows explorer. If you want them to be able to access it, you'll have to make the path names shorter.
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"
|
|
|
|
|
I am looking to develop an application which prevents a CD to be coppied.Once it is installed should genrated a unique number through its BAIOS that it cant be duplicated.
THX
|
|
|
|
|
What's a BAIOS ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hi All,
I want to hide the left pane(index, search,context) of the help widow using function HtmlHelp ., but i don't know what's the parameters for HtmlHelp(...) .Is there any other things i should do for it?
Thanks!
YunYan
|
|
|
|
|
I have a static function inside a class. It is actually a seperate thread, so it has to be static. Is there a way that I can access normal members of the class from the static thread funcion? Any help is appreciated.
-Dev578
|
|
|
|
|
This has to be about number #1 question asked here at the C++ forum. Mike Dunn's explains it in detail in his Visual C++ FAQ[^], item 6.1. HTH
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
You should use FindFirstFile and FindNextFile, and check returned WIN32_FIND_DATA structure for FILE_ATTRIBUTE_DIRECTORY attribute. The other function to get current directory, is GetCurrentDirectory not GetDirectory.
Arsalan Malik
|
|
|
|