Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Sayan Mukherjee

@Sayan Mukherjee
About
Posts
16
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Detecting workstation access
    S Sayan Mukherjee

    Hi, How can I programmatically know when any machine on my network accesses my machine through a share or through C$, D$ using admin priviledges? Is it possible to know the logged in username also? Thanks in advance. With best regards, Sayan With best regards, Sayan Email:sayanmukherjee@indiatimes.com

    C / C++ / MFC question com sysadmin

  • Programmatically Reading an Excel Sheet
    S Sayan Mukherjee

    Hi, I have an excel sheet with some data. I need to read these data elements from a VC++ application. How do I do this? What I need to know specifically are: - What component to use for getting access to an excel sheet? - What are the methods exposed by this component which will be useful for this purpose? Any suggestions are welcome. Sample code or URL for the same will be appreciated as well. With best regards, Sayan Mukherjee Email:sayanmukherjee@indiatimes.com

    C / C++ / MFC question c++ com

  • EN_CHANGE and CEdit, simple question
    S Sayan Mukherjee

    Hi, Please find below a possible way to do it using MFC. It is in your lines of thought and EN_CHANGE does it. When the application starts the button will be disabled. As you type in the edit box or delete text EN_CHANGE fires. Keep on measuring the length of the string. Code follows: Class declaration: class CEditControlDlg : public CDialog { // Construction public: CEdit *m_pEdit; **// Added by Sayan** CButton *m_pButton; **// Added by Sayan** CEditControlDlg(CWnd* pParent = NULL); // standard constructor // ... // ... } Function definition - InitDialog(): BOOL CEditControlDlg::OnInitDialog() { CDialog::OnInitDialog(); // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon // TODO: Add extra initialization here m_pEdit = (CEdit *)GetDlgItem(EF_TEXT); **// Added by Sayan** m_pButton = (CButton *)GetDlgItem(PB_DONE); **// Added by Sayan** m_pButton->EnableWindow(FALSE); // Added by Sayan return TRUE; // return TRUE unless you set the focus to a control } Function definition - EN_CHANGE handler function: void CEditControlDlg::OnChangeText() { // TODO: If this is a RICHEDIT control, the control will not // send this notification unless you override the CDialog::OnInitDialog() // function and call CRichEditCtrl().SetEventMask() // with the ENM_CHANGE flag ORed into the mask. // TODO: Add your control notification handler code here CString strText; m_pEdit->GetWindowText(strText); if (!strText.GetLength()) { m_pButton->EnableWindow(FALSE); } else { m_pButton->EnableWindow(); } } With best regards, Sayan Email:sayanmukherjee@indiatimes.com

    C / C++ / MFC question help

  • Lexical matching - wildcard type
    S Sayan Mukherjee

    Hi, I need to get hold of some algorithm for doing lexicographic text matching - the way it works for wildcard. Could anybody give me some URL or article extract? e.g.: abc* matches abcdef but does not match abdef. ?XYZ matches MXYZ but does not match MNXYZ. With best regards, Sayan Email:sayanmukherjee@indiatimes.com

    C / C++ / MFC com algorithms regex question

  • Timer in DCOM server
    S Sayan Mukherjee

    Is your server a service? In that case, you can use a separate worker thread in your application to do the needful. The timing action can be implemented using Events and the thread has to be synchronised with that event. The event will signal the thread when the required time has elapsed. With best regards, Sayan Email:sayanmukherjee@indiatimes.com

    COM sysadmin tutorial question

  • How to pass a string into COM
    S Sayan Mukherjee

    Just an observation: If the requirement is only to send the contents of the CString to the server (as in this case), then the solution is okay. If the server changes it and the client needs it back, a BSTR * will be required. The IDL should have [in] BSTR bstr in the first case. For the second type it should have [in, out] BSTR *pbstr With best regards, Sayan Email:sayanmukherjee@indiatimes.com

    COM com help tutorial

  • Calling a Dialog from another Dialog
    S Sayan Mukherjee

    Hi, Thank you for your reply. Why is it that PreTranslateMessage() should not be used? All messages to the window pass through this function. Isn't it the obvious place to trap the working of a message? Or, is it reserved for system messages only? I have tried the code with PreTranslateMessage() and it is not just working. The code inside is just not getting called for the user-defined message. All other messages are passing through the function as expected. Am I missing out something? With best regards, Sayan Email:sayanmukherjee@indiatimes.com

    C / C++ / MFC question c++ com

  • Calling a Dialog from another Dialog
    S Sayan Mukherjee

    Hi, I have an MFC executable (.EXE) that is a dialog with some controls. On double-clicking a particular control, I want a second dialog to popup and some information to be passed from the calling dialog to the called dialog. For this I was trying to use a user-defined windows message (WM_POPDLG) and passing the information in a malloc-ed pointer using SendMessage(). The information will be packed into the WPARAM parameter. Before sending the message, I will create the called dialog using Create(). I will retrieve the information in the PreTranslateMessage() function of the called dialog. WM_POPDLG has been defined as: #define WM_POPDLG ((WM_APP) + 100) When I implemented this idea, I found that the PreTranslateMessage() is not getting called at all. Create() worked fine. My question: What do I need to do so that the message sent by SendMessage() hits the right place and gets processed correctly. Am I missing out something? Note: I do not want the called window to become visible before processing the message in PreTranslateMessage(). With best regards, Sayan Email:sayanmukherjee@indiatimes.com

    C / C++ / MFC question c++ com

  • Printing from a C program
    S Sayan Mukherjee

    By the word 'printing', I meant printing to a printer. With best regards, Sayan Email:sayanmukherjee@indiatimes.com

    C / C++ / MFC question c++ com help

  • Printing from a C program
    S Sayan Mukherjee

    Hi, I am using VC++ 6.0 . I need to print some text from a simple C program. How do I do it? I tried to use fprintf(); but couldn't get a suitable FILE * object to put as the first parameter. Please help. Is there any other way to do it? With best regards, Sayan Email:sayanmukherjee@indiatimes.com

    C / C++ / MFC question c++ com help

  • Using the Print dialog
    S Sayan Mukherjee

    Hi, I require some application data to be printed from my VB application. I intend to use the standard Print dialog (that is generally available in all MS applications) for this. Using the ActiveX control CommonDialog I am able to pop up the dialog with the desired settings (that is page from, page to, orientation, number of copies etc). But how do I pass the desired data to the dialog so that it can print it? I could not find any method that accepts the data. When I click the button [PRINT], nothing is printed. Please help! Thanks in advance. I am placing a section of the code below: =============================================================== 'cmd1 is an instance of the ActiveX control 'created by including Microsoft Common Dialog 6.0 'in the Controls dialog box under the Project menu cmd1.DialogTitle = "Print text file from VB" cmd1.Copies = 1 cmd1.FromPage = 1 cmd1.ToPage = 2 cmd1.FileName = "c:\abcd.txt" 'This is the file I want to print cmd1.Orientation = cdlLandscape cmd1.ShowPrinter 'Popup the standard print dialog =============================================================== Is there any other way of doing this? With best regards, Sayan Email:sayanmukherjee@indiatimes.com

    Visual Basic com question help

  • Debug/Release problem?
    S Sayan Mukherjee

    Hi, Do ensure that all variables (buffers, pointers, structure instances) are initialised in the correct context(i.e. declaration or first usage).Moreover, after you read each record from the serial device and populate the list in your application, try reinitialising the buffers which are used in the reading (from serial device) and writing(to list) operations. If the records that you are reading are of varying length then the code should take care of reading and writing the biggest record; i.e. the read/write buffers should be able to accommodate any record of any size. In my opinion, the only way to come out of this 'screwy situation' is to apply the brute force technique of debugging. You may need to put in calls to fprintf() or printf() or OutputDebugString() to monitor the steps of the code in release mode. Points mentioned above are not solutions to your problem but I sincerely hope the suggestions help. With best regards, Sayan Email:sayanmukherjee@indiatimes.com

    C / C++ / MFC help announcement debugging tutorial question

  • Passing parameters to a Dialog
    S Sayan Mukherjee

    Hi, Thanks for the answer. It was really helpful. A related question: In Windows SDK, each window has a place where a 32 bit pointer can be passed which is accessible from other windows. Using the heap, one can pack any amount of data and pass it. Is there any equivalent to that under MFC? I am sorry if the question is vague. With best regards, Sayan Email:sayanmukherjee@indiatimes.com

    C / C++ / MFC question c++ com

  • Returning Safearray from remote DCOM
    S Sayan Mukherjee

    Hi David, Can you put parts of your code in this forum? Specially those parts where you are accessing and unaccessing the SAFEARRAY. It will be better if you can also give us the portion of the IDL that describes the prototype of the interface method where you are having the problem. With best regards, Sayan (sayanmukherjee@indiatimes.com)

    COM c++ sysadmin data-structures debugging question

  • Passing parameters to a Dialog
    S Sayan Mukherjee

    Hi, I have a dialog-based MFC application. In response to a button click on the dialog I need another dialog to popup. So far so good. I also need the text in an edit field in Dialog_1 to appear in an edit field in Dialog_2. In short, I need parameters to be passed from one window to another. How can I do this? With best regards, Sayan Mukherjee (sayanmukherjee@indiatimes.com)

    C / C++ / MFC question c++ com

  • Dangling references
    S Sayan Mukherjee

    Hi, Can you give some snapshots of the code? The out-of-process server - is it a DLL or an EXE? With best regards, Sayan Mukherjee

    COM help sysadmin beta-testing question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups