WS_VISIBLE|WS_BORDER Jaime
Jaime Stuardo
Posts
-
Window style for manually created CEdit -
CComBSTR to stringYou can use OLE2A macro, for example, USES_CONVERSION; CComBSTR bstrSource = "Text to convert"; std::string sTarget = OLE2A(bstrSource); Jaime
-
outputing images from C++ to Excelwhy aren't you using Excel objects? some restrictions on design? Jaime
-
Releasing MFC projectsThat project uses only MFC42.DLL. You can know what DLL your project uses with Depends utility. Depending on your application for generating installers, you will need a merge module that incorporates MFC42 with the installation, for example, InstallShield uses MFC42.MSM Jaime
-
Removing Combo Box bordersDerive your own CComboBox class and implement OnNcPaint handler. If you do nothing in that handler, no border will be appear. That is your starting point to draw your own border. Jaime
-
Cedit control, paste problemHave you used CF_UNICODETEXT as the format when you copied the data into the clipboard? Jaime
-
make this variable globalthe question I did was not for the float, but for the test_26_tt1. What problem did you have with it? Variable isn'r recognize? did you receive a compilation error? Jaime
-
make this variable globalwhat problem did you have when you used the same way as float? Jaime
-
Event Handler Never Called??some example code so that we can see what happen? I'm not a wizard :) Jaime
-
i can disable menu item but cannot gray it!!!!!!!!I can guess that you have in other part of your program a code to "ungray" the item. Check that. Other fact to check. Are other menu items grayed that you see grayed? maybe is only a display problem. Jaime
-
i can disable menu item but cannot gray it!!!!!!!!Have you tried to put pCmdUI->Enable(FALSE) as the only instruction in the update handler? If that way the menu option is grayed, the problem is the condition you have. By the way, if that update handler is called only for item 3, you don't need that verification. Finally, I tell you that I use my own application to place pCmdUI->Enable(FALSE) for a specific menu item and it worked (disabled and grayed) so the problem may be in your condition. Jaime
-
Conversionsince CString (when UNICODE is defined) and std::wstring both are defined as an array of wchar, you could safely do: CString sOther = _T("This is a string"); T_String s = (LPCTSTR)sOther; Jaime
-
i can disable menu item but cannot gray it!!!!!!!!Just do: pCmdUI->Enable(FALSE); when pCmdUI->m_nID is ID_SETTINGS_ITEM3 that is, simply you can do: pCmdUI->Enable(pCmdUI->m_nID != ID_SETTINGS_ITEM3); Jaime
-
ConversionJust curious.... Why are you doing that? CString has already unicode support. Jaime
-
library questionHave you used __declspec(dllimport) myfuncName in your H file? Jaime
-
Arrays!First of all, you cannot trust on compiler about filling all assigned memory with 0's. In VC++, it is initialized with garbage, so be sure to call a function to initialize array, for example, ZeroMemory or memset. Now to your question. If you declare char array[] you have an array of bytes, so you have to compare against 0, not '0' (comparing with '0' is like comparing with 0x30) Jaime
-
CDatabase && CRecordSetyou are welcome... but my name isn't Eduardo, it is Jaime, and my surname Stuardo :)
-
Calling classes from DLLsIn DLL you have to declare: class __declspect(dllimport) CDervDlg : public CDialog { void TestLoad(); void SomeFunc(CString, CString); BOOL m_SomeVar; }; and in EXE: class __declspect(dllexport) CDervDlg : public CDialog { void TestLoad(); void SomeFunc(CString, CString); BOOL m_SomeVar; }; In your DLL you are using a function declared in the EXE, that's why you need to export from the EXE, and import it into the DLL. Jaime
-
CDatabase && CRecordSetMFC doesn't provide a class for connecting to database using ADODB, that's why I programmed my own CDatabase class that #imports the ADO DLL to use the wrapper classes, and call the more common methods, for example, Execute to execute a query. In order to fully understand, you need knowledge on COM technology. I think here in codeproject you may be able to find info on this topic (in www.google.cl you can find a lot of stuff, for sure) Jaime
-
CDatabase && CRecordSetit's wrong. ADO can connect to any database that has supporting driver installed in the system. I have used it in Access (Microsoft Jet), SQL Server (SQLOLEDB) and Oracle (MSDAORA) Jaime