|
I'm a beginner.I'm working MFC and use Static Control to show texts.But the frame of Static is too small, the texts are so much to show in the frame .
Have everybody anyway to show all texts without change the frame size and Font size ? . I uesed Vertical Scroll Bar but I don't know how to do it.
Please Help me ! thanks
|
|
|
|
|
if you want to show a text without change size and font i suggest use form editbox
|
|
|
|
|
Yes...
As WhiteSky mentioned you can use edit box after disabling for this.
Here you can also find the vertical and horizontal scrol bars
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
The first , I tried with Edit Box , but I want to use Font, colour and Font size . Because i 'm a beginner so I don't known to change Font , colour and Font size in Edit box .
If you know how to , Please show to me ! thanks
|
|
|
|
|
To change font
Here am giving a font of Arial 14 to edit box.
1) add member variable
CFont m_FontArial14;
2) Create font for the edit box in the constructor of the class
m_FontArial14.CreatePointFont( 140, "Arial" );
3) Then call SetFont in OnInitDialog()
GetDlgItem( IDC_EDIT )->SetFont( &m_FontArial14 );
( where IDC_EDIT is the ID of the edit control )
To change color
it is better to override OnCtlColor()
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
for change color see WM_CTLCOLOREDIT or WM_CTLCOLOR for change font you can use m_Edit.SetFont(GetFont())
|
|
|
|
|
Thanhnamdo wrote: I uesed Vertical Scroll Bar but I don't know how to do it.
In static control????
I think u need to change font or frame size of static control to do it.
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
I found out that _argc is wrong to calculate the count of parameters.
Once there is redirection parameter that looks like '>error.txt'
using redirection symbol '>'
the _argc is wrong, why?
|
|
|
|
|
|
Really? Could you give me advice?
|
|
|
|
|
|
Hello everyone!
Can anyone help me here? I really don't see why this code doesn't work...
class Game<br />
{<br />
Graphics *gfx;<br />
<br />
int player_x, player_y, car1_x, car1_y;<br />
<br />
int gUpKey, gDnKey, gLtKey, gRtKey;<br />
<br />
bool inCar;<br />
<br />
public:<br />
Game(void);<br />
~Game(void);<br />
bool Respond();
void PlacePlayer(int x, int y);
int Init(Graphics *gfx);
};
I get the following errors:
c:\Incoming\War Game\Game.h(7): error C2143: syntax error : missing ';' before '*'<br />
c:\Incoming\War Game\Game.h(7): error C2501: 'Game::Graphics' : missing storage-class or type specifiers<br />
c:\Incoming\War Game\Game.h(7): error C2501: 'Game::gfx' : missing storage-class or type specifiers<br />
c:\Incoming\War Game\Game.h(24): error C2061: syntax error : identifier 'Graphics'<br />
Why is that? Thanks!
BTW: Line 7 is the 3rd one, and 24 is the one before the last one...
-- modified at 23:14 Monday 24th July, 2006
|
|
|
|
|
Kixdemp wrote: and I'm starting to think it's the crappy VC++ 2003 I'm using...
Nope, its not. You have to have Graphics defined or atleast a forward reference before this statement otherwise this statement will fail on all cpp compilers (at least the ones I know of)...
Place this statement before class Game:
class Graphics;
John Last modified: Wednesday, July 26, 2006 4:55:14 PM --
|
|
|
|
|
You might start off by telling it what "Graphics" is. It doesn't have a clue until you point it to the library and headers if that is refering to GDI+
|
|
|
|
|
|
The Graphics class is central to GDI+ the same way CDC is to MFC graphics output so it was the natural choice for a guess.
Glad to hear you got with a forward declaration.
|
|
|
|
|
|
Hey all,
How dO I decide waht is the timer identifier(the first parameter) number in SetTimer function?
It should be a nonzero number, but is there any condition that determines this number?
or can i give any number from 1 to anything?
Thanks,
|
|
|
|
|
It can be anything you want. Typically, you would define or declare a constant symbol for it somewhere. This is your nIDEvent that you use during OnTimer events to figure out which timer is going off and when you KillTimer().
|
|
|
|
|
Hi,
I need to be able to read & write to a PCI Digital Input/Output card, and i'm going to be using VC++ 6.0/MFC on a WinXP machine to accomplish this. If I am correct, I believe Windows will not allow direct communication to an I/O port...The manual that came with the card (no software drivers) had some programming examples in which 'outportb' & 'inportb' function calls were used to write and read data respectively...but unfortunately these functions are not recognized by vc++.
Could someone tell me if I am missing any library files that I need to include?
I apperciate the help....Thanks
|
|
|
|
|
In any current version of windows (2K,XP,...) this is a statement that is not allowed by the operating system. There are two ways around this either write a device driver or use one of the open port device drivers that are available on the net. Sorry, I can not think of a link right now.
John
|
|
|
|
|
As John Drescher suggested, use a "port access" library.
I have personally used inpOut32.dll http://www.logix4u.net/inpout32.htm[^] - works like a dream.
The only problem I remember is that the documentation was not clear regarding data size. I think that it does 8-bit inputs and outputs, so if you want to read a 16-bit value, you have to read from an odd port and from an even port, shift one byte by 8, and add, etc. And if you want to write a 16-bit value, you have to split it to two 8-bit outport32 calls.
For example, if you want to read a 16-bit status from port 0x302:
usStatusTemp1 = inp32(0x302);
usStatusTemp2 = inp32(0x303);
usStatusWord = usStatusTemp1 + (usStatusTemp2<<8);
|
|
|
|
|
I have inherited some C++ code compiled under VS 2005. I would like to generate a list of the external dependencies now that the dev environment no longer lists them. Are there any tools/ addins that can do this? Thanks.
|
|
|
|
|
|
I would like to plot a basic collection of data into a 2d line graph.
I am writing the rest of my program in Visual C++.NET as an MFC app so I would like to stick with a solution that will utilize this.
I would like to make something simple like this (only add labels for each axis):
Click for Picture
anyone have any ideas???
-- modified at 16:46 Monday 24th July, 2006
|
|
|
|