Click here to Skip to main content
15,887,214 members

Comments by pani68 (Top 5 by date)

pani68 30-Apr-15 14:02pm View    
I need to know the field properties without reading the value of the field.
pani68 26-Apr-15 5:26am View    
Thanks for the comment. BTW my objective is not to retrieve the value, which can be done in many different ways. I need to determine the total number of digits and maximum number of digits after the decimal. Again, these values are to be determined from the field properties. Because, if the field is nullable, none of the records may contain any data in the field, and reading the value for the field would return nothing!

I hope this clarification is adequate.
pani68 2-May-13 11:31am View    
Thank you for the suggestion. But the problem is not solved. I get the same result even if I use the pointer returned by AfxGetMainWnd().

I am not sure which handle to pass in place of 'this'. Since the control is inherited from COleControl, I thought 'this' could be used in the function.

Any further ideas to solve the problem?

Pani
pani68 1-May-13 12:47pm View    
I have a CMenu * member variable in the class.

Then I initialise it in the constructor like this:

m_menu = new CMenu;

if(m_menu)
m_menu->CreatePopupMenu();


In the OnContextMenu function I add the menu item and call OnPopupMenu as follows:

while(m_menu->DeleteMenu(0,MF_BYPOSITION) != FALSE); //

m_menu->AppendMenu(MF_STRING | MF_ENABLED,MENU_SAVE_TO_FILE,L"Save Graph to File");
m_menu->AppendMenu(MF_SEPARATOR,0,L"");
m_menu->AppendMenu(MF_STRING | MF_ENABLED,MENU_CHANGE_COLOR,L"Change the color");

m_menu->TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON,point.x, point.y, this, NULL );

pani68 1-May-13 7:03am View    
I did the same thing as explained in Solution 2 but my menu items are disabled. Any ideas why this happens and how to get these enabled?

Pani