|
If you make any mistake all the data could be lost!!!
Don't try it, just do it!
|
|
|
|
|
Is this only for one pc or many? Is this for a client? Are the disks the same size? I ask these questions because linux has a very easy utility to do this. The command is dd. I recently found this when partition magic failed to copy a failing hard drive because it han not been unmounted cleanly. Of course it was unmounted cleanly XP locked up when the disk stoped spinning. Good thing after a reboot it started spinning again... I booted off a gentoo linux live cd and at the prompt I typed dd if=/dev/hda of=/dev/hdb bs=8M and in about 1 hour I had a copy of a 40 MB drive on an 80 MB drive. It did not resize the partitions though but after removing the smaller bad disk windows XP booted and ran fine.
John
|
|
|
|
|
John M. Drescher wrote:
and in about 1 hour I had a copy of a 40 MB drive on an 80 MB drive
I sure hope that those MB's were worth the waiting.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
I do this all the time. I guess it shows my age... I actually had both drive sizes on my main computer sometime in the mid to late 80s. I remember that the 80MB drive cost almost $800 and that was for a drive that had hard errors on it. Since dos 3 did not support partitions above 32 MB I remember I had to split it into multiple partitions...
John
|
|
|
|
|
What a shame that I didn't had the chance to experiance those good old days...
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
I used Oscilloscope control in win32 and i always get an error while graph was plotting data
"Unhandled exception in sm85032.exe (UOPORT.DLL): 0xC0000005: Access Violation."
as i debug into the code the source of the problem was an error in freeing a "POINT" type
pointer variable in the oscilloscope header.
Would there be any problem if i use WTL code in win32?
or is there anything i should set before accessing WTL code.
Any hints on this one.
Thanks!
|
|
|
|
|
Please show the code for freeing the pointer.
Some functions throw exceptions when freeing memory which was never allocated.
And there are no problems when using WTL in Win32 as far as I know.
this is this.
|
|
|
|
|
Here is the code from the header file of the Oscilloscope control
http://www.codeproject.com/wtl/WTL_Oscilloscope.asp[^]
void SetPoints(size_t time, double* values, size_t count)<br />
{<br />
m_time = time;<br />
m_values = values;<br />
m_pointsCnt = count;<br />
<br />
if (m_points) <br />
delete [] m_points;
m_points = new POINT[m_pointsCnt];<br />
<br />
_UpdateYRange();<br />
_Recalc();<br />
}<br />
One thing is that these line do not encounter error not until the 18th time it was accessed so im wondering why?
Any suggestions? Thanks!
|
|
|
|
|
Respected all
Regards!
I am David from Denmark ,, have a problem.
" How to draw the Sin() or Cos() function from 10 to 200 values against time on graph,b/c I have Scalling problem to draw .
Plz guide me.
Best wishes
David
david
|
|
|
|
|
If you were asking for how to draw them, maybe following charting controls may help you:
Charting controls[^]
If you were asking for how to get the data, that's a math problem, please post again with more details.
Hope this helps
~RaGE();
|
|
|
|
|
Hi all,
Anyone could show me the code to open an excel file (*.xls)in VC++?
Thanks a lot in advance.
Grenouille
|
|
|
|
|
|
See the MSDN article Q178749.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi!
I've developed a dialog based application using MFC. In the application I've created an edit box dynamically. On the edit box I do some validation and displays messagebox and sets the focus on the edit box using SetFocus().
The problem I'm facing is, after the validation though the focus goes back to the edit box but the cursor does not blinks as it do initially which can be confusing to the end user.
Kindly help on this!!
Thanks.
|
|
|
|
|
topagarwal wrote:
ocus goes back to the edit box but the cursor does not blinks
Try calling setCursor when you get focus on the edit control.
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
Hello All,
I have created a DLL that has an export which calls CreateDialog to make a modeless DLL.
CreateDialog(hDLL, MAKEINTRESOURCE(IDD_DIALOG1), mWnd, (DLGPROC)DlgCallBack);
When called, the dialog pops up and everything seems to go right... but locks-up as soon as i click or drag mouse into the dialog. My guess is that something might be going wrong with the way I handle messages or something weird caused by using a dll that I am not aware of, but am not sure since i am new to windows programming. Here is the code in my callback
<br />
switch(uMsg)<br />
{<br />
case WM_COMMAND:<br />
<br />
switch(wParam){<br />
case IDOK:<br />
return TRUE;<br />
}<br />
break;<br />
<br />
case WM_DESTROY:<br />
PostQuitMessage(0);<br />
return true;<br />
<br />
case WM_CLOSE:<br />
DestroyWindow(hwnd);<br />
return TRUE;<br />
<br />
}<br />
<br />
return FALSE;<br />
|
|
|
|
|
KnaveR wrote:
which calls CreateDialog to make a modeless DLL.
Did you mean modeless dialog?
KnaveR wrote:
but locks-up as soon as i click or drag mouse into the dialog.
Could you explain a bit on what you mean by that.
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
KnaveR wrote:
return FALSE;
Instead of above call DefDlgProc
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Thnx to both of you.... Sorry for the late reply
Sorry for not properly specifying, but by locking up i ment the infamous "<the app="" calling="" my="" dll=""> has encountered a problem and needs to close" was poping up. For further clarification on what causes this lock up, this occurs anytime I click on the window of the app (mIRC) that calls my dll or move the mouse into my dialog's window. Anyways, after using DefDlgProc, this problem goes away, but the calling app (mIRC) immediately terminates without notice. Any ideas?
|
|
|
|
|
It's been about 11 years since I had to endure writing code without MFC (or more recently, ATL). However, that's where I am. I'm writing a system for a Windows CE 3.0 device and need to declare an array or map of structs within another class. How would I do this in C?
Basically, I have a struct for JobCode.
struct JobCode
{
char* m_number;
char* m_name;
};
And I need to have an array of these in my parent class without hard coding the upper bound.
Cheers,
Tom Archer - Archer Consulting Group
"So look up ahead at times to come, despair is not for us. We have a world and more to see, while this remains behind." - James N. Rowe
|
|
|
|
|
Do you have STL available? If so just use vector or map.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
How can he have STL access in C ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Assuming you're using C, and not C++, you need a JobCode*, and you need to use malloc and free, which means you'll be in trouble if you want to grow your array without losing it. You'd need to memcpy the old one into the new space.
Of course, if it's C++, then you need what you should always use, even in ATL/MFC - the STL.
The other solution is to write your own linked list, but I'm not sure how totally ugly that would be, given that it cannot be in a class.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
Assuming you're using C, and not C++, you need a JobCode*, and you need to use malloc and free, which means you'll be in trouble if you want to grow your array without losing it.
How about realloc or is that not available in C?
|
|
|
|
|
Jack Squirrel Jr. wrote:
How about realloc or is that not available in C?
This is the epitome of a bad function. realloc() has been dubbed the one-function memory manager. If the new size of the block is smaller than the old size, realloc() releases the unwanted memory at the tail end of the block. If the new size is larger than the old size, the expanded block may be allocated at a new address and the contents of the original block copied to the new location. A pointer to the expanded block is returned, and the extended part of the block is left uninitialized. If you attempt to expand a block and realloc() cannot satisfy the request, NULL is returned. If pv is NULL , then realloc() behaves as though you called malloc() and returns a pointer to a newly allocated block, or NULL . If the new size is 0 and pv is not NULL , then realloc() behaves as though you called free(pv) and NULL is returned. If pv is NULL and size is 0, the result is undefined. In summary, realloc() is a prime example of implementation overkill!
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|