|
|
how do i change the font size of the editbox?
Regards,
Ram
|
|
|
|
|
CFont *font=new CFont ();
font->CreateFont (30,20,0,0,0,0,1,0,0,0,0,0,0,"Verdana");
m_editbox.SetFont (font);
// m_edit box is the control variable for the edit box
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
you can use like this
<br />
m_Edit.Create(WS_VISIBLE|WS_CHILD,CRect(0,0,100,100),this,1);<br />
<br />
<pre>m_Edit.SetFont(GetFont());</pre> <br />
<br />
<font size="2" color="#99ff66"><hr></font><div style="padding: 2px; text-align: left; color: rgba(255, 255, 255, 1); width: 80px"><font size="2" color="#99ff66">whitesky<br />
</font></div><hr>
|
|
|
|
|
#define MCIWndSeek(hwnd, lPos) (LONG)MCIWndSM(hwnd, MCI_SEEK, 0, (LPARAM)(LONG)(lPos))
thats the def of mciwndseek from vfw.h
MCIWndSeek(m_Video, m_songplace.GetPos());
m_songplace is my sliderctrl but all that does is pause it and using mciwndpause(FALSE); wont unpause it
m_songplace.SetRange(0, MCIWndGetLength(m_Video));
i have that set so i dont know why it dont work.
|
|
|
|
|
Dear all friends
actually i read several times about "call-by-reference" and " this" concepts.but still feel unclear, could you explain to me in detail. thank you.
Li Zhiyuan
21/06/2006
|
|
|
|
|
Hi,
I'm using property sheet in ActiveX control to have different pages(tabs). Since i need to have many number of page i would like to increase the width of the property sheet. How to do it? I'm using following code to add property sheet and multiple pages...
CPropertySheet* m_pSheet;
m_pSheet=new CPropertySheet ("Sample");
m_pSheet->AddPage(&Sample1);
m_pSheet->AddPage(&Sample2);
m_pSheet->AddPage(&Sample3);
m_pSheet->AddPage(&Sample4);
m_pSheet->AddPage(&Sample5);
m_pSheet->Create (this,WS_CHILD,NULL);
m_pSheet->SetWindowPos (NULL,0,0,500,500,NULL);
m_pSheet->ShowWindow(TRUE);
|
|
|
|
|
IMHO,
You need to go to the resource editor and increase the size of the dialogs in the resource view. That's all.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
sivaprakashshanmugam wrote: m_pSheet->SetWindowPos (NULL,0,0,500,500,NULL);
call setwindowpos like this...
m_pSheet->SetWindowPos( NULL,0,0,500,500,SWP_NOMOVE|SWP_NOZORDER );
this will only increase the width of the sheet
nave
|
|
|
|
|
Thanks it's doing good...
|
|
|
|
|
hello...
i am current planning to develop a RGP game. I would like to ask if you have some developing tools or sites that could help me develop my game. I am planning to use CGI graphics.
|
|
|
|
|
Just do a "game development" search on google and you should be able to find alot of useful sites.
|
|
|
|
|
moodsey211 wrote: I would like to ask if you have some developing tools or sites that could help me develop my game.
http://www.gamasutra.com/[^]
http://nehe.gamedev.net/[^]
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Excellent site, NeHe, although gamedev took the site over and haven't done much with it since. Still some excellent tutorials for learning OpenGl and the forums are also quite helpful.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I would like to remove the border from the MDI client, which I have already subclassed to show MDI tabs.
I've also removed the WS_BORDER and WS_EX_CLIENTEDGE style which works fine until a MDI child window is created, because then the border is back
I've looked into the MFC sources, the WS_EX_CLIENTEDGE style is set or removed in several methods. Can I catch the style change or do I have to overload OnNcPaint to remove the style every time?
CMDIChildWnd::OnWindowPosChanging calls CMDIChildWnd::UpdateClientEdge which sets the style, so removing the Style in OnNcPaint causes extreme flickering.
Thanks
|
|
|
|
|
I have a sample project which I put together. Its a CFormView
with 3-screens of information. The user can click Back and Next
to flick through the screens.
I want to be able to save the data typed in using CDocument
commands, but for the life of me, I cant get it to actually
save and retrieve.
Is there any chance I can email someone this sample project
and you can look at it and kinda of guide me through how to
setup these save/open commands for this project? If I can
get this smaller sample project to work correctly, then I
can get my other project to work (which has a few more screens
and more edit boxes).
My email is brinasas@yahoo.com
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
Did you ever run through the old "Scribble" tutorial or anything like it?
Scribble[^]
|
|
|
|
|
Yup!
No progress.
Can I email you the sample project I have? I can make it work
if its 1-screen and I can make it work if my variables are all
global, but I cant figure it out for the current project.
Please, please, please, please....
|
|
|
|
|
DanYELL wrote: Can I email you the sample project I have?
I cannot commit to the potential effort that might be involved in solving your problem(s). It is not at all clear what they might be. It seems very possible that you have some design issues and that you do not yet understand the MFC Document/View framework.
led mike
|
|
|
|
|
Hi fellows
I'm developing a app that creates a graphics with some points.
My problem is that when I resize the window the figure doesn't change their size too. Like you'll see in the code below I'm getting the LOWORD and the HIWORD on the WM_SIZE message and in the WM_PAINT message I sum the values in the points that I define in a POINT array. Fellows, what's going on? What this guy doesn't resized?
Thanks a lot
<br />
<br />
case WM_SIZE:<br />
{<br />
ixClient = LOWORD(lParam);<br />
iyClient = HIWORD(lParam);<br />
break;<br />
}<br />
case WM_PAINT:<br />
{<br />
int iTot = 30;<br />
POINT tmpPoint;<br />
POINT points2[] = {50, 50, 200, 200, 100, 100, 120, 120, 20, 20};<br />
LOGPEN LogPen;<br />
tmpPoint.x = 2;<br />
LogPen.lopnStyle = PS_SOLID;<br />
LogPen.lopnWidth = tmpPoint;<br />
LogPen.lopnColor = 0x00FF0000;<br />
HPEN thePen = CreatePenIndirect(&LogPen);<br />
hdc = GetDC(hwnd);<br />
SelectObject(hdc, thePen);<br />
int iSize = sizeof(points2)/sizeof(POINT);<br />
for(int i = 0 ; i < iSize ; i++)<br />
{<br />
points2[i].x = i * (ixClient+points2[i].x)/iSize;<br />
points2[i].y = i * (iyClient+points2[i].y)/iSize;<br />
}<br />
Polyline(hdc, points2, (sizeof(points2)/sizeof(POINT))); <br />
break;<br />
}<br />
|
|
|
|
|
A couple things:
1) Create a temporary POINT buffer to use for the Polyline call.
2) Use floating points (or doubles) for increased precision in the math. You can cast them back to integers after your done manipulating them, but doing the calculations as doubles will allow for a more accurate adjustment.
int iSize = sizeof(points2)/sizeof(POINT);<br />
POINT* pPoints = new POINT[iSize];<br />
for(int i = 0 ; i < iSize ; i++)<br />
{<br />
double tempX = (double)i * ((double)ixClient + (double)points2[i].x)/(double)iSize;<br />
double tempY = (double)i * ((double)iyClient + (double)points2[i].y)/(double)iSize;<br />
(*pPoints)[i].x = (int)tempX;<br />
(*pPoints)[i].y = (int)tempY;<br />
}<br />
Polyline(hdc, pPoints, iSize);<br />
delete [] pPoints;
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Try adding InvalidateRect() to your WM_SIZE handler. Also you shouldn't be getting your dc in WM_PAINT using GetDC(), anyway calls to GetDC() must be matched with a ReleaseDC(). Use BeginPaint() / EndPaint(). When selecting objects into a DC you should store the object selected out so you can select it back again. Also if you create a pen, you need to destroy it with DeleteObject().
|
|
|
|
|
I have a VC++/MFC application that I am converting from VS6 to VS2005. After much trudgery I have it compiling but the linking is failing with.
1>CVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:24029, language:0x0409
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
I have two resource files in the project: the default app.rc and an additional shared.rc (shared with other applications). I #include the shared.rc from within the app.rc. This all works fine under VS6.
I am also using Stingray Grid and Toolkit. These .rc files are not explicitly part of the project but are also include through the resource includes (in app.rc).
I know I don't actually have duplicate resources so I figure it must be some little configuration issue causing this. The dialog (24029) is in shared.rc and it's not the problem. If I reorder the dialogs in the resource it'll error on whichever is first.
I have done some renumbering to insure I'm not stepping on other resource IDs with no luck. Originally I was getting the same error but for "type:CURSOR, name: 3". I only have 2 cursors in my project and they definitely don't have 3 as their resource ID.
Help? Thank you much.
Eric Margheim
|
|
|
|
|
Hi all,
how can I create plugins for media player?
And how to know where the slider is?(time)
Please help me,
If there is any helpful article for creating pluging I would like to know.
thanks.
Every new thing you learn,Gives you a new personality.
|
|
|
|
|