Thanks alot it really helpped ! by the way how can this be done in a CComboBox ? Ariel
Ariel
Posts
-
Finding data in CListCtrl -
Finding data in CListCtrlhi there, How can i find an entry in CListCtrl knowing its item data ? Ariel
-
few questons handling the common controlsHi there, I'm quite a newbe in MFC so i have a few questons handling the common controls : 1. is the a way to catch the Mouse Right click inside a CComboBox - the default is to show a PopUp menu and i want to do somethig else, how can it be done ? 2. How to cancel the edit mode in a CCombo box (so i can not type in it ? 3. Whats the command to select a line in a CListCtrl ( i tried CListCtrl::SelectItem but nothing happens)? - all i want to do is make a line selected at runtime ?!? 4. I', using CTreeCtrl and i want to make some nodes disabled in some conditions and enabled in others, or when a user click a node that shouldn't be enabled to return to the previous node after showing an error message - how can this be done ? Thank you alot for your time, Ariel.
-
Problems with CRecordset DoDataExchange !!!???Hi there, Well I have a strange problem. I'm Using Access 2000 DB and i'm connected through ODBC Drivers in MFC using CRecordset. I have a Table with a field of type Date/Time in Access 2000 DB , which the CRecordset uses : RFX_Date(pFX, _T("[FirstInstallDate]"), m_FirstInstallDate); (to exchange data between the Recordset itself and the Database.) all i do before this is : rsRecSet.m_FirstInstallDate = CTime::GetCurrentTime(); and the definition is : CTime m_FirstInstallDate; Everytime i get to this line i have a notification in DEBUG MODE : Microsoft Visual C++ : Unhandled exception in MyApp.exe (MFC42D.DLL): 0xC0000005: Access Violation. and the App. is stuck and i can't go on .... but the record is written and in a right way ... ???? and when i run the same App. in RELEASE MODE it Closes with Abotion Message. Does somone have any idea ???? Thanks alot, Ariel.
-
How to Select a row in CListCtrl at run time ??Thanks alot it worked Ariel.
-
How to Change the Caption of a CPropertyPage at run time ???Hi there, i'm trying to change the caption of a CPropertyPage at run time. In OnInitDialog() of this CPropertyPage I'm trying : 1. CWnd::SetWindowText ("XXXX"), and also 2. CPropertyPage::m_psp.dwFlags = m_psp.dwFlags | PSP_USETITLE; CPropertyPage::m_psp.pszTitle = "XXXX" After both tries i call UpdateData() and/ Or Invalidate() and nothing. I'm trying to change both in Wizard Mode and Normal but nothing happens there. Can somone help me with that ???? Thanks alot, Ariel.
-
How to Select a row in CListCtrl at run time ??Hi there, I'm trying to Select a row in a CListCtrl using the CListCtrl::SetSelectionMark(idxSel); and i'm calling this method in OnInitDialog() of a CPropertyPage. But this dosen't really worked for me !! I tried to Use UpdateData() and Invalidate() on the view to see if this will help but still no selection seen on the screen (although i do think there is something selected but not shown). Can somone help me with that ???? Thanks alot, Ariel.
-
how to use autonombers in ODBCHi there, First thank you for the answer. Actually i know about the referentail integrity needed in a 1-to-many connection. The thing is i don't know how to use it in actual user interface of MFC. Lets Say as you said i have : Table1.ID - connected in m_T1_ID linked to a CEdit Value : m_edtVal Table1.Table2ID - connected in m_T1_T2_ID linked to a CComboBox Value : m_cmbVal How can i put all Table2 Entries in m_cmbVal and put the Actual Table2.ID inside Table1.Table2ID ? m_pSet->AddNew(); // Somwhere in here i should reference the 1-to-many, but how ??? Thank you for your answer, Ariel.
-
Changing Text in Statics and controls at run time ?Hi there All, Changing Text in Statics and controls at run time ? Well i'm trying to do something which i'm sure its possible and i dont know how. Actually i want to make a loop (which loop ??)through all the Controls and Windows under an SDI project and change all the labels of the controls\windows (including the static ones). How can this be done, I'll apritiate any help, Ariel.
-
Selecting a row with CListCtrlThanks alot for this its working perfectly !!! Hope to be able to help you once, Ariel.
-
Can CListCtrl select all the row (not only the iSubItem=0 part)?Hi there, Thanks alot you saved me alot of time till i would have figured this out. Thanks Again, Ariel.
-
write into the Registry ?Well first i found some wrapper calsses for the Registry handling but i'm always open to new and improved ones. Hope you can show me the headers or all the class code throw a reply or simply by mail. Thank you for the time, Ariel.
-
write into the Registry ?Excellent Reference - Thank you very much for the Answer !!!
-
Some MFC Process Checking ???Thank you alot for this - i think its very usefull - i'll give it a better look soon. Just wanted to thank you, Ariel.
-
Some MFC Process Checking ???Hi there, Firstly, Thank you very much for the answer. I would like 2 ask 2 more favours if you can : 1. Can you show me a small example of the EnumProcesses - how to catch the processes ? 2. On a Network if i'm actually running all the processes on a disk of one machine (which means i access \\AnotherComp\c\APP\MyApp.exe and thats the only place where the source is. Does this change the answer you gave for Network pinging ? Can you explain a bit more about it ? (Code headers will be apritiated here too) Thanks again for your answer, Ariel.
-
Can CListCtrl select all the row (not only the iSubItem=0 part)?Thats Great - Thank you very much i really apritiate all the help. Ariel.
-
How to Manage CTreeCtrl ???Hi there, I'm trying to work with a CTreeCtrl and what i'm trying is to close all the expanded nodes when another node is opened. How can i do that ??? Thanks alot, Ariel.
-
How to Get the Date Value from CMonthCalCtrl and CDateTimeCtrl ?Hi there All, I'm trying to Retrive the Date in form of COleDateTime from a CMonthCalCtrl and CDateTimeCtrl but not very succesfull at this. I'm trying to Use the BOOL GetCurSel( COleDateTime& refDateTime ) const; function but then i get an invalid Date - i tried to catch different Messages of the Above Controls and none of them do the Job. Can somone please Help me, Just a short Code example to see how its done will be more than enough. Thanks in advance, Ariel.
-
write into the Registry ?Hi there, Whats the easies and most efficient way to write into the Registry ? I want to write into HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER keys in which i want to open a new SubFolder(key) under "Software" folder (key) (called : MyKey for instance) and under this folder have some properties of kind : int, and CString. I also want a method to retrive this data and alter it if necessary. How can this be done ? Thank you alot, Ariel.
-
Some MFC Process Checking ???Hi there, Some MFC Process Checking : 1. How can i check if a process is running in the same machine already ? (I mean i want to run the same process/App. only once in the machine - how can i check if the process is already running on the machine ?) 2. How can i do the same to check if the process is running in the network ? (I have a Lan Network of Lan and i want to check if the process/App. is already running on one of the machines (pc) is this possible ?) Thank you alot, Ariel.