|
Anonymous wrote:
I know you can use _bios_disk()
You can only do this in winodows 9X or lower. Win NT, 2k or XP will not allow this because you cannot access the bios interrupts directly.
John
|
|
|
|
|
Be more specific. What is your goal? As for using the bios and asymbly, that is why we have so many versions of 9.x (direct access without security).
Trust in the code Luke. Yea right!
|
|
|
|
|
Hi there...I'm writing a program that will work at bits/byte level. It will accept a double number as an argument, and then the number will be decomposed in two parts: the high and the low, I'm going to do some operations with them.
I know about the bitwise operators, but Is anyboady know how to make the decomposition
double FUNCTION(double argument)
{
int hx,lx
//MISSING THIS PART!!!!
hx = HIGH_PART(argument);
lx = LOW_PART(argument);
//other operations with hx and lx
//
return(final_result)
}
Eric Manuel Rosales Pena Alfaro
PhD student
Unversity of Essex
Wivenhoe Park
Colchester, CO4 3SQ
Essex, Uk
email: emrosa@essex.ac.uk
tel: +44-01206-87311
|
|
|
|
|
emrosa wrote:
...bits/byte level...double...
Do you perchance talk about DWORD ?
Or do you really mean double , the extended precision floating point type?
In case of DWORD , have a look at the HIWORD and LOWORD macros in MSDN.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Why not use a standra C union:
union Converter
{
{
short low;
short high;
}
double value;
};
Converter x;
x.value = 5.67;
short low = x.low;
short high = x.high;
My uinion syntax may not be correct as I have not sed them for years n years n years....
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
Thanks for the hint...I have already tried that and it works fine.
Thanks again
Eric Manuel Rosales Pena Alfaro
PhD student
Unversity of Essex
Wivenhoe Park
Colchester, CO4 3SQ
Essex, Uk
email: emrosa@essex.ac.uk
tel: +44-01206-87311
|
|
|
|
|
Your kiding me, that actualy worked? Please explane why.
From MSDN:
Type double
Double precision values with double type have 8 bytes. The format is similar to the float format except that it has an 11-bit excess-1023 exponent and a 52-bit mantissa, plus the implied high-order 1 bit. This format gives a range of approximately 1.7E–308 to 1.7E+308 for type double.
Microsoft Specific —>
The double type contains 64 bits: 1 for sign, 11 for the exponent, and 52 for the mantissa. Its range is +/–1.7E308 with at least 15 digits of precision.
END Microsoft Specific
Ok I probubly just broke the law. But I need to know.
|
|
|
|
|
Hello,
in MDI project,i want to hide the main menu (IDR_MAINFRAME) when i press F11 and show the menu when a press F12 , i already try
SetMenu(NULL) to hide it, and it works, but i don't know how to show the menu ?
help please
thx in advance
|
|
|
|
|
CMenu *pMenuOid = SetMenu(NULL);
//............................
//restore it!
SetMenu(pMenuOld);
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
thx
but it don't works, SetMenu(NULL) return a BOOL and not a CMenu.
i try
CMenu *pMenuOid = GetMenu(NULL);
SetMenu(NULL)
and to restore it :
SetMenu(pMenuOid);
but when i restore i have a Error message (Debug Assertion failed)
|
|
|
|
|
Dear all
i will like to use a loop and CString.Find method to find a string from a text file.
Example-----
Object 0:
aaaaaaaaaa
Object 1:
bbbbbbbbbbb
Object 2:
ccccccccccc
Object 3:
dddddddddd
for(int i=0;i<3;i++)
{
xxx.Find("Object [i]:");
}
Can someone tell me how to code the integer part,[i], in Find method.
|
|
|
|
|
With a second CString and CString.Format.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
CString str;
for(int i=0;i<3;i++)
{
str.Format("Object %i",i);
xxx.Find(str);
}
~RaGE();
|
|
|
|
|
Hello all!
Here is some "strange" behaviour of CreateProcess (or winword, I don't know)
I wanted to launch winword from my application and be notified when the user close the session I opened, so I used CreateProcess and WaitForSingleObject .
Here is the code sample from MSDN:
<br />
SECURITY_ATTRIBUTES sec;<br />
sec.bInheritHandle = FALSE;<br />
sec.lpSecurityDescriptor = NULL;<br />
sec.nLength = sizeof(SECURITY_ATTRIBUTES);<br />
<br />
STARTUPINFO si;<br />
::ZeroMemory(&si, sizeof(STARTUPINFO));<br />
si.cb = sizeof(STARTUPINFO);<br />
PROCESS_INFORMATION pi;<br />
<br />
if(::CreateProcess(NULL, <br />
"C:\\Program Files\\Microsoft Office\\Office\\winword.exe / / C:\\STPMesagElec.doc", NULL,NULL, TRUE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi)) <br />
{<br />
WaitForInputIdle(pi.hProcess, 3000);<br />
WaitForSingleObject(pi.hProcess,INFINITE);<br />
}<br />
else {<br />
int err = GetLastError();<br />
::MessageBeep(0);<br />
::MessageBox(NULL, "CreateProcess() failed.\nCheck Path for WinWord.Exe.",<br />
"Error", MB_SETFOREGROUND);<br />
<br />
return;<br />
}<br />
<br />
::CloseHandle(pi.hThread);<br />
::CloseHandle(pi.hProcess);<br />
Now, the result:
- If I use CreateProcess as above, but without the 2 slashes, it works only when there is no other instance of Word already opened; if a session already exists, WaitForSingleObject doesn't block anymore
- If I use CreateProcess with the two slashes, it works just as I need it.
I noticed that with at least one of the slashes, CreateProcess creates a new instance of winword.exe, else it opens a new document in the already existing process.
Also, with other applications (eg Notepad or even Excel), it works fine without the slashes.
Do you think that this is abnormal behaviour?
Why it needs the slashes? (i discovered this by pure luck, it isn't documented anywhere)
Enis Arif
-----------
"I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." (Albert Einstein)
|
|
|
|
|
Winword does check if it is already running. It registers in the ROT as an automation server. If You create a second instance only a new document is created because winword knows about its predecessor.
For the second slash I dont know but this can fool the command line parser of winword so it creates always a new instance regardless of previously existing ones. But there should also be a documented switch there (/automation ???)
|
|
|
|
|
Hi all!
I created a class derived from CStatic (so I can use a specific font, colors, and so on) but I want to associate a callback function when I click on the control (like a norma button).
Can I do this or do I need to derive from CButton instead ??
Thanks
|
|
|
|
|
It must be possible. Search in CodeProject for the CHyperLink calss from Chris Maunder, I think it is an enhanced (and clickable) CStatic.
~RaGE();
|
|
|
|
|
Yes, you can do it, map the BN_CLICKED message for it, but make sure you have set he SS_NOTIFY style in the resources otherwise you will not get it.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
dear all,
how do i insert a newline character in an multiline MFC textfield (CEdit)
i tried \n\r but it shows 2 junk characters in the textfield
|
|
|
|
|
Make sure the edit box has the 'multiline' property checked, and I think it's \r\n.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
From Mike's FAQ[^] :
4.12: How do I create a newline in a multi-line edit control?
Use "\r\n" to create a newline. If you use "\r" or "\n" or even "\n\r" you'll see little blocks in the control.
~RaGE();
|
|
|
|
|
hi,
can someone tell me where to find a file picker component for VC++?
greetz,
willem
[]D [] []D []
|
|
|
|
|
got the solution:
FileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, "Exe Files (*.exe)|*.exe|All Files (*.*)|*.*||", this);
dlg.m_ofn.lpstrTitle = "Select the File";
if(dlg.DoModal() == IDOK)
{
m_strExtractorPath = dlg.GetPathName();
}
[]D [] []D []
|
|
|
|
|
Hi !
I'm not sure that's what you want but you can use the CFileDialog (take a look at the help) from the MFC. You can specify some parameters (load or save file dialog, the file extentions, ...).
|
|
|
|
|
your right... thnx
[]D [] []D []
|
|
|
|