|
This is printed in a file or ? Please be more explicit.
If it is for a file, you can use fprintf and there are some parameters you can play on (for example the number of digits you want to see, the number of 'places' it will take, the alignment,...).
|
|
|
|
|
I want to print through a printer
|
|
|
|
|
like Cedric, i don't really understand your question.
as i understand your thought, it is a printing problem.
in this case, try this :
printf("%.2f", myFloatNumberToPrint);
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
With this your format, it is not worked.
When I write this format strCommand.Format("%.-2f",Amount), it is left justified, but how can I make right justified ?(strCommand is CString so to print with dc.TexTout instruction)
|
|
|
|
|
with this format strCommand.Format("%0.2f",Amount); there are many zero leading that I don't to see it.
What to do ?
|
|
|
|
|
Ig you want to justify it to the right, just add + in front:
mikobi wrote: strCommand.Format("%0.2f",Amount);
strCommand.Format("%+0.2f",Amount);
|
|
|
|
|
One way is to use a mono-spaced font.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
I understand well the source of my problem,
When I use default Font, the numbers are right align, If I create Font : like i do, numbers are not align.
This is how I create my Font
font.CreateFont(-80,0,0,0,FW_NORMAL,FALSE,FALSE,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH|FF_ROMAN,"Times New Roman");
What is mono chrome Font and How to create it
Urgent
|
|
|
|
|
Times New Roman is a proportionally-spaced font. That will not work. You must use a mono-spaced font like Courier.
Also, make sure the font variable does not go out of scope before the control itself does. You might want to make it a member of the control's parent (e.g., the dialog).
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
I am saying about mono spaced font and not mono chrome(it an error on my mind)
how to create it ?
I am waiting
I learn my self
|
|
|
|
|
Hi all,
How can I do to get Hex bytes from the keyboard. For example, I want to enter an address in hex like 0F3FFF05.
|
|
|
|
|
Where do you want to enter your address ? It must be limited to those hexadecimal char only ?
Try to be more explicit because if I had to give an answer to your question it would be: just press the keys you want...
|
|
|
|
|
The four bytes would be stored in a variable
unsigned char Address[3];
|
|
|
|
|
Hello,
If you want to store the string entered, than you would at least need 4 bytes more and 1 extra if you want a terminating NULL character.
Hexadecimal numbers (read bytes) are represented with 2 characters: 0x'F''F' for 255 for example.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
No, I want to store them as a numeric value not ascii.
In fact, my application is reading from the keyboard 4 bytes representing an address which will be sent to a microcontrolleer via the serial port.
|
|
|
|
|
Hi all
I'm currently trying to create a Internet Explorer toolbar in HTML format.
language: c++ / ATL - prg: Visual c++ 6
For the moment, my toolbar object is created and I try to display a HTML page in my toolbar, thanks to an activeX control:
AtlAxWinInit();
ActiveXCtrl=new CAxWindow(m_hWnd);
ActiveXCtrl->CreateControl(L"http://address.of.my.toolbar.html");
That works.
Now, I would like to call a javascript function of my HTML toolbar:
I get the IWebBrowser2 internface of my activeX control:
IWebBrowser2* tbWB;
HRESULT hr = ActiveXCtrl->QueryControl(IID_IWebBrowser2,(void**)&tbWB);
T try to get the IHTMLDocument interface of the browser:
IDispatch* pDisp;
hr = tbWB->get_Document(&pDisp);
but pDisp is null !
have you any idea to resolve this problem?
Maybe another solution than activeX control ?
I really nedd help
thank you !
|
|
|
|
|
That's unusual. I've only on suggestion. After this line:
hr = tbWB->get_Document(&pDisp);
Place a breakpoint. When it is hit, enter the following expression in your watch window:
hr, hr
This should show a text representation of the failure code (assuming failure) - perhaps this will give you a clue.
Steve
|
|
|
|
|
Hi !
well hr return E_OK
but pDisp is null ! any idea ??
|
|
|
|
|
Hi together,
I'm developing an MDI-Application which uses a status bar and a dialog bar. The status bar is at the bottom of the window, the dialog bar is docked to the left side of the window.
My problem is, that the dialog bar goes down to the bottom of the window, i.e. the status bar does not span the whole width of the application window. Does anybody has an idea how I can make it the other way round, so that the dialog bar stops at the status bar?
Thank you for your help,
Marcus.
|
|
|
|
|
Hi world!
My question is very simple:
How to know the windows langage installed on a PC?
I use MFC71 with Visual Studio.NET
Thanks very much for all advice
Hello World!!!
from Raphaël
|
|
|
|
|
there are no real languages installed on a PC.
you install an IDE, which allow you to program with one or one language. then, when you compile the code, it is turned into native language (for the microprocessor) or into an intermediate language like MSIL (for .NET framework) or Byte-Code (for Java Virtual Machine).
all depends on the development environement you're working on, and how it is installed.
for example with Visual Studio .NET 2003, it provides the MFC 7.1 only if you install Visual C++...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
Maybe he was speaking about languages like french, english, ...
|
|
|
|
|
|
|
How do you get share level permissions. Not ntfs level permissions.
I tried NetShareEnum but it returns ACCESS_NONE for all shares may be because i am running the program on an NT level machine
Kelvin Chikomo
|
|
|
|