|
Hi,
Well I know very little about mainframes, and the OS's that make them tick. MSPC Windows Software is Multi User, and with each User Multi Task, and within each Task, Multi threaded. What that means is that when you logon as a User, you find your computer back the same as when you logged off 5 days ago,(even though other people used the terminal in the mean time), You can run MSWord and say MS Excell at the Same Time, and switch between them, and you can keep on editing the letter you are printing on the network printer.
This was no mean achievement by Microsoft. To get an understanding of how this works, and how to insert your own code into this complicated system by writing in ASM, can probably be done, but will take enough time for the OS to change beyond recognition in the time it takes you to learn this, and leave your acquired knowledge redundant.
Doing something like 'Scribble' is definitely the better way to approach your problem, and will give you a better understanding of where to use your asm skills to advantage.
Regards,
Regards,
Bram van Kampen
|
|
|
|
|
If properly used, a Header File contains declarations,etc. It is used to build the compiler's symbol table, and should not generate asm code. (rephrase: If properly Used, a Header file should not generate any code). To See the Code, of say how a structure is laid out in memory, you must declare an object of the type.
e.g.
typedef struct{ int X,char Y[16]}MY_STRUCTURE;
This informs the Compiler that MY_STRUCTURE is the Name of a type, containing an int named X and a Char Array named Y of length 16. All the Compiler does with this is store it in the Symbol table. It also knows that MY_STRUCTURE occupies 20 bytes.
Later when you write say:
MY_STRUCT ms={0};
The Compiler sets aside 20 bytes, Notes the Starting address, and makes a Note in the Symbol Table that ms refers to a 20 byte Datablock at the Starting Address, that the Datablock is laid out as a Structure of type MY_STRUCTURE. Depending on Circumstances, the Compiler may generate code to set the bytes in the block to 0.
Later on again, where you write:
ms.Y[2]='a';
The Compiler looks up ms in the Symbol table, and notes the address where it is stored. It sees that ms is of type MY_STRUCTURE. The compiler parses on, and finds Y. It notes from the symbol table that MY_STRUCTURE has a Member 'Y', which starts at offset 4. It knows from the Symbol Table that Y in this case is a char array, with Element size 1. so, Y[2]is two more bytes into the Structure. All together, it has managed to calculate the address of the Location where you want to store 'a'
As you see, very little asm code is generated for these things. The Less, the better, because that means faster code. Alse, Data objects have very low visibility at asm level. There are no Boundaries, Explanations, Member names etc visible when you look at the memory where data is stored.
When all this looking up fails, you get Compiler errors, such as Undeclared Identifier, Struct XXX has No Member named YYY, etc.
Hope this is helpfull
Bram van Kampen
|
|
|
|
|
In the OnBeginPrinting function of my view class I am displaying a CFontDialog dialog box. I want the default font to be Arial and the default size to be 10. When the dialog box displays, it a shows default size of 62.
Here is the code. These are the first lines in the OnBeginPrinting function.
ASSERT(pDC->GetMapMode() == MM_TEXT);
LOGFONT lf;
::ZeroMemory(&lf, sizeof(LOGFONT));
lf.lfHeight = -MulDiv(10, pDC->GetDeviceCaps(LOGPIXELSY), 72);
lstrcpy(lf.lfFaceName, _T("Arial"));
CFontDialog dlg&lf, CF_PRINTERFONTS, pDC);
if (dlg.DoModal() == IDOK)
{
m_strFont = dlg.GetFaceName();
m_nPointSize = dlg.GetSize() / 10;
}
Why is the dialog displaying the wrong size value?
|
|
|
|
|
Lonnie Johnson wrote: Why is the dialog displaying the wrong size value?
I don't know, but have you tried using values other than 10 to see if a pattern exists?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Here are the results from some other point sizes.
input point size size that appears in the dialog box.
8 50
12 62
14 88
16 100
18 113
20 125
|
|
|
|
|
What is the value returned from GetDeviceCaps()? printers have way more pixels per inch than screens do. What is the value of lfHeight?
|
|
|
|
|
The value returned by pDC->GetDeviceCaps(LOGPIXELSY) is 600.
The computed value for lf.lfHeight when 8 points is used is -67.
The resulting size value in the Select Font dialog is 50.
|
|
|
|
|
|
How to open virtualdub source code with visual c++ 6?
(The source code hasn't dsp or dsw file)
|
|
|
|
|
If there's no project file for your compiler and no .mak file it can convert to a project then you'll just have to make one yourself. Examining the project files it does have, most are xml-ish these days, should give you the basic layout of the code. Make an empty project and start adding source files. It's not an easy job and getting the final few compiler setting right can be maddeningly difficult but it can be done. I did this for a friend with the xvid source a few years ago. It may take a few hours of fiddling around but unless it's an absolute monster project, like glibc or something, you'll get it.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Hello,
i need to split my dialog in two parts, horizontal but with resize option!
I mean like in windows explorer left part are the folders and right is the list control,
and i can resize this area with folders!
I need the same only in horizontal form, is something like this possible for dialog application??
thanks for any information/help!!
termal
|
|
|
|
|
You can do whatever you want with your dialog. Anyway possibly using two windows for the purpose will be simpler.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
Why u are trying a CSplitterWnd in CSingleDocTemplate. I think Splitter Window is best in this case.
thanks
Nitheesh.
Nitheesh George
http://www.thesimpletools.blogspot.com
|
|
|
|
|
Hi,
I am looking for some example code that could get me going with a client/server real time video application.
My application needs:
1. input usb video on the client (right now single usb webcam...eventually 2 cameras)
2. stream video to server where it is displayed in real time (occasional lost frames isn't a problem)
3. send about 25-30 bytes of additional data from client at least 10 times a second (occasional lost data isn't a problem) to also be displayed and/or processed by server
4. send a small amount of data from the server to the client as required, with reasonable certainty of it being received
Does anyone have any C++ example code (preferably full project files) that would get me started? I am using Developer Studio 6.0.
Regards,
Neil
|
|
|
|
|
Would you like us to bring you a cup of water as well?
|
|
|
|
|
Hello All,
I am developing an application for WM 5. This can also be used in WM6.
If the error reporting is enabled and if I invoke the application, gwes.exe error message is displayed. In WM6.1 it gives Application name with the error message.
Is this the problem with OS.?
When I googled, the solution for this is to disable the error reporting.
Can anyone tell me how to solve this using code.?
Regards,
Madyastha.
|
|
|
|
|
Did you try debugging your app? That might give you a clue on what is going on.
Did the error occur while running it on the emulator or on the device? If it is on the device, did it run without a trouble in the emulator?
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Even in emulator also it is not working. As i have problem with WININET API i can't run it on emulator. But before having this class also it was giving the same problem.
My app consists of 3 project. I have run first version of the same application on emulator am getting this error "The MCli can not be opened. Either it is not signed with trusted certificate, or one of its components can not be found. You might need to reinstall or restore this file"
modified on Friday, September 26, 2008 9:37 AM
|
|
|
|
|
Hi All
I have a two class Class A and Class B.I have a public type function sun();in class A.And i want to call function sun() in class B. How can i call it?Plz help me.
Thanks in Advance
|
|
|
|
|
MsmVc wrote: How can i call it?
In the context of a class A object.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
class A
{
public:
void sun()
{
}
};
class B
{
public:
void B::callSun()
{
A a;
a.sun();
}
};
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks all it's working..
Your reply help me
|
|
|
|
|
Is there any way to pass some parameters to DialogBox function in win32 api
Actually I want to pass some values to it . I donot want to them global
INT_PTR DialogBox( HINSTANCE hInstance,
LPCTSTR lpTemplate,
HWND hWndParent,
DLGPROC lpDialogFunc
);
Ashish
|
|
|
|
|
use DialogBoxParam()
Prasann
|
|
|
|
|
Hi all,
i am writing this code
char Label[256]="";
char FS[256]="";
DWORD SerialNumber=0, MaxFileLen=0, FileSysFlag=0;
if (GetVolumeInformation(str,Label,256,&SerialNumber,
&MaxFileLen,&FileSysFlag,
FS,256))
{
Temp.Format(_T("%X"), SerialNumber);
Temp=CString(_T("Serial Number: ")) + Temp.Left(4) +
CString(_T("-")) + Temp.Right(4) + CString(_T("\r\n"));
Result+=Temp;
}
buts its giving a error
error C2664: 'GetVolumeInformationW' : cannot convert parameter 2 from 'char [256]' to 'LPWSTR'
how can i remove this
thanks in advance
|
|
|
|
|