|
Hello,
Read the guidelines[^] before you post anything further.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
hi sir/madam i need c code(c programing) of matlab function imrotate(image rotate)so plz help me
|
|
|
|
|
since the default user interface in visual c++ is not very good, I don't want to use the default the buttons, the combo box, the edit,...
how can i do? Are there some good article and codes that can be used?
modified on Monday, June 29, 2009 12:03 AM
|
|
|
|
|
You can always subclass the existing controls and create your own using bitmaps..there are lots of links on CodeProject itself.
|
|
|
|
|
thanks a lot, for visual c++ ,is there any specified link on codeproject for beginners? or the link of some good articles?
|
|
|
|
|
does any one knows it? thks a lot
|
|
|
|
|
Hi~ I'm a student from Korea. I don't know how to explain with Engilish well. sorry for that.
I would like to make a program that can prevent thef lap top.
For example, If someone lost lap top, the someone would like to find out and doesn't would like to be used it by thef.
You know what I mean?? sorry..
I would like to prevent format HDD.I don't know how to that. Could you tell me the method?
I had a idea,but I don't know that is possible.
that is if the program could prevent to enter CMOS and boot with CD,
the thef couldn't format HDD (my program) then the program would send mail with IP address.
I would like to make the program like that... Could I prevent format HDD with source ??
1. Could I set up bios password with source without cmos?
2. Could I fix to boot only HDD??(Can't boot with CD For that purpous is to prevent format)
Could you help me please..
I'm looking foward to answering ..thanks
|
|
|
|
|
You can't do that in software, because you can't prevent the thief from putting the drive in another computer and formatting it there. Nor can you prevent him from taking a big magnet and erasing the drive that way. A better solution is to encrypt the drive, so if it is stolen, the thief can't read the data on the drive. Take a look at TrueCrypt[^]
There are also companies that offer services for tracking the laptop if it is stolen. One of them used to be a CP contest sponsor, but I can't remember the name right now.
|
|
|
|
|
Thanks for reply
I got it.. thanks ..
What I mean is this is supposition.
Most of them won't know about computer very well so they will just use the lap top only..
Could I ask something??
Is it possible that I can default setting CMOS and just fix?
that mean is even though the thef try to change setting CMOS or CD boot, the CMOS setting just fix.
I heard that was already used in public Pc( PC cafe). sorry
|
|
|
|
|
what ever happened to microsofts "BitLocker" anyone remember the hype about that? seems to have fizzed out to nothing
|
|
|
|
|
BitLocker is still around, I rarely hear anything about it though. TrueCrypt is the app I hear mentioned most often.
--Mike--
|
|
|
|
|
Thanks for your reply..
Have a good day !!
I will research BitLocker and TrueCrypt.
|
|
|
|
|
I just installed Windows 7 RC and I did see the BitLocker option in the explorer.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Can someone help me with the below ADO API? I am a new programmer and am having problems programming a SQL Server connection. I have found various connection strings and continue to run into problems with the syntax. Thank you in advance.
#include "stdafx.h"
#include <iostream>
#include <string>
#import "C:\Program files\Common Files\System\Ado\msado15.dll" rename("EOF", "ADOEOF")
//---------------------------------------------------------------------------------------------------------------------------------------------
std::string outputashex(unsigned long l)
{
char buffer[1024];
::itoa(l, buffer, 16);
return buffer;
} ;
//---------------------------------------------------------------------------------------------------------------------------------------------
void main()
{
HRESULT hr;
CoInitialize(NULL);
try
{
ADODB::_ConnectionPtr connection;
hr = connection.CreateInstance(__uuidof(ADODB::Connection));
if (FAILED(hr))
{
throw _com_error(hr);
}
//--------------------------------------------------------------------------------------------------------------------------------------------
ADODB::_RecordsetPtr recordset;
hr = recordset.CreateInstance(__uuidof(ADODB::Recordset));
if (FAILED(hr))
{
throw _com_error(hr);
}
//--------------------------------------------------------------------------------------------------------------------------------------------
connection->CursorLocation = ADODB::adUseClient;
//--------------------------------------------------------------------------------------------------------------------------------------------
connection->Open("Provider=sqloledb;Server=.\SQLExpress;AttachDbFilename=c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\WattsALoan.mdf;Database=WattsALoan;Trusted_Connection=Yes;")
//-------------------------------------------------------------------------------------------------------------------------------------------
//recordset->Open("CREATE TABLE mytable (value NVARCHAR(255))",
//connection.GetInterfacePtr(), ADODB::adOpenForwardOnly,
//ADODB::adLockReadOnly, ADODB::adCmdText);
//--------------------------------------------------------------------------------------------------------------------------------------------
//recordset->Open("INSERT INTO mytable VALUES ('Hello')",
//connection.GetInterfacePtr(), ADODB::adOpenForwardOnly,
//ADODB::adLockReadOnly, ADODB::adCmdText);
//--------------------------------------------------------------------------------------------------------------------------------------------
//recordset->Open("INSERT INTO mytable VALUES ('Goodbye')",
//connection.GetInterfacePtr(), ADODB::adOpenForwardOnly,
//ADODB::adLockReadOnly, ADODB::adCmdText);
//--------------------------------------------------------------------------------------------------------------------------------------------
recordset->Open("SELECT * from Customers",
connection.GetInterfacePtr(),
ADODB::adOpenForwardOnly, ADODB::adLockReadOnly,
ADODB::adCmdText);
//--------------------------------------------------------------------------------------------------------------------------------------------
while(!recordset->ADOEOF)
{
_variant_t var;
var = recordset->Fields->GetItem(L"value")->GetValue();
std::cout << static_cast<char *>(_bstr_t(var.bstrVal))
<< std::endl;
recordset->MoveNext();
};
//--------------------------------------------------------------------------------------------------------------------------------------------
//recordset->Close();
//recordset->Open("DROP TABLE mytable", connection.GetInterfacePtr(),
//ADODB::adOpenForwardOnly, ADODB::adLockReadOnly,
//ADODB::adCmdText);
}
catch(_com_error &e)
{
std::cerr << ::outputashex(hr) << ":"
<< static_cast<char *>(e.Description());
}
catch(...)
{
std::cerr << "Unhandled Exception";
};
}
|
|
|
|
|
I have an application in which a second (worker) thread is created using AfxBeginThread(). The execution of this thread can be stalled due to a WaitOnSingleObject(), which MAY never get signalled. In this situation, when the application main thread terminates, I get a memory leak as follows:-
Detected memory leaks!
Dumping objects ->
strcore.cpp(118) : {78} normal block at 0x003011E0, 16 bytes long.
Data: < D:\ > 01 00 00 00 03 00 00 00 03 00 00 00 44 3A 5C 00
strcore.cpp(118) : {77} normal block at 0x00301220, 59 bytes long.
Data: < . Thre> 01 00 00 00 11 00 00 00 2E 00 00 00 54 68 72 65
thrdcore.cpp(166) : {71} client block at 0x003014C0, subtype 0, 112 bytes long.
a CWinThread object at 003014C0, 112 bytes long
If the WaitOnSingleObject gets signalled, then there is no memory leak.
I have tried various things to get over this problem, but have had no success. How should I properly deal with a waiting thread to avoid the memory leak ? (Apologies if this is a "trivial" question to the more experienced "threaders" !!)
Doug
|
|
|
|
|
Add a "Terminate" event and then do a WaitOnMultipleObjects() with the terminate event handle first in the array. When you need to terminate, set the terminate event and sleep at least 0 (to give the other thread a chance to run.) Have the thread then exit normally and it will do cleanup.
A more sophisticated solution is to wait on the thread handle after you set the terminate event, though AfxBeginThread() makes this a bit tricky.
|
|
|
|
|
Hi Joe, I had actually implemented your first solution already, except for the Sleep(0) - I NOW realise that there was a thread "race", which therefore still allowed failure. I also found that it works just as well with the terminate event handle in the second position in the array - have I missed something ? Many thanks for your help by the way !!
Doug
|
|
|
|
|
I say put the terminate first because the wait processes objects in order. If the terminate event is last in the list and the previous events keep going signaled, you may never pick up that the terminate event is signaled (unless you check it after the WaitForMultipleObjects.)
|
|
|
|
|
Of course !! Thanks again for your help
Doug
|
|
|
|
|
Have a look here[^] for a more descriptive explanation of what Joe is talking about.
You'll also find a lot of things that are Really Good To Know regarding multithreading in the article.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Is it possible to make vertical scrollbar to smooth scroll contents of the list control?
I want to have the same behavior as horizontal scrollbar has.
|
|
|
|
|
Hello, I downloaded B+ tree template from ScalingWeb:
http://www.scalingweb.com/downloads/B+Tree-1.0.zip
but the problem is that I can't make it work, because it uses Qt. I never faced with Qt and don't know what to do. After downloading Qt SDK and reading help, I still don't understand how to make this template work
Can someone explain how to use Qt in this situation?
I sit on Windows XP.
|
|
|
|
|
Hello,
There is a Forum for QT[^] and you may possibly get better help there (with regards to QT).
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi!
I can not register an ActiveX control on my Vista.
When I do regsvr32 c:\windows\system32\MyActivX.ocx (i write this command in command prompt),
I got an error: MyActivX.ocx was loaded but the call to DLLRegisterServer failed with error code 0x80040200.!!!
I login to the Vista with Administrator, and Right click on the icon for Command Prompt on the start menu and select Run as Administrator.
but I got this error message, yet!!!
Can anyone give an idea what i'm doing wrong???
Zo.Naderi-Iran
|
|
|
|
|
Try opening the command prompt with elevated privileges by right clicking on the shortcut and selecting "Run as Administrator".
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|