Thanks alot. it solved my problem
Saqib Razzaq
Posts
-
How should I call an exe file using C# -
How should I call an exe file using C#I found it in MSDN and ExecCommand (strCommand, strArgs); but I do not know in which namespace they exists. The msdn page that show the description of this method does not tell the namespace requirements. If you know please do let me know.
-
How should I call an exe file using C#I could not find any function in C# that allows to call exe files. I need some function that does the equal of Visual C 6's WinExec (strCommand, nCmdShow). e.g. WinExec ("calc.exe", 0); opens the windows calculator and WinExec ("notepad.exe", 0); opens the notepad. Some same stuff in C# ????
-
How to enable Unicode character support in CRichEdit controlI have displayed Unicode strings in CEdit derived controls successfully but now when I want to display the same string in a CRichEdit control, it displays a '?' character for each unicode character. I think richedit control takes only ascii characters by default. Is there any way to let rich edit control accept unicode strings. I can't even copy the string from edit control and paste into the richedit control. It still displays alot of '?' characters. Example:
wchar_t strUnicode[10]; strUnicode[0] = 0xfebd; strUnicode[1] = '\0'; GetEditCtrl().SetWindowText (strUnicode); //works fine // But in another application (CRichEditView derived SDI) GetRichEditCtrl().SetWindowText (strUnicode); //fails
-
Visual C++ profiler?I think you have knocked at a wrong door.:) You might find your solution in VS.Net IDE section.
-
How to replace default keys behaivour in Edit controlThanks alot for your help Greg. I got my problem solved. PreTranslateMessage function handed the whole MSG structure to me. I traped the WM_CHAR message and changed the wParam to 'b' when it was actually 'a'. if (pMsg->wParam == 'a') pMsg->wParam = 'b'; Codeproject is really amazing site. Thankyou once again. Saqib.
-
How to replace default keys behaivour in Edit controlI've a CEdit class. When you press 'a' from the keyboard, it writes 'a' in the control which is obvious. The problem is that I want to change this behaviour. when I press 'a' from the keyboard, some other character e.g. 'b' should be written. I have a 2D array that has mappings of all the keyboard keys. Actually I am dealing with Unicode (a multilingual application). Suppose I want to replace 'a' character with unicode 23456, which message should I handle. I have tried WM_KEYDOWN and WM_CHAR and changed the virtual key code. but it did not worked. In short, please tell me any way in which I can display 'b' in the edit control when 'a' is pressed. Saqib.
-
SerializeWhenever you want text to appear on new line in file, use "\r\n" in a char type array or CString. e.g. CString m_strLines; m_strLines = "Line1.\r\nLine2\r\n"; I am not clear about the garbage that appeared in the file. Does the garbage characters appear at the end of your data or your data is not saved at all?
-
How to obtain column number in a fileI've created MFC application with Doc/View support. My view class is inherited from CRichEditView class. I need to obtain the row and column number of the current cursor position. The following function gets the current line number. GetRichEditCtrl().LineFromChar(-1); The question is "How can I get the column number"? The ideal example is the Visual C++ IDE that shows the row and column of the cursor in the status bar. The row and column updates whenever the cursor changes.
-
Window title and Complete applicaiton PathIf I have handle to the window (HWND), how can I get the window title and the application's path using the win32 API functions.