|
You should look for the EN_CHANGE notification. The ENM_CHANGE flag is used in conjunction with EM_SETEVENTMASK message to let the rich edit control you want to receive EN_CHANGE notifications.
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
Hi,
Where can I find some doc or some link to a site, where explains some good thecnics about GUI "database" app design ( for desktop applications) ?
Thanks in advance
Braulio
Ps.: I want to use Disconnected dataset in my apps.
|
|
|
|
|
Given a Line (CPoint from, CPoint to), how to determine if a CPoint p belongs to the line?
Thanks in advance for any lights.
[]s
Crercio O. Silva / DBTools Development
http://www.dbtools.com.br
|
|
|
|
|
|
If I have a modal dlg, and post a message to the parent, can it send me back the results (by passing in the data through a member function of my dlg in the ONMessageHandler), so that I can communicate back and forth and display info returned from the parent when I ask for it? Then when I am all done, I dismiss it....I would test it out but it needs a lot of machinery to put into place and I was wondering if its obvious that this will/wont work....?
Appreciate your help,
ns
|
|
|
|
|
ns wrote:
can it send me back the results (by passing in the data through a member function of my dlg
yes. just be careful of infinite loops (where posting a message causes an action that causes the same message to be posted again).
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
MAny thanks. I plan to display a sequence of images in the cDialog which are sent from the parent in response to the users request from the Cdialog. For some reason I had thought that since it was modal it couldnt be dynamically refreshed unless it was dismissed and reModal-ed with the new info....
Appreciate your help,
ns
|
|
|
|
|
If you want to maintain a synchronous conversation, use SendMessage() instead of PostMessage() .
Yes, I'm back (after an 8 week medical emergency).
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Good point. Thanks.
I was wondering where you went to! Hope you're feeling better. Take care!!
Appreciate your help,
ns
|
|
|
|
|
I'm fine. Actually my dad fell seriously ill, but he's much better now.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Glad to hear he's okay. Last night at 3 AM I trashed my XP at home --- was installing SP1 XP and it froze so I pulled the plug. That was the end of it. I've had it with XP (it doesnt like to run unattended all week long). I am reinstalling win2K today. Lost nothing too crucial since it was new and my works all at the office. So my half day today is going to be spent messing with that stuff..and all the software it needs. Aaaaaragh!
Rewrite #2 of my project at work.... quite fun. Whats happening with the deal you had going in Dec?
see ya
Appreciate your help,
ns
|
|
|
|
|
Thanks for the heads up re: XP. I've been very happy with Win2K so far and plan to use XP mainly for testing my apps to ensure they run fine on all supported platforms.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thias might be a stupid question, but how do I change the text of the title bar?
The title bar is automatically filled with the application name given to the AppWizard. What when I want to change the application name from "TestApp" to "LevelEdit"?
Greets,
Jakob Bysewski
---------------------
Build a system that even a fool can use, and only a fool will use it.
|
|
|
|
|
|
Ahem, sorry. I found the answer...
*peng*
Build a system that even a fool can use, and only a fool will use it.
|
|
|
|
|
simple
in Your OnInitDialog()
just place
this->SetWindowText("Whatever You want to appear on Title");
enjoy -
CodeTheDreams();
|
|
|
|
|
Another solution is UpdateFrameTitleForDocument().
Kuphryn
|
|
|
|
|
I am searching for an easy way to query the amount of memory on an installed graphic card under windows.
Is there an easy way to do this, e.g. using Windows API?
I couldn't find any information about this.
Thanks in advance.
|
|
|
|
|
I don't think that there is a simple API function to get the size of the video memory. But the way to get the size of the video memory with DirectDraw is not very hard.
Try the IDirectDraw::GetCaps function!
HRESULT GetCaps(
LPDIRECTDRAW lpDD,
LPDDCAPS lpDDDriverCaps,
LPDDCAPS lpDDHELCap
);
You can found the size in the DDCAPS structur:
typedef struct _DDCAPS {
DWORD dwSize;
DWORD dwCaps;
DWORD dwCaps2;
DWORD dwCKeyCaps;
DWORD dwFXCaps;
DWORD dwFXAlphaCaps;
DWORD dwPalCaps;
DWORD dwSVCaps;
DWORD dwAlphaBltConstBitDepths;
DWORD dwAlphaBltPixelBitDepths;
DWORD dwAlphaBltSurfaceBitDepths;
DWORD dwAlphaOverlayConstBitDepths;
DWORD dwAlphaOverlayPixelBitDepths;
DWORD dwAlphaOverlaySurfaceBitDepths;
DWORD dwZBufferBitDepths;
DWORD dwVidMemTotal;
DWORD dwVidMemFree;
DWORD dwMaxVisibleOverlays;
DWORD dwCurrVisibleOverlays;
DWORD dwNumFourCCCodes;
DWORD dwAlignBoundarySrc;
DWORD dwAlignSizeSrc;
DWORD dwAlignBoundaryDest;
DWORD dwAlignSizeDest;
DWORD dwAlignStrideAlign;
DWORD dwRops[DD_ROP_SPACE];
DWORD dwReservedCaps;
DWORD dwMinOverlayStretch;
DWORD dwMaxOverlayStretch;
DWORD dwMinLiveVideoStretch;
DWORD dwMaxLiveVideoStretch;
DWORD dwMinHwCodecStretch;
DWORD dwMaxHwCodecStretch;
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwReserved3;
DWORD dwSVBCaps;
DWORD dwSVBCKeyCaps;
DWORD dwSVBFXCaps;
DWORD dwSVBRops[DD_ROP_SPACE];
DWORD dwVSBCaps;
DWORD dwVSBCKeyCaps;
DWORD dwVSBFXCaps;
DWORD dwVSBRops[DD_ROP_SPACE];
DWORD dwSSBCaps;
DWORD dwSSBCKeyCaps;
DWORD dwSSBCFXCaps;
DWORD dwSSBRops[DD_ROP_SPACE];
DWORD dwMaxVideoPorts;
DWORD dwCurrVideoPorts;
DWORD dwSVBCaps2;
DWORD dwNLVBCaps;
DWORD dwNLVBCaps2;
DWORD dwNLVBCKeyCaps;
DWORD dwNLVBFXCaps;
DWORD dwNLVBRops[DD_ROP_SPACE];
DDSCAPS2 ddsCaps;
} DDCAPS,FAR* LPDDCAPS;
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Thanks for the answer. I thought that there is a way using DirectX but I wanted to avoid it. But since I did not find any other ways I think I must use it.
|
|
|
|
|
Hi all
How do you draw an ellipse using c++ given that you've got all the coefficients (ie. a,b,c,d,e & f). The ellipse() function that i know only accepts the vertices of the rectangle (as the parameters) in which the ellipse should be drawn. I need it for my final year project at uni. Thanks a lot
|
|
|
|
|
Well,
the first aproach might be to calculate the enclosing rectangle of your ellipse function by using the first degration( german:Ableitung) in x and y. for finding the minimum and maximum coordinates. But then you will find out, that the ellipse function will only draw parallel to the x- and y-axis.
The only way to draw an arbitrary ellipse is to use the path functions with transform parameters/matrices. These graphic functions are only supported in Windows NT/2000. With XP I can't tell. They are definitly not supported in Win95/98/ME.
Even dwarves started small.
|
|
|
|
|
how can i use this path function?can you explain a little bit more please? i'm using win2k.
|
|
|
|
|
Okay,
here is the code. I took it from a private project, I developed in 1996. It took me quite a while to find it.
void CGraphEllipse::zeichne(CDC* pDC)
{ if( m_listAbschnitte.IsEmpty() ) return;
if( m_a == 0.0 ) return;
CPen *pOldPen = pDC->SelectObject(&m_penStift);
CBrush *pOldBrush = pDC->SelectObject(&m_brPinsel);
XFORM xfMatrix;
xfMatrix.eM11 = 1.0;
xfMatrix.eM12 = 0.0;
xfMatrix.eM21 = 0.0;
xfMatrix.eM22 = 1.0;
xfMatrix.eDx = 0.0;
xfMatrix.eDy = 0.0;
double dSinPhi = 0;
double dCosPhi = 1;
double dPhi = 0;
if( m_c != m_a ) dPhi = atan2(2*m_b,(m_a-m_c))/2.0;
dSinPhi = sin(dPhi);
dCosPhi = cos(dPhi);
xfMatrix.eM11 = dCosPhi;
xfMatrix.eM12 = dSinPhi;
xfMatrix.eM21 = -dSinPhi;
xfMatrix.eM22 = dCosPhi;
xfMatrix.eDx = m_ptZiehZentrum.x;
xfMatrix.eDy = m_ptZiehZentrum.y;
SetGraphicsMode(pDC->m_hDC,GM_ADVANCED);
pDC->BeginPath();
SetWorldTransform(pDC->m_hDC,&xfMatrix);
pDC->Ellipse(-(int)m_dR1,-(int)m_dR2,(int)m_dR1,(int)m_dR2);
pDC->EndPath();
if( m_bGeschlossen )
{ if( m_bOpaque ) pDC->StrokeAndFillPath();
else pDC->StrokePath();
}
else pDC->StrokePath();
pDC->SelectObject(pOldPen);
pDC->SelectObject(pOldBrush);
ModifyWorldTransform(pDC->m_hDC,NULL,MWT_IDENTITY);
SetGraphicsMode(pDC->m_hDC,GM_COMPATIBLE);
}
This function was used to draw a arbitrary rotated ellipse.
Of course, you have to do your own calculations for the centerpoints and that stuff.
The point of interest is the calculation of the transformation matrix. But this you should have alredy done if you have the coeffx of your ellipse.
Hope this helps
See also help for XFORM and CDC Path functions in your VC-Compiler
G. Steudtel
Even dwarves started small.
|
|
|
|
|
Well,
the first aproach might be to calculate the enclosing rectangle of your ellipse function by using the first degration( german:Ableitung) in x and y. for finding the minimum and maximum coordinates. But then you will find out, that the ellipse function will only draw parallel to the x- and y-axis.
The only way to draw an arbitrary ellipse is to use the path functions with transform parameters/matrices. These graphic functions are only supported in Windows NT/2000. With XP I can't tell. They are definitly not supported in Win95/98/ME.
G. Steudtel
Even dwarves started small.
|
|
|
|