|
They both write a byte 0xAD to the port 0x64
|
|
|
|
|
Right
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
Hello, Sir:
Thanks your reply. Now i have some about that. But i have some trouble with the FPU. I have studyed IA-32 Intel® Architecture Software Developer’s Manual, and knew some about FPU. I need test CPU FPU function, it include "FPU Exception Test", "FPU Control Register Test", "FPU Tag word Register Test" and "FPU Calculation Test". And I don't how can test those really. Do you know how to "test" such FPU fuction. Do you have a example about those, or give me some advice? I am helpless, waiting...
|
|
|
|
|
Sorry, I don't know.
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Hello,
I'm developing a program that does some intensive computation(arithmetic coding) on a block of data, say 2MB in size. It tooks longer time to finish. If I implement the same computation using 2 threads and split the input into two equal halves(1MB), one for each thread, does the computation time decrease? please help me.
Is there any way to speed up the computation using threads?
I have only one processor, P4 1.7 GHz non HT. I'm using windows 2000.
The computation is directly proportional to the size of data(i.e if it took 5 seconds for 3MB input, then it will take 10 seconds for 6MB input data).
regards
Ramesh
|
|
|
|
|
No, on a single-processor system, the context switching overhead will most likely hurt your performance, not improve it. However, being able to split the data and parallelize the process as an option is a nice feature for those who do have multi-processor systems.
- Mike
|
|
|
|
|
On a single processor it would, if anything, be a little slower because the OS has to switch between threads (though not noticably). If the intensive computation is affecting things like clicking a button in the app, and general app response time then it would be worth sticking the whole process in its own thread and let the apps own thread just deal with message processing, thats probably the best solution (in effect there would be two threads anyway, one for your exe thats instantiated upon load, and the other is your 'worker' thread).
|
|
|
|
|
Hi everyone
When I use Visual C++ 6 to build a Doc/View application the final application will have an icon it its title bar. This icon is 16 x 16 pixel and looks exactly as the corresponding 16 x 16 pixel version of the icon I can edit in the resource editor.
On the other side when I build a dialog based application it will have an icon in its title bar, too, it is 16 x 16 pixel in size, too, but it does not look the same as the icon I can edit in the resource editor. I guess it is "shrunken" from the 32 x 32 pixel version of the icon in the resource editor, nevertheless it is not what I want because this "shrunken" icon looks distorted.
A screenshot demonstrating this behaviour:
http://www.teeteehaa.de/pictures/applicationicon.gif
Can anbody explain me the reason for this and how to prevent it?
Thanks,
Matthias "T.T.H." Grobe
|
|
|
|
|
I'm guessing here, but its probably a subtle change microsoft made to distinguish MFC dialogs from MFC apps. You could just use the dialog editor to copy the icon you want and paste it into the dialog project? Hope this helps.
|
|
|
|
|
It may be the 16x16 vs. 32x32 thing that's ailing you.
|
|
|
|
|
This is because CWinApp::LoadIcon will only load the large 32 x 32 pixel icon, and when you call CWnd::SetIcon(m_hIcon, FALSE), the SetIcon() function will shrink the 32 x 32 icon to 16 x 16. The fix is to add another icon member to your dialog class to hold the small icon, use LoadImage() to load it, and set that as your small icon
class CMyDialog : public CDialog
{
protected:
HICON m_hIcon;
HICON m_hSmallIcon;
...
};
CMyDialog::CMyDialog(...
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
m_hSmallIcon = (HICON)LoadImage(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDR_MAINFRAME),
IMAGE_ICON,
16, 16,
LR_DEFAULTCOLOR);
...
}
BOOL CMyDialog::OnInitDialog()
{
...
SetIcon(m_hIcon, TRUE);
SetIcon(m_hSmallIcon, FALSE);
...
}
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Thank you very much for the precise answer, this exactly solved my problem!
T.T.H. - *happy*
|
|
|
|
|
Hi there
i have an SDI spplication, and from one of the menu options i call a dialog, which
then calls another dialog.
on the final dialog there is a button which will allow you to exit the program
does ne1 know what code i should be puting in when this button is clicked ?
thanks
si
|
|
|
|
|
Have a look at the ExitProcess Windows API function.
Hope that helps
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
Here is inserted block:
exit, _exit
Terminate the calling process after cleanup (exit) or immediately (_exit).
void exit( int status );
void _exit( int status );
Function Required Header Compatibility
exit <process.h> or <stdlib.h> ANSI, Win 95, Win NT
_exit <process.h> or <stdlib.h> Win 95, Win NT
PS. But it's better to close and clear your program and exit.
|
|
|
|
|
PostQuitMessage()
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 have a property sheet with 3 pages in it, i need to disabel the second page....how do i do that?
thanks in advanced,
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
You can disabled button "Next" to call next sheat? (If I understand what you really want).
|
|
|
|
|
Hi, thanks for reply
i need to disable not the buttons of the sheet but one of the tab pages....can you help?
thanks again
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hi,
I didn't test it, but in your property page there is a method OnSetActive you may override.
Buy returning false instead of true you tell the system that this page cannot be activated.
Probably this works.
G. Steudtel
|
|
|
|
|
Thanks man!
that was exactly what i needed! but i have an other question if you could answer for me, the color of the text of the disabled page remains black, how do i change it to gray???
(maybe i can play with the method OnSetFont() ???? )
thanks again
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
The way my company's application did it was to remove the text from the tab. That way the tab is not clickable (because of the OnSetActive() code) and it has no text. It's very effective.
|
|
|
|
|
Thanks again for the reply....
how did they clear the text?
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
When the tab is to be disabled:
TC_ITEM ti = {0};
char szText[2] = "";
ti.mask = TCIF_TEXT;
ti.pszText = szText;
ti.cchTextMax = 1;
VERIFY(pTab->SetItem(nPage, &ti));
|
|
|
|
|
ahh using the property sheet tab control....
well, the trouble is that i don't use MFC, i am writing a MMC (microsoft managment consol) application and i use the property sheet call back interface, so there is no tab control.... can u help here?
thanks again
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|