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
Y

Yajnesh Narayan Behera

@Yajnesh Narayan Behera
About
Posts
32
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Calling functions in a win32 dll from a vb.net application.
    Y Yajnesh Narayan Behera

    Yes you can, follow these two steps. Step 1: You have to declare this DllImport attribute which allow specifying the name of the dll which contains the method. Step 2: Then you have to specify the signature of the API, after which you can call the method passing the correct parameters. As for example: [DllImport("User32.dll")] static extern bool MessageBox(IntPtr hWnd, string lpText, string lpCaption, uint uType); IntPtr hWnd= this.Handle; MessageBox(hWnd, "Hi", "Click Me", 0); hWnd is the handle of the form.

    C / C++ / MFC csharp

  • How can I remove vertical scrollbar from Microsoft web browser?
    Y Yajnesh Narayan Behera

    If the application is in MFC then you can call the method which hide scrollbar of your Activex control through IDispatch interface. I do n't remember exactly which property you have to set. In case it is pure c++, then you have to write your own helper class.

    modified on Thursday, March 26, 2009 10:16 AM

    C / C++ / MFC question

  • Encrypting Passwords in .NET application
    Y Yajnesh Narayan Behera

    In my project requirement was same as of your. There is two approach two encrypt as the code level & database level, but I took the code level approach. Although I am not an expert in this area would like to know whether my approach was correct or not also it may answer your query. I used some class provided by .NET framework.

    private static string Encrypt(string originalString)
    {

    DESCryptoServiceProvider cryptoProvider = new DESCryptoServiceProvider();
    MemoryStream memoryStream = new MemoryStream();

    CryptoStream cryptoStream = new CryptoStream(memoryStream, cryptoProvider.CreateEncryptor(bytes, bytes), CryptoStreamMode.Write);

    StreamWriter writer = new StreamWriter(cryptoStream);
    writer.Write(originalString);
    writer.Flush();
    cryptoStream.FlushFinalBlock();
    writer.Flush();

    return Convert.ToBase64String(memoryStream.GetBuffer(), 0, (int) memoryStream.Length);

    }

    Now the returned string is in encrypted format & can be inserted in the database.

    modified on Thursday, July 31, 2008 2:33 AM

    .NET (Core and Framework) database csharp oracle design tutorial

  • VERY basic memory question
    Y Yajnesh Narayan Behera

    There is a verry good discussion here http://www.codeguru.com/forum/showthread.php?t=55854[^]

    C / C++ / MFC data-structures performance question

  • Excel automation problem
    Y Yajnesh Narayan Behera

    You are using the wizard to import all these classes or not? If you are using the wizard then all the headrers file will be added automaticlally. I do not know in 2008 how you will use the wizard, but exploring a little I suppose you will get it.

    C / C++ / MFC c++ testing tools help question

  • Including methods in a DLL
    Y Yajnesh Narayan Behera

    What you are trying to achieve is can easily be done in this way. My project is running fine. Basically in your interface class you have to derive the classes in this manner. class MyPPTApplication : public TOleHelper { // Operations public: LPDISPATCH GetPresentations(); } This is just a hint how in my project I have achieved this for PPT. In this way you have to get all the methods for Word, call the method in proper order & you will get the required result. GetPresentations does nothing it internally call this method LPDISPATCH result = 0; InvokeHelper(0x7d1, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); I do not know what is the use of you Dll, if it is to show the Word application then you have to create your own container object that is a whole big area in it's respect. :wtf:

    C / C++ / MFC css tutorial question

  • Including methods in a DLL
    Y Yajnesh Narayan Behera

    I do not know whether there is any method provided by complier itself. In my project what I have done is added the whole power point class after importing them from the TLB file. You can get how to import all the methods from a TLB from CodeProject. :laugh:

    C / C++ / MFC css tutorial question

  • Botton clicked on Pressing Tab Key.
    Y Yajnesh Narayan Behera

    The simple solution just remove the tab stop style from button controls.

    modified on Friday, July 25, 2008 2:19 AM

    C / C++ / MFC question

  • How can i disable pressing of special characters(@,#,$,%,^,&,*,~,!) on Editbox control?
    Y Yajnesh Narayan Behera

    You can perform it in three ways. One is override PreTranslateMessage. Another one is to subclass your Editbox. Also there is another one derive your custom editbox from CEditBox, on WM_CHAR message you can disbale special character.

    C / C++ / MFC question

  • Fundamental question in C++
    Y Yajnesh Narayan Behera

    You are correct. Let me give the snapshot. class BaseClass { public: virtual void Display(); }; void BaseClass:isplay() { printf("Hello BaseClass\n"); } class DerivedClass : public BaseClass { private: void Display(); }; void DerivedClass:isplay() { printf("Hello DerivedClass\n"); } int main(int argc, char* argv[]) { printf("Hello World!\n"); BaseClass* pBaseClass = NULL; DerivedClass* pDerivedClass = new DerivedClass(); pBaseClass = pDerivedClass; pBaseClass->Display(); delete pDerivedClass; return 0; } In this case the method is private in the derived class, so if we can call this private method from another class then what is the meaning of encapsulation in C++?

    C / C++ / MFC question c++

  • Fundamental question in C++
    Y Yajnesh Narayan Behera

    Now let us have two classes one is a base class & there is a virtual method. Again there is a derived class & we override that method & the access is private, through the base class pointer we assign the derived class object & call the virtual method then which method will be called & why?

    C / C++ / MFC question c++

  • Good wpf tutorials
    Y Yajnesh Narayan Behera

    There are two sites where you can download all type of books. 4shared.com esnips.com I found good WPF book "Pro WPF in C# 2008". A nice book worth for buying.

    WPF csharp wpf question learning

  • How to find a particular entity in the listview and color it
    Y Yajnesh Narayan Behera

    Please follow this link. http://www.codeproject.com/KB/WPF/WPFHighlightCellListView1.aspx[^]

    WPF help tutorial question

  • How to Bold a Particular field in a list view
    Y Yajnesh Narayan Behera

    Hi Please go through the zip file of my article the solution for collection class is there. :-D

    WPF database help tutorial

  • How to Bold a Particular field in a list view
    Y Yajnesh Narayan Behera

    OK now your problem is mine as I am stuck at this point. I am also trying to bind a collection to this ListView at runtime & to highlight the search. End point is that in "EditBox_Loaded" method we can highlight it. You try how to bind the data collection at run time, as well as I am trying on my end.

    WPF database help tutorial

  • How to Bold a Particular field in a list view
    Y Yajnesh Narayan Behera

    I have posted ths article, please follow this link. http://www.code ;) project.com/KB/WPF/WPFHighlightCellListView1.aspx[^] Currently the code is not uploaded there as it is under scan, it will be available tomorrow.

    WPF database help tutorial

  • How to Bold a Particular field in a list view
    Y Yajnesh Narayan Behera

    Sorry this is not the complete solution. I will post an article having this functionality today. :laugh:

    WPF database help tutorial

  • How to Bold a Particular field in a list view
    Y Yajnesh Narayan Behera

    Now let us have a XAML file, where there is a listview where Employee data such as FirstName,LastName & EmployeeNumber is being populated. I assume you are retrieving data from you database when a specify condition is beieng satisfied such as when FirstName matches the condition. In this case you want to heighlight those cells. In this case your XAML file looks like: <ListView.View> :-D <GridView AllowsColumnReorder="true" ColumnHeaderToolTip="Employee Information"> <GridViewColumn Header="First Name" Width="100" > <GridViewColumn.CellTemplate> <DataTemplate> <l:EditBox Height="25" Value="{Binding Path=FirstName}" Loaded="EditBox_Loaded"/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn Header="Last Name" Width="100" > <GridViewColumn.CellTemplate> <DataTemplate> <l:EditBox Height="25" Value="{Binding Path=LastName}" Loaded="EditBox_Loaded"/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn Header="ID" Width="50" > <GridViewColumn.CellTemplate> <DataTemplate> <l:EditBox Height="25" Value="{Binding Path=EmployeeNumber}" Loaded="EditBox_Loaded"/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> </GridView> </ListView.View> Now in your cs class private void EditBox_Loaded(object sender, RoutedEventArgs e) { EditBox edtBox = sender as EditBox; if (edtBox.Value.ToString() == "Yajnesh") { edtBox.FontSize = edtBox.FontSize + 4; } } I have tried to paint the background, but it is not straight forward as you have to use the concept dependency property.

    WPF database help tutorial

  • How to Bold a Particular field in a list view
    Y Yajnesh Narayan Behera

    I was trying to solve this problem. In many ways I tried, but as per your requirement you have to add "TextBlock", then after that you can highlight the particular cell changing the Foreground colour. :laugh:

    WPF database help tutorial

  • Problem with InvokeHelper method in CWnd class
    Y Yajnesh Narayan Behera

    So you are using onemethod of that Dll which expect a parameter as COleControlSite. Now this class is related to embedded control, in simple word when you have a container & you want to display a compound object or something like, :laugh: this class plays an important role. So in your case I suppose this Dll is not the suitable option to open a port. Why do not you use various Open, CreateFile APIs?

    C / C++ / MFC help c++
  • Login

  • Don't have an account? Register

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