|
Yeah.. I was thinking about that.
Does this command work on NT / 2000 systems?
The reason I didn't go this way was because I don't think it works with NT.
|
|
|
|
|
It works on 2000. I don't have an NT4 system here, though, so I can't say about NT4.
--Mike--
http://home.inreach.com/mdunn/
Is history an illusion caused by the passage of time, or is time an illusion caused by the passage of history?
|
|
|
|
|
Hallo Leute !!
Ich versuche gerade ein program zu machen in dem ich meine Internetzeiten und kosten eintragen kann.Ich verwende dafür ein Dialogfeld der Klasse (CDialog);
In diesem dialogfeld habe ich drei Listboxen (CListBox) eingefügt damit es gegliederter aussieht.
1 in dem der Provider eingezeigt wird (CListBox m_boxprovider)
2 in dem die Zeit eingezeigt wird (CListBox m_boxtime)
3 in dem die kosten angezeigt werden (CListBox m_boxkosten)
soweit geht das auch !
Wenn ich jetzt aber einen eintrag in einer der Listboxen anklicke wird dieser selectiert.
Aber da es ja drei Boxen sind bleiben die dazugehörigen Einträge in den anderen Boxen
unausgewählt.
Ich habe mich gefragt in wie fern es möglich ist eine Ableitung der Klasse CListBox
zu erreichen da wenn bei einer Listbox ein Eintrag ausgewählt wird dieser gleichzeitg auch
bei den beiden anderen ausgewählt wird. Da sie ja alle drei CListBox-en sind müsste der Wert der angibt welcher Eintrag ausgewählt ist ja eigentlich nur gleichgesetz.
Kann mir irgendjemand helfen????
Ich zerbrech mir noch den Kopf bei dieser Aufgabe, denn da ich die Einträge per Auswahl durch den Benutzer löschbar machen will kommt es sicherlich zu Schwierigkeiten bei der Bedienung da man ja jeweils die drei passenden Einträge nacheinanderlöschen muss.
Vergisst man aber beispielweise den Eintrag der Zeit zum schon gelöschten Eintrag Provider
ebenfalls zu löschen so bleibt ein Ungültiger Zeiteintrag bestehen da es für diesen ja keine Provider mehr gibt.
|
|
|
|
|
Or via BabelFish:
Hello of people!! I try even program to make in which I mean Internet times and cost enter kann.Ich use for it a dialog field of the class (DIALOG); In this dialog field I have three cunning boxes (CUNNING BOX) inserted thereby it more arranged look. 1 is in-shown in that the Provider (CUNNING BOX more m_boxprovider) 2 in that the time is in-shown (CUNNING BOX m_boxtime) 3 in that to cost to be displayed (CUNNING BOX m_boxkosten) so far goes also! If I however an entry in one of the cunning ruse click now these am selectiert. But since there is three boxes remains the pertinent entries in the other boxes unausgewaehlt. There I have myself in demand in like far it possible am a derivative of the class CUNNING BOX to achieve if with a cunning ruse an entry am selected these gleichzeitg also with the two different am selected. There they all three CUNNING BOXES are would have the value indicate which entry selected are actually only alike. Can somebody help me???? I zerbrech me still the heading with this function, because since I want to make the entries erasable by selection by the user come it surely to difficulties during the operation one the three suitable entries successively-delete in each case there must. One forgets to likewise delete however for example the entry of the time to the entry Provider already deleted thus remains an invalid time entry existing it for this no more Provider gives there.
I'm not sure which is harder to understand....
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Just for kicks, I'm going to write myself a CCunningBox class now!;)
Accept that some days you are the pigeon and some days the statue.
|
|
|
|
|
You guys should have won the war, about 50 years ago. We'd all be speaking German then, and everyone could understand the crap you're writing here.
--
Aber Ich werde auch Adolf genammt..
|
|
|
|
|
I think I made the language point in a far more polite manner about 90 minutes before your post. No need to be rude about it.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
C'mon, those f***ing German's think they own the whole f***ing world. Speak English, or don't speak at all!
--
Und jetzt kommen die Kamelen
|
|
|
|
|
Is the OnSetFocus a good place to swap the m_pMainWnd if I
have multiple top level windows?
Thank You
|
|
|
|
|
I've created my browser but how modify or delete the contextmenu in my application. I've tried to override the method OnContextMenu but it doesn't work!!
|
|
|
|
|
Does anyone here have any experience with using either or both the Windows Media Encoder SDK and/or the Windows Media Format SDK? If so I hope you can help me answer the following question. Using these SDKs I am able to create a profile, create an encoding session, and run this session, I only have one drawback. I cannot correctly specify the audio codec in the profile. I set the WM_MEDIA_TYPE.subtype parameter to be equal to the GUID of the codec I want to use and cannot properly create a profile. But, when I compare the .prx file this profile was saved to against another .prx file that a profile created using the profile manager (with the same parameters as the profile I created using the SDKs) I have one difference in the audio setup. There is a field named codecdata in the .prx file that differs, even though I have set the same parameters in both profiles (one created with the SDKs does not match up to the one I created with the profile manager). Can anyone help me with this problem? If so I will very much appreciate it! Thanks in advance.
Roger Printy
Software Engineer
TeraNex
Orlando, FL
|
|
|
|
|
Does anyone here have any experience with using either or both the Windows Media Encoder SDK and/or the Windows Media Format SDK? If so I hope you can help me answer the following question. Using these SDKs I am able to create a profile, create an encoding session, and run this session, I only have one drawback. I cannot correctly specify the audio codec in the profile. I set the WM_MEDIA_TYPE.subtype parameter to be equal to the GUID of the codec I want to use and cannot properly create a profile. But, when I compare the .prx file this profile was saved to against another .prx file that a profile created using the profile manager (with the same parameters as the profile I created using the SDKs) I have one difference in the audio setup. There is a field named codecdata in the .prx file that differs, even though I have set the same parameters in both profiles (one created with the SDKs does not match up to the one I created with the profile manager). Can anyone help me with this problem? If so I will very much appreciate it! Thanks in advance.
Roger Printy
Software Engineer
TeraNex
Orlando, FL
|
|
|
|
|
I have a static control.
In this control I want to draw a bitmap first (a compass) and afterwards I
draw the pointer (the pointer indicates which way the wind goes).
I do this in the OnPaint Function of the Class CWindrose (derived from CStatic).
This function looks like this:
void CWindrose::OnPaint()
{
DrawTransparent(...);
DrawPointer(...);
}
So everything works fine.
My problem is the flicker that appears everytime the OnPaint Function is called.
So:
How to call the bitmap to repaint just the pixels which are changed ???????
P.S.:
This is the Drawing function:
EFErr CWindrose::DrawTransparent(CDC *pDC, int x, int y, COLORREF crColour,CBitmap &Bmp)
{
COLORREF crOldBack = pDC->SetBkColor(RGB(255,255,255));
COLORREF crOldText = pDC->SetTextColor(0);
CDC dcImage, dcTrans;
// Create two memory dcs for the image and the mask
dcImage.CreateCompatibleDC(pDC);
dcTrans.CreateCompatibleDC(pDC);
// Select the image into the appropriate dc
CBitmap* pOldBitmapImage = dcImage.SelectObject(&Bmp);
// Create the mask bitmap
CBitmap bitmapTrans;
BITMAP bm1;
Bmp.GetBitmap(&bm1);
int nHeight= bm1.bmHeight;
BITMAP bm2;
Bmp.GetBitmap(&bm2);
int nWidth = bm2.bmWidth;
bitmapTrans.CreateBitmap(nWidth, nHeight, 1, 1, NULL);
// Select the mask bitmap into the appropriate dc
CBitmap* pOldBitmapTrans = dcTrans.SelectObject(&bitmapTrans);
// Build mask based on transparent colour
dcImage.SetBkColor(crColour);
dcTrans.BitBlt(0, 0, nWidth, nHeight, &dcImage, 0, 0, SRCCOPY);
// Do the work - True Mask method - cool if not actual display
pDC->BitBlt(x, y, nWidth, nHeight, &dcImage, 0, 0, SRCINVERT);
pDC->BitBlt(x, y, nWidth, nHeight, &dcTrans, 0, 0, SRCAND);
pDC->BitBlt(x, y, nWidth, nHeight, &dcImage, 0, 0, SRCINVERT);
// Restore settings
dcImage.SelectObject(pOldBitmapImage);
dcTrans.SelectObject(pOldBitmapTrans);
pDC->SetBkColor(crOldBack);
pDC->SetTextColor(crOldText);
RET_JA
}
|
|
|
|
|
you might want to take a look at CDC::GetClipRect. this will tell you the rect you need to update.
also, you might want to override OnDrawBackground, to avoid drawing the background...
-c
|
|
|
|
|
Am I right in thinking your OnPaint calls this function and passes it's DC pointer to it ? Any sort of drawing, especially the transparent drawing ( which involves three BLT's ) should be done to a buffer DC, and that DC copied to the screen in one blt. This will save you a world of hurt. Also, if you call Invalidate with a false parameter, it won't erase the background, saving you another flicker. You can override OnEraseBackground, as has been suggested, but I can't imagine it overly likely that you'll never want the erase the background ? For example, overriding it so it is never called will give you some interesting transparency effects where you can see the dialog underneath. ( before you get too excited, when you MOVE the dialog you can see where it WAS, not where it IS ).
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
hi,
this is my Win32 version you can see that I have extra CreateCompatibleBitmap and extra BitBlt.
Good luck,
Dror
void MyTransparentBlt( HDC hdcDest, int nXDest, int nYDest, int nWidth,
int nHeight, HDC hBmpDC/*, HBITMAP hBitmap*/, int nXSrc, int nYSrc,
COLORREF colorTransparent, HPALETTE hPal)
{
HDC hdcMask = ::CreateCompatibleDC( hdcDest );
HDC hdcTmp = ::CreateCompatibleDC( hdcDest );
HBITMAP bmMask = ::CreateBitmap( nWidth, nHeight, 1, 1, NULL );
HBITMAP hOldMaskBitmap = (HBITMAP)::SelectObject( hdcMask, bmMask );
HBITMAP hTmpBmp = CreateCompatibleBitmap(hdcDest, nWidth, nHeight);
HBITMAP hOldTmpBmp = (HBITMAP)::SelectObject(hdcTmp, hTmpBmp);
::BitBlt(hdcTmp, 0,0,nWidth, nHeight, hBmpDC, nXSrc, nYSrc, SRCCOPY );
::SetBkColor( hdcTmp, colorTransparent );
::SetTextColor( hBmpDC, RGB( 0, 0, 0 ) );
::BitBlt( hdcMask, 0, 0, nWidth, nHeight, hdcTmp, 0, 0, SRCCOPY );
HDC hdcOffScr = ::CreateCompatibleDC(hdcDest);
::SetBkMode(hdcOffScr, TRANSPARENT);
HBITMAP hbmOffScr = ::CreateBitmap(nWidth, nHeight,
(BYTE)GetDeviceCaps(hdcDest, PLANES),
(BYTE)GetDeviceCaps(hdcDest, BITSPIXEL),
NULL);
HBITMAP hbmOldOffScr = (HBITMAP)::SelectObject(hdcOffScr, hbmOffScr);
::BitBlt(hdcOffScr, 0, 0, nWidth, nHeight, hdcDest, nXDest, nYDest, SRCCOPY);
::SetBkColor( hBmpDC, RGB( 0, 0, 0 ) );
::SetTextColor( hBmpDC, RGB( 0xff, 0xff, 0xff ));
COLORREF crOldBackColor = ::GetBkColor( hdcDest );
COLORREF crOldTextColor = ::GetTextColor( hdcDest );
::SetBkColor( hdcOffScr, RGB( 0xff, 0xff, 0xff ) );
::SetTextColor( hdcOffScr, RGB( 0, 0, 0 ) );
::BitBlt( hdcOffScr, 0, 0, nWidth, nHeight, hBmpDC, 0, 0, SRCINVERT );
::BitBlt( hdcOffScr, 0, 0, nWidth, nHeight, hdcMask, 0, 0, SRCAND );
::BitBlt( hdcOffScr, 0, 0, nWidth, nHeight, hBmpDC, 0, 0, SRCINVERT );
::SetBkColor( hdcOffScr, crOldBackColor );
::SetTextColor( hdcOffScr, crOldTextColor );
::SetBkMode(hdcDest, TRANSPARENT);
::BitBlt(hdcDest, nXDest, nYDest, nWidth, nHeight, hdcOffScr, 0, 0, SRCCOPY);
if ( hOldMaskBitmap )
::SelectObject( hdcMask, hOldMaskBitmap );
if ( hbmOldOffScr )
::SelectObject( hdcOffScr, hbmOldOffScr );
if ( hOldTmpBmp )
::SelectObject( hdcTmp, hOldTmpBmp );
::DeleteObject( hTmpBmp );
::DeleteObject( bmMask );
::DeleteObject( hbmOffScr );
::DeleteDC( hdcOffScr );
::DeleteDC( hdcTmp );
::DeleteDC( hdcMask );
}
|
|
|
|
|
I have a static control.
In this control I want to draw a bitmap first (a compass) and afterwards I
draw the pointer (the pointer indicates which way the wind goes).
I do this in the OnPaint Function of the Class CWindrose (derived from CStatic).
This function looks like this:
void CWindrose::OnPaint()
{
DrawTransparent(...);
DrawPointer(...);
}
So everything works fine.
My problem is the flicker that appears everytime the OnPaint Function is called.
So:
How to call the bitmap to repaint just the pixels which are changed ???????
P.S.:
This is the Drawing function:
EFErr CWindrose::DrawTransparent(CDC *pDC, int x, int y, COLORREF crColour,CBitmap &Bmp)
{
COLORREF crOldBack = pDC->SetBkColor(RGB(255,255,255));
COLORREF crOldText = pDC->SetTextColor(0);
CDC dcImage, dcTrans;
// Create two memory dcs for the image and the mask
dcImage.CreateCompatibleDC(pDC);
dcTrans.CreateCompatibleDC(pDC);
// Select the image into the appropriate dc
CBitmap* pOldBitmapImage = dcImage.SelectObject(&Bmp);
// Create the mask bitmap
CBitmap bitmapTrans;
BITMAP bm1;
Bmp.GetBitmap(&bm1);
int nHeight= bm1.bmHeight;
BITMAP bm2;
Bmp.GetBitmap(&bm2);
int nWidth = bm2.bmWidth;
bitmapTrans.CreateBitmap(nWidth, nHeight, 1, 1, NULL);
// Select the mask bitmap into the appropriate dc
CBitmap* pOldBitmapTrans = dcTrans.SelectObject(&bitmapTrans);
// Build mask based on transparent colour
dcImage.SetBkColor(crColour);
dcTrans.BitBlt(0, 0, nWidth, nHeight, &dcImage, 0, 0, SRCCOPY);
// Do the work - True Mask method - cool if not actual display
pDC->BitBlt(x, y, nWidth, nHeight, &dcImage, 0, 0, SRCINVERT);
pDC->BitBlt(x, y, nWidth, nHeight, &dcTrans, 0, 0, SRCAND);
pDC->BitBlt(x, y, nWidth, nHeight, &dcImage, 0, 0, SRCINVERT);
// Restore settings
dcImage.SelectObject(pOldBitmapImage);
dcTrans.SelectObject(pOldBitmapTrans);
pDC->SetBkColor(crOldBack);
pDC->SetTextColor(crOldText);
RET_JA
}
|
|
|
|
|
Hi all,
I currently working on a project where i need to embed at font in a
program, in the resource. The font must not be installed on the
system where the program runs, but only be available to the program when
the program runs.
My question how do i include a font (a true type font) in the resource,
and also how do i load it ? Can it be done ? Or is there another way
of doing this ??
Thanks,
Bo Helleskov/Denmak.
|
|
|
|
|
Did you ever get this working?
Cheers,
swine
[b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.
|
|
|
|
|
How can I create a DC that is incompatible with the display?
Actually, what I really want to do is to always create and
work with 24-Bit images whatever the setting of my display
is. So, if I my monitor is set at 32-Bits. I'd still be
creating 24-bit images.
Right now, I create a DC that is compatible with the display.
Thus, the bitmaps are different depending on the display
properties.
eipangan
|
|
|
|
|
|
Hi, anybody who knows how to get / calculate the cpu-usage in % like the taskmanager of
Win 2000 does ?
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Look at the PERFMON example included with the MSDN
|
|
|
|
|
|
I have a problem.
I have a dialog box and in this dialog box there is a button. If I click this button it will open a new dialog box.
This new dialog box has a progress bar. My problem is, how can I trigger this new dialog box so that the progress bar will work after the dialog box is shown (without any using of other control ie: button, radio button or what ever). I try most of the ( WM_ ) message handler but I still can't found it.
|
|
|
|
|