Wunderful Thank You
User 1354
Posts
-
Change Titletext of an SDI App at the very beginning -
Change Titletext of an SDI App at the very beginningI want to change the TitleText of the MainFrame (SDI) at the initialization time of my app. I dont want to have this Text in the Form (Document - Application). I can use SetWindowText to do this later (after Initialization) but I didnt found out where I have to put it when I want to change the Text to appear while starting. Where should I put my code? What function should I use Thank you
-
Developer studio becomes slow...My developer studio is extremly slow in the moment. I am waiting about 1 minute when inserting a line into the code. What can I do? Thank you...
-
Change Title text in my MainFrameI want to change the Titletext of my MainFrame at startup. Now I use SetWindowText(...) but this only takes effect when I click on my menu (I dont know why). But I want the text written at startup. Does anyone know what I am doing wrong? Thank you...
-
How to get the domain nameHow to get the domain name. I think there must be somthing like ::GetComputerName but I cant find it. Thank you
-
The cursor keys changed + how to change get a edit control to use a return like a tabI try to build a class for an edit crtl with some special features. I tried to overwrite my OnChar of the control. Now the use my cursor has changed (I dont know why) to up=insertion cursor movesleft and down= insertion cursor moves right (left and right dont have any effect). How could that be? And I want to use a carrage return like a tab. Is this possible in the edit control? If it is how?
-
Resource ID'sWe want to use some selfdefined ID's for the Toolbar Buttons. Is there anything where I can look up the range of ID we are allowed to use? We want to define them in a special header... ...like: #define TOOLID_ZOOM 5666 Are there some ID's I am not allowed to use? Is there anything about this in the MSDN (If...give me a keyword I can search for) Thank you
-
class '...all MFC classes...' needs to have dll-interface to be used by clients of class 'ErrDlg'i:\eldis3\bib_source\eurodialoge\errdlg.h(47) : warning C4251: 'm_text' : class 'CString' needs to have dll-interface to be used by clients of class 'ErrDlg' c:\programme\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString' Since I use a lot of lib's (dll's) I get this warning for nearly everything I am exporting. I can't see any problems with this warning (There are (I hope so) no problems at runtime) but I want to get rid of these endless warnings at compile time. Does anyone know from where these warnings are coming? Does anyone know how to get rid of these warnings? Thank you...
-
Makro's (#define)...different Variable namesIch danke vielmals.
-
Makro's (#define)...different Variable namesOK...I try to explain it: We got an ErrorClass (EFErr). We need our ErrorClass in nearly every function. Usually we use it like that: EFErr CTest::Tester(...) { EFErr oErr=Hallo(...); //Funktion Hallo returns a EFErr too if (oErr) //Check if a error accours { return oErr; //return this error } } I want to reduce the code with an Makro: #define RET_FUNKTION(function) EFErr oErr=function;if (oErr){return oErr}; so I can do the same like above with: RET_FUNKTION(Hallo(...)) ...so long... ...but there is a problem: I can use this makro just one time in my function. I cant do things like that: EFErr CTest::Tester(...) { RET_FUNKTION(Hallo(...)) RET_FUNKTION(Hallo2(...)) } because the Variable oErr is redifined the second time. Of course, I can shorten the makro to: #define RET_FUNKTION(function) oErr=function;if (oErr){return oErr}; but then I have to do it like that: EFErr CTest::Tester(...) { EFErr oErr; RET_FUNKTION(Hallo(...)) RET_FUNKTION(Hallo2(...)) } If I could use the Line in the Variable name like: #define RET_FUNKTION(function) EFErr oErr__Line__=function;if (oErrr__Line__){return oErrr__Line__}; it will work... ...I hope this discribes my problem
-
Makro's (#define)...different Variable namesIs there a way to define a makro like this: #define NEW_VAR CString str__Line__ The compiler should make out of: void CMyClass::Test() { NEW_VAR NEW_VAR } something like : void CMyClass::Test() { CString str123 CString str124 } out of it. I dont care about the Lines. I just want to define a marko witch declares a Variable. And I want to use it more then 1 time in a function. Thank you...
-
Names to long...warning...I got a problem with the STL. It seems like the names coming from the STL are to long for the browse information. So I need a easy method to get rid of the warnings because they are about 100 and still growing. c:\programme\microsoft visual studio\vc98\include\list(176) : warning C4786: '?rbegin@?$list@PAVCOCIStatementHandle@@V?$allocator@PAVCOCIStatementHandle@@@std@@@std@@QAE?AV?$reverse_bidirectional_iterator@Viterator@?$list@PAVCOCIStatementHandle@@V?$ allocator@PAVCOCIStatementHandle@@@std@@@std@@PAVCOCIStatementHandle@@AAPAV4@PAPAV4@H@2@XZ' : identifier was truncated to '255' characters in the browser information i:\eldis3\bib_source\eurotools\eflist.h(45) : see reference to class template instantiation 'std::list >' being compiled i:\eldis3\bib_source\dbaccess\ocidatabase.h(147) : see reference to class template instantiation 'EFList' being compiled Thank you
-
Warning C4275 non dll-interface classThe MFC is shared (in every project)
-
CFileDialog does not openI got it with: oFile.m_ofn.lpstrInitialDir=m_strFile; and set the 3rd parameter to NULL Thank you anyway
-
CFileDialog does not openThe problem seems to be the Filename I put in: m_strFile The FileDlg. want to put the c:\ into the file Filename... ...it notice that c:\is not a valid filename and returns. I can force the dlg with OFN_NOVALIDATE not to close itself. This is fine ... ...but where I can put in the Initial folder?
-
Warning C4275 non dll-interface classWe use a lib and a dll to store our shared dialogs. At compile time we get the following warning: i:\eldis3\bib_source\eurodialoge\errdlg.h(19) : warning C4275: non dll-interface class 'CDialog' used as base for dll-interface class 'ErrDlg' c:\programme\microsoft visual studio\vc98\mfc\include\afxwin.h(2568) : see declaration of 'CDialog' This warning seems to be really just a warning (We cant find any real problems... ...but... ...a warning is a warning. Does anyone knows how to get rid of this? This is how we declare our class: class LIB_EXPORT ErrDlg : public CDialog where LIB_EXPORT is: #ifdef _AFXDLL // Sonderfall MFC-Klassen in DLL #define LIB_EXPORT AFX_EXT_CLASS #else #define LIB_EXPORT __declspec( dllexport ) #endif #else // UNIX #define LIB_EXPORT #endif
-
FAQ section for C++A FAQ section for Question often asked in the disussion forum's. Written for beginners. I think this would be cool...
-
CFileDialog does not openI use following code to open a CFileDialog: ... CFileDialog oFile(TRUE, "*.tab", m_strFile, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, "MapInfo Layer (*.tab)|*.tab|Alle Files (*.*)|*.*||", this); if (oFile.DoModal()==IDCANCEL) { return; } ... If m_strFile is a string that points to a folder already exists (C:\) the File Dialog does not open. What is the reason?