|
Kevin McFarlane wrote:
Though the base class can still provide an implementation that derived classes can use.
are you sure about pure virtual functions ?
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
Mr.Prakash wrote:
are you sure about pure virtual functions ?
Yes. There's an example somewhere in Scott Meyers's Effective C++.
I don't think a similar thing is possible in Java or C# though.
Kevin
|
|
|
|
|
In what units MsFlexGrid is measured self?
If I ask MsFlexGrid, for CellHeight it return some
not pixel size, about 12-15 times more than pixels.
What is this units and how to convert it pixels?
thanks you
|
|
|
|
|
I'm pretty sure it uses twips.
20 twips = 1 point, 72 points = 1 inch
1440 twips = 1 inch
To convert to pixels, you need to know how many pixels to the inch, after which it's just plugging numbers into a formula
Hint: GetDeviceCaps(hDC, LOGPIXELSX) returns number of pixels per inch width-ways, and most monitors have 'square' pixels.
Steve S
|
|
|
|
|
|
No.
A pixel is a variable sized thing, depending on the resolution of the output device, whereas a point is (or at least, should be) a fixed size, namely 1/72 of an inch.
Hence in 12 point Arial text, the character cell is 1/6 (= 12/72) of an inch in height. (I did a printing course when I was at college - which involved cases of cold metal characters, so I also learned why line spacing is called 'leading', and why you sometimes space characters or words horizontally by distances called either em or en.
Steve S
|
|
|
|
|
How to implement method for the conversion of color's lightness without conversion to HSL and back to RGB?
Best regards,
Eugene Pustovoyt
|
|
|
|
|
I want to test my application under disk full conditions. Is there a good utility that can use up my available disk space?
Todd Smith
|
|
|
|
|
|
|
Windows OS
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
How about SetFilePointer() followed by SetEndOfFile() ?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Trying to get 4723 bytes of an oracle clob using ADO in vc++, when getting the recordset i am getting 4723 bytes but am getting 996 null chars after every good 996 chars.
Problem is occuring on a windows client against an oracle for linux server
Anyone have any clue why the data is getting corrupted via ado
If i use ole/db to get the data everything is fine. However this particular customer requires using ado recordsets
Any help is greatly appreciated
|
|
|
|
|
sounds like it might be a unicode thing ... ur getting "space" for 16bit chars but ur only getting 8bit chars
maybe?
"there is no spoon" biz stuff about me
|
|
|
|
|
Hi,
I have a main window in which I am displaying a bitmap using BitBlt in WM_PAINT.
In this window I have a 3 static controls.
I want to make them transperent ie: only their text appears.
I am using WM_CTLCOLORSTATIC for setting font and text color.
We need to return Brush from the WM_CTLCOLORSTATIC message...
I am using SetBkMode(hDC,TRANSPARENT)in this message and returning HOLLOW_BRUSH
Now in one of this static control I am changing its text using SetWindowText(...) frequently.
The problem is that all the text i m changing is looking all overlapped....
(I know this thing happens when one uses SS_SIMPLE style of static control ... I am not using this style)
what can be the problem.
Can anybody help me with this.
modified 21-Apr-21 21:01pm.
|
|
|
|
|
I just noticed Platform SDK: January 2004 Edition is available on Microsofts website. However, when I go to download it it just shows me the old SDK. Is it not available for download yet? I desperately need to get and even if I pay for it I still have to wait 2 weeks to get the CDs.
Any information?
Thanks
[Update]
I just went to order the CD and all I see available is the order SDK's, the new one is still not there!
[/Update]
|
|
|
|
|
Hai,
I am ving two icon handles, and want to combine them. So that one will be the overlay over the another. I tried with the following code, but it is not displaying properly. Any other solutions?
HICON CAutoDocuFileDlg::CombineIcons(HICON topIcon,HICON bottomIcon)
{// begin CombineIcons
ICONINFO newIcon;
newIcon.fIcon = true;
HDC screenDC = ::GetDC(NULL);
HDC iconDC = CreateCompatibleDC(screenDC);
HDC maskDC = CreateCompatibleDC(screenDC);
newIcon.hbmColor = CreateCompatibleBitmap(screenDC,16,16);
newIcon.hbmMask = CreateCompatibleBitmap(maskDC,16,16);
HGDIOBJ oldIconDC = ::SelectObject(iconDC,newIcon.hbmColor);
HGDIOBJ oldMaskDC = ::SelectObject(maskDC,newIcon.hbmMask);
BitBlt(iconDC,0,0,16,16,NULL,0,0,BLACKNESS);
BitBlt(maskDC,0,0,16,16,NULL,0,0,WHITENESS);
DrawIconEx(iconDC,0,0,topIcon,16,16,NULL,NULL,DI_
IMAGE);
BitBlt(iconDC,0,0,16,16,NULL,0,0,DSTINVERT); //
DrawIconEx(maskDC,0,0,topIcon,16,16,NULL,NULL,DI_
MASK);
DrawIconEx(iconDC,0,0,bottomIcon,16,16,NULL,NULL,
DI_NORMAL);
BitBlt(iconDC,0,0,16,16,NULL,0,0,DSTINVERT);
DrawIconEx(maskDC,0,0,bottomIcon,16,16,NULL,NULL,
DI_MASK);
BitBlt(maskDC,0,0,16,16,NULL,0,0,DSTINVERT);
::SelectObject(iconDC,oldIconDC);
::SelectObject(maskDC,oldMaskDC);
HICON newFileIcon = CreateIconIndirect(&newIcon);
::ReleaseDC(NULL,screenDC);
DeleteDC(maskDC);
DeleteDC(iconDC);
DeleteObject(newIcon.hbmColor);
DeleteObject(newIcon.hbmMask);
DeleteObject(oldIconDC);
DeleteObject(oldMaskDC);
return newFileIcon;
}// end CombineIcons
|
|
|
|
|
if (FAILED (hr = pRs->QueryInterface (__uuidof (IADORecordBinding),
(LPVOID*)&pCirtype)))
_com_issue_error (hr);
if (FAILED (hr = pCirtype->BindToRecordset (&m_tableCirtype)))
_com_issue_error (hr);
|
|
|
|
|
I recently added the .h and .cpp files from this link:
http://www.codeproject.com/combobox/mccombobox.asp
It says in the directions to add the line #include "MultiColumnComboBox.h" in the .cpp file, but then the visual studios won't recognize variables of this type in the .h file. Besides, the demo project on the link actually includes the library in the .h file of the class using it...so I did that. Now I'm getting a linker error for every function call that I try to make with the variables I declare of type CMultiColumnComboBox. The view classes I'm using these variables in are CFormView classes. Any ideas would be appreciated...Thanks a ton!
Douglas A. Wright
dawrigh3@kent.edu
|
|
|
|
|
I can't for the life of me get 2 STATIC controls to use a white background instead of system COLOR_BTNFACE or whatever that color is.
Can someone give me the code required to change 2 named STATIC controls background color to white?
I have tried returning a white brush, but if I test the window handles to see if they match the STATIC controls inside OnCtlColor nothing happens???
I'm lost and getting mad
Any help appreciated
Cheers
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
Try posting the code please may be that will bemore helpfull in debuging.
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
I stole this code form the MSDN article the last poster sent me...I ave no idea where m_brush comes from, but regardless the following ode doesn't work either....
I dunno if it's because I call SetDialogBkColor() in InitInstance or what, but this is pissin me off
HBRUSH hbr = CDragDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if(pWnd->GetDlgCtrlID() == IDC_STATIC_ACCOUNT){
pDC->SetBkMode(TRANSPARENT);
}
return hbr;
Thanks
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
You have to return a hbursh or the pdc settings is ignored,
the m_brush is a member variable of the dialog which is created during its initialization. you wanted to make the background white rite, so create a member variable of CBrush with RGB(255,255,255) and return this brush from the OnCtlColor method.
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
|
I have a memory leak in my Windows GUI program. When I go to my task manager I see the memory usage increasing by about 200k every second. I haven't been able to isolate it completely, but I notice that whenever I minimize the window, the memory usage jumps back to about 1070k and then restarts its slow ascent as it's minimized. Anybody have any idea what's happening? I have an OpenGL child window.
|
|
|
|
|