|
|
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
|
|
|
|
|
Will not compile, too many erros to mention.
|
|
|
|
|
Post your declarations using 'no HTML' option. Without that, the > and < are missing.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
If it were me, I would typedef the things I wanted to use as such
typedef vector <bool> GridVect;
typedef struct tagGridRow
{
UINT time;
GridVect gv;
} GridRow, *pGridRow;
typedef deque <gridrow> GridRowList;
and then instantiate these objects as you need them.
i.e.
GridRow gr;
GridRowList grl;
grl.push_front(gr);
In your first code, I do not see where you declare what you are putting in your vector.
|
|
|
|
|
I want to implement a control in my app similar to the Workspace in Visual Studio. In the Workspace, although your project (source files etc) are presented in a tree, you can select more than 1 node at a time. I don't think I can base my control on the TreeView control since it doesn't support multi-select. Any ideas? Thanks in advance. DEM.
|
|
|
|
|
Oct'96 issue of MSJ, C++ QA column by Paul DiLascia contains the code you need. The article may be in the MSDN installed on your disk. If it's not there, go to msdn.microsoft.com and search for CMultiTreeCtrl.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi.
I have programmed a Dialog box with a progress bar.
But I want the progress bar to run a soon as the dialog opens with no prompt from the user, how do i do this. InitDialog is too early if you get my drift.
I am using VC++ 6.0
Regards
Mark
|
|
|
|
|
How are you going to increment the progress bar value? Is it related to some background task?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
It is surprising to me that you consider OnInitDialog too early to initiate your progress bar. This handler is on the very brink of the moment when the dialog is shown up!
Anyway you can handle WM_WINDOWPOSCHANGED , which is (if I'm not wrong) the very first message sent right after the dialog appears on the screen.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Put a timer in the Dialog box. Start it in the OnInitDialog....
In the OnTimer, Test if the Dialog is Visible and Ready....
Regards.
Carlos Antollini.
Sonork ID 100.10529 cantollini
There are two ways to write error-free programs; only the third one works.
|
|
|
|
|
I'm still fairly new to VC++
So do I create a member for a timer, is it a CTimer??
What function(s) do I need in my cpp??
Mark
|
|
|
|