|
Ok, this has been bugging me for months, and i'm getting sick of it.
I have several dialog templates with icon controls on them. These are print dialogs, and the icons are used for the collation indicator (you know, little overlapping pages...), so they are not a standard size; i check Center Image to ensure the image is not stretched. By holding down the alt key, i can resize the control to be large enough to display the icon correctly, however each time i open the template for editing, it resets to 32x32, and i have to resize it again; more than once i've been in a hurry and forgot to do this. If i assign an icon to the control initially, it is compressed into 32x32 on load, and even if the control is resized, it never looks right
So, is there any way, in VS6, to keep the dialog editor from resizing an icon control automatically?
Thanks!
farewell goodnight last one out turn out the lights Smashing Pumpkins, Tales of a Scorched Earth
|
|
|
|
|
does anyone know how to display line numbers . . . I couldn't find anything in the help menus . . .
thanks,
tim
---------------------------------------
Tim Booher
|
|
|
|
|
Are you referring to the __LINE__ macro?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
The current line is displayed on the status bar, i don't think there's a way to display them on each line though (if that's what you were asking).
farewell goodnight last one out turn out the lights Smashing Pumpkins, Tales of a Scorched Earth
|
|
|
|
|
I've seen some addin editors that will do it.
Good Luck,
Bill
|
|
|
|
|
Has anyone tried to write an application that uses the performance counters in Windows NT, 2k or xp? I am interested in doing some network monitoring on remote nodes. I found some information on MSDN but no samples.. Does anyone have any sample code of how to use these counters?
Thanks,
Rob Jones
|
|
|
|
|
|
Thanks Tomasz I'll take a look at that.
Rob
|
|
|
|
|
Do you know which function fills rect faster ?
e.g.:
CPaint dc(this);
CRect rect;
GetClientRect(rect);
// a)
dc.FillSolidRect(&rect,RGB(255,0,0));
// b)
CBrush brush(RGB(255,0,0));
CBrush * pOld = dc.SelectObject(&brush);
dc.PalBlt(0,0,rect.Width(),rect.Height(),PATCOPY);
dc.SelectObject(pOld);
Wiizi
|
|
|
|
|
If you look into MFC sources, you'll find that FillSolidRect internally calls ::ExtTextOut. This is probably speed optimization, so chances are that FillSolidRect may be faster.
I don't believe that difference will be visible when you just want to paint client rectangle. This could become significant with thousands of rects.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
If you look into MFC sources, you'll find that FillSolidRect internally calls ::ExtTextOut. This is probably speed optimization, so chances are that FillSolidRect may be faster.
That floored me the first time I saw it in MFC. I wonder which is faster if you already have a brush sitting around. (Being that the ::ExtTextOut method doesn't require you to create a temp brush.)
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
|
LOL, sounds like you are trying to depress the user.
"I see a red door and I want it painted black. No colours anymore, I want them to turn black."
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Just looked in the google archives, it seems that even though PatBlt is VERY fast, selecting the brush into the DC can be very slow and thus makes the ::ExtTextOut the winner.
Interesting stuff.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
To make it even more interesting, starting with 2K you can use SetDCBrushColor, which is probably quite fast (compared to Create/SelectBrush).
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
oooooo, another learn something new every day.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Hi I have a problem
When I call this function below, I get this error:
"Too few parameters. Expected 1."
What am I doing wrong here?
Here is the function:
void CMyTreeView::FillProducts()
{
CProductSet *pSet = &(GetDocument()->m_productSet);
pSet->m_strFilter = "[Categories].[CategoryID] = [Products].[CategoryID]";
if (pSet->IsOpen())
{
pSet->Close();
}
pSet->Open();
if (pSet->IsBOF())
return;
pSet->MoveFirst();
while (!pSet->IsEOF())
{
HTREEITEM hProductNode = FindNode(NULL, pSet->m_CategoryName);
InsertNode(pSet->m_ProductName, hProductNode);
pSet->MoveNext();
}
}
Here is the CProductSet:
void CProductSet::DoFieldExchange(CFieldExchange* pFX)
{
//{{AFX_FIELD_MAP(CProductSet)
pFX->SetFieldType(CFieldExchange::outputColumn);
RFX_Long(pFX, _T("[Categories].[CategoryID]"), m_CategoryID);
RFX_Text(pFX, _T("[CategoryName]"), m_CategoryName);
RFX_Long(pFX, _T("[ProductID]"), m_ProductID);
RFX_Text(pFX, _T("[ProductName]"), m_ProductName);
RFX_Text(pFX, _T("[ProductDescription]"), m_ProductDescription);
RFX_Long(pFX, _T("[Products].[CategoryID]"), m_CategoryID2);
RFX_Text(pFX, _T("[SerialNumber]"), m_SerialNumber);
RFX_Text(pFX, _T("[UnitSellingPrice]"), m_UnitSellingPrice);
RFX_Text(pFX, _T("[UnitCostPrice]"), m_UnitCostPrice);
RFX_Long(pFX, _T("[ReorderLevel]"), m_ReorderLevel);
RFX_Long(pFX, _T("[UnitsInStock]"), m_UnitsInStock);
RFX_Long(pFX, _T("[SupplierID]"), m_SupplierID);
//}}AFX_FIELD_MAP
pFX->SetFieldType(CFieldExchange::param);
RFX_Text(pFX, "ProductNameParam", m_ProductNameparam);
}
|
|
|
|
|
Your code doesn't match your table design. I suspect that one of the fields you have coded to read from doesn't exist in your table definition.
scott
|
|
|
|
|
Thanks scott!
I found the problem
|
|
|
|
|
The first time a programmer logs into our network they download any software updates made the previous day by the other programmers. Now I have moved from a desktop to a notebook I need to be able to run the same download program when my machine comes out of hibernation. I currently have to log off and log back on again each day which is annoying. Any information you can provide would be greatly appreciated.
Steve.
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
|
Thankyou very much. Just what I needed.
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
I am writing a class to display a grid in a view. This is not a database grid, but a grid that graphically illutrates which elements of a 35 element laser beam have been triggered over time.
So the width of the grid is 35 elements wide (constant) but the height is variable over time. I need to store the data to represent the state of each block within the grid (triggered = display grid element in blue OR not triggered = display grid element in gray for instance).
My plan is to store the the 35 element grid row in a:
vector<bool> Grid_Row;
since the size is predetermined, and store the collection of vectors in a deque:
deque < vector<bool> > Grid_Deque;
This works fine as it stands, but now I have to attach a time indicator to each row. My first plan was to convert the deque of vectors to a deque of structs (which would contain the vector and a timing variable:
struct GridRow
{
UINT time;
vector <bool> gridRow;
};
GridRow gr;
deque < gr > Grid_Deque;
Unfortunately this is not working to well.
Can someone help with this. Maybe tell me how to get this working(if it is possible) or maybe suggest a better solution.
Thanks
-Merle
|
|
|
|
|
deque < gr > Grid_Deque; Maybe I'm totally obfuscated, but ain't this to be
deque < GridRow > Grid_Deque; ?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Merle Pittman wrote:
Unfortunately this is not working to well.
The code doesn't compile? Monitor explodes when program runs? Something else?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|