eyalle
Posts
-
Where .. IN ... -
How to add CRecordset derived class in VC++ 2008Hello all, I recently moved from VS6.0 to VS2008. I am trying to find a way to update an existing CRecordset derived class, from the DB table new structure (I'm using VS2008). Since I couldn't find how to do this, I also tried adding a new CRecordset derived class, using the MFC class wizard. Surprisingly, I couldn't find the CRecordset class in the class list to pick it from. I've tried to find a solution for this over the web, but couldn't find any useful suggestion. Please help. Thanks in advance. Eyal.
-
Handling sysmenu new item eventOk man, i've found the solution in VC6++ i've went to the class view of the class Frame im using. right-click -> Add Windows Message Handler.. then on the bottom under: "Filter for messages available for class" i selected "Window" and added the WM_SYSCOMMAND to my class wizard. now it work's i think that the problam was that even if i added it manualy, there was no trigger to the event. now since the message is in the wizard, and known by the compailer it triggers the event. Thank's anyway.. Good day
-
Handling sysmenu new item eventI dont think so, how do i add it ? what i did in my .h file is:
protected:
//{{AFX_MSG(CChildFrame)
afx_msg void OnClose();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd);
//This functions were inserted by the class wizard...
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
};then on the .cpp file:
void CChildFrame::OnSysCommand(UINT nID, LPARAM lParam)
{
//...
} -
Handling sysmenu new item eventIm using VC6++ , are you ?
-
Handling sysmenu new item eventI've tried to take ur example and plant it in my code. the thing is that for some reason, in my Class Wizard i couldn't find WM_SYSCOMMAND message, so i implemented it manually like you said in between the message map macros. but still, when i click on the "About" item, nothing happen's.. no trigger pumps the event. maybe something im missing ?
-
Handling sysmenu new item eventBut isn't the OnSysCommand used only for CDialog while im using already a CFrame ?
-
Handling sysmenu new item eventHello all, I have a class CChildFrame : public CMDIChildWnd : public CFrameWnd i have declared a new item in sysMenu called "Map Info"
CMenu \*pSysMenu = pFrm->GetSystemMenu(FALSE); ASSERT(pSysMenu != NULL); pSysMenu->AppendMenu(MF\_STRING, IDI\_SYS\_MENU\_MAP\_INFO, \_T("&Map Info"));
how do i handle the event of clicking that new item in the sysmenu ?? i have looked for something like it on the web but all i found is talking about CDialog and the WM_ON_SYSCOMMAND which doesn't seem to work for me. anyone ? Thank's Eyal
-
CRecordset old data problemyes i did, they access the same DB.
-
CRecordset old data problemHello all I've implemented a class dervied from CRecordset. this class gets the DB and sql query and retrives data. everything was working fine, untill i've decided to delete the data directly from the DB. when i'm running the same code, the class retrives the same data, although the data is erased. what's the problem ??
CSpecificGraphsRS rsSpeGraphs(&m\_db); strQuery.Format("SELECT \* FROM GRAPHS ORDER BY GRAPH\_ID"); //empty result query rsSpeGraphs.Open(CRecordset::snapshot, strQuery, CRecordset::none); while (!rsSpeGraphs.IsEOF()) { //gets in this while although the query is empty in DB //but actually the value is passed //seems like it keeps it somewhere in the memory genGraphDisplay.strGraphId = rsSpeGraphs.m\_GRAPH\_ID; }
-
RGB(255,0,0) to CString namehi, i have a COLORREF itme. i know how to convert it to RGB but my Question is, if i can show the name of the color Ex. RGB(255,0,0) --> Red RGB(65-105-225 ) --> Royal Blue Thanks'
-
TeeChart Pro AX v6Hello all, im using TeeChart Pro AX v6 of Steema Software SL. i was wondering how, if at all, can i paint a strip line in a chart insted of a regular line. thank's code example for regular line that works in my project:
chart->Series(Series).GetAsLine().SetStairs(true);
chart->Series (Series).GetAsLine().SetInvertedStairs(true); -
DataGridViewDataErrorContexts problemCan anybody explain to me how I handle the DataError Event? I have the following code but the error does not get picked up by any of them. Looking at e.Context shows " Parsing | Commit | CurrentCellChange ", how do I get the individual values? if (e.Context == DataGridViewDataErrorContexts.Commit) { MessageBox.Show("Commit error"); } if (e.Context == DataGridViewDataErrorContexts.CurrentCellChange) { MessageBox.Show("Cell change"); } if (e.Context == DataGridViewDataErrorContexts.Parsing) { MessageBox.Show("parsing error"); } if (e.Context == DataGridViewDataErrorContexts.LeaveControl) { MessageBox.Show("leave control error"); }
-
Treeview doesn't update after treenode.removeGot'ya.. anyway, your solution isnt working. i'll tell you what i found out maybe you'll know in my code where i do
originNode.Remove();
the
targetNode.Nodes.Count
doesnt change.. for Example, if i had 2 nodes under the targetNode, after the Remove function, still staying with 2..
-
Treeview doesn't update after treenode.removewhat to you mean by putting the horse ahead of the cart?
-
Treeview doesn't update after treenode.removei have only one thread. so i guess it does runs from the main thread..
-
Treeview doesn't update after treenode.removeI've written the following code to remove a node from a treeview. The node data isremoved, butthe node is still there. Apparently I need to force a refresh, as the selected node does go away when I navigate away and back to the page. Can anyone help? Thanks Eyal
//removes the node from the DB
int remove = SchemaDB.DeleteGenericLink(originNode.Tag),TargetNode.Tag);if (remove) { originNode.Remove(); }
//this if, doesnt remove the originNode from the targetNode.Nodes
-
Assignment ProblemThe reason is following property is set to true. colLink.UseColumnTextForLinkValue = true; Set it to false. Then it will resolve your problem.
-
Assignment ProblemHello all my problem is that for some reason, a simple assignment isn't working. the dataGridView is binded to DB and im trying to assign a value type string to a column of type string
//the initialization of the DataGridView
bindingSourceSchema.DataSource = null;
dgwSchema.Columns["colID"].DataPropertyName = "APP_ID";
dgwSchema.Columns["colName"].DataPropertyName = "DESCRIPTION";
dgwSchema.Columns["colTextbox"].DataPropertyName = "APP_ARGS";
dgwSchema.Columns["colTextbox"].HeaderText = "Parameters";
dgwSchema.Columns["colLink"].DataPropertyName = "APP_PATH";
dgwSchema.Columns["colLink"].HeaderText = "Path";DataGridViewLinkColumn colLink = (DataGridViewLinkColumn)dgwSchema.Columns\["colLink"\]; colLink.UseColumnTextForLinkValue = true; colLink.Text = "Edit"; bindingSourceSchema.DataSource = SchemaDB.GetGenericApps();
.
.
.//the assignment
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
dgwSchema.CurrentRow.Cells["colLink"].Value = openFileDialog.FileName;// !! ?? dgwSchema.CurrentRow.Cells\["colLink"\].Value STAYS with parameter "Edit" }
Thanks Eyal
-
Do not close ContextMenuStripHi Bill, Thanks again for you're time. it will be great if you will have the time to post that code, im sure it will help lot's of programmers.. Happy holiday's Eyal