|
I would implement a modeless dialog that contained a progress control. That dialog/control can be controlled via your main dialog as it does the (copy) work.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi,
In my application I need to get the complete Hard Drive size.
I am using Windows 2000.
Is there any API to get the size of hard drive in win2000?
I don't want to use WMI class (win32_DiskDrive).
Thanks in advance.
|
|
|
|
|
IOCTL_DISK_GET_DRIVE_GEOMETRY is another way to do it.
The API to use here is DeviceIoControl .
From Windows XP onwards you can use IOCTL_DISK_GET_DRIVE_GEOMETRY_EX to directly get the disk size.
«_Superman_»
|
|
|
|
|
Madan Chauhan wrote: Is there any API to get the size of hard drive in win2000?
Such as this?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi all,
for show or hide window i m using a function ShowWindow,but how can i chk window is currently show or hide.
i have created two buttons on dialog ,i want if window is show than show button is disabled and hide button is enabled.
same for hidewindow if window is hide than hide button is disabled and show button is enabled.
please tell me.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Surprisingly it is called IsWindowVisible[^], but really, google could have told you that in 5 secs.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
thanks its done.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
No probs.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hello.
How i can print (ex. as pdf) with:
1. unicode support font (ex. farsi language)
and
2. insert bitmap file
with vc++ 6.0 ?
|
|
|
|
|
You can't create/print a PDF file from VC++ out of the box, you will either need a third party PDF writer library OR a PDF printer driver (like CutePDF[^]).
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hello,
no i don't want print directy pdf file,
now i install pdf distiller & have pdf driver - ok -
but when print my string with _T("") macro, print bad words !!!
My sample, use from class QPrint Code Project.
http://www.codeproject.com/KB/printing/QPrint.aspx?fid=301520&select=2885714&fr=1
for example:
CQPrint m_ocQPrint;
m_ocQPrint.Print(hFont,_T("محمد"),FORMAT_NORMAL);
but print bad-words - i found printing text out in CQPrint::Print function & with this code:
// now print the text...
m_DC.TextOut(lx,m_y,strSubText);
if (!(Format & FORMAT_NOLF)) {
m_y += Size.cy + CALCY(m_Abstand);
}
|
|
|
|
|
I see...i'm not sure but i guess you need the right font to be able to print this, in your TextOut aproach, try instantiating a CFont object, use e.g. CreateFontIndirect[^] to create a font that fits your needs, select it into the DC and then try to print your text.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
|
Maybe you also need to specify the charset for the font. If you used CreateFontIndirect then you specified it a LOGFONT struct, check out the documentation what it says about the lfCharSet member.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Excellent ............... it worked, .............
character set in old ANSI_CHARSET and i change it to ARABIC_CHARSET
I want have your E-mail, my email is mohammadmot@yahoo.com
I am hardware programmer with vc++ 6.0 .
|
|
|
|
|
Great!
Well, i don't give out my email address that easily, i get enough unwanted mail already. But if you want you can contact me thorough codeproject, i believe that is possible.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hi All,
I have two dialogs(IDD_DIALOG,IDD_DIALOG1).How to hide and show these dialog.
|
|
|
|
|
I assume you have modeless dialogs, in which case simply use ShowWindow[^]. If this doesn't answer your question, please give us more info about your problem.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
I did like this.
this->ShowWindow(SW_HIDE);
CMyDlg *NU = new CMyDlg();
NU->ShowWindow(SW_SHOWNORMAL);
But it showing debug Assertion error.
|
|
|
|
|
I think you either need something like this:
CMyDlg Dlg;
Dlg.DoModal();
or something like this:
CMyDlg *Dlg = new CMyDlg();
Dlg->Create(IDD_DIALOG, NULL);
Dlg->ShowWindow(SW_SHOW);
Of course you need to pay atention at deleting your dialog once you are done with it if you created it with new...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
I dont need to create the dialog again. I need to show the hidden dialog.
Pls help me....
|
|
|
|
|
Ok, to clear out misunderstandings, show me how you created your dialogs. If you created both dialogs then you need to call ShowWindow(SW_SHOW) or ShowWindow(SW_HIDE) on the instances of the classe you already created, not on a new instance.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
AnithaSubramani wrote: But it showing debug Assertion error.
Don't keep us in suspense. What line of what file asserted?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
|
Hello,
I'm new in Visual C++.I want to convert row elements from two dimensional array to one dimensional arrays.I wrote Visual C++ function to do this.This function has only one input parameter.Input parameter is two dimensional array.Firstly I tried to copy first row elements of input two dimensional array to one dimensional array in this function.One dimensional array will have been output parameter of function.But it didn't work.
The code is below:
// Temp is one dimensional array its length is 512
// Input paremeter is two dimensional array its width is 512 ,height is 512
// I want to copy first row elements of input two dimensional array to one dimensional array.
array<double>^ fonksiyon (array<double,2>^dizi )// The function
{ array<double>^ temp=gcnew array<double>(512);
Array::Copy(dizi,temp,512);
return temp;// return one dimesional array
}
Could you please help me ? Best regards...
|
|
|
|