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
A

AnsGe

@AnsGe
About
Posts
25
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Around 500 controls in a Dialog
    A AnsGe

    Hi, how can i place around 500 controls simultaneously on a single Dialog? Any idea? Thanks in advance. Anish.

    C / C++ / MFC question

  • Can not marshal parameter #4: The type definition of this type has no layout information.
    A AnsGe

    Hai In my applcation i want to list all machines in the network. So i used the WNetOpenEnum API . My code looks like, [DllImport("Mpr.dll", EntryPoint="WNetOpenEnumA", CallingConvention=CallingConvention::Winapi)] static ErrorCodes WNetOpenEnum(ResourceScope dwScope, ResourceType dwType, ResourceUsage dwUsage, NETRESOURCE* p, IntPtr &lphEnum); NETRESOURCE* pRsrc = new NETRESOURCE(); //A managed class IntPtr handle = IntPtr::Zero; result = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_DISK, RESOURCEUSAGE_ALL, pRsrc, handle); But when i run the application got an error " Can not marshal parameter #4: The type definition of this type has no layout information. " Whats is the problem. Plz help

    Managed C++/CLI help sysadmin json learning

  • Listing all machines in the network
    A AnsGe

    Hai, How can i list all machines in the network. If u have any idea plz help me Thanks in Advance:) Anish

    C# sysadmin help question

  • StatusBar problem
    A AnsGe

    What is the rigth method to add a Statusbar to a Dialog? I had done this way. CStatusBar m_StatusBar //Memeber variable m_StatusBar->Create(this); But whenever i call 'Invalidate' method the status bar also flickering:(. Is the GetClientRect retrieves the StatusBar area also? Thanks in Advance:) Ann

    C / C++ / MFC question help

  • DoModal returns -1
    A AnsGe

    hai, Thanks for ur reply. i know the exact reason why it retuns -1. bcoz one my ocx is not installed in the machine. But i want to capture the situation and want to display error message. I have done all hte initialisations in the InitInstance Thanks Ans

    C / C++ / MFC help question

  • DoModal returns -1
    A AnsGe

    Hai, I tried with ur help. But my problem still remains. If main window is successfully loaded then it is possible to show any mesagebox. But the main window Domodal() failed then it is not possible to show a MessageBox. The code snip running, but windows are not visible Thanks Anish

    C / C++ / MFC help question

  • Checking an ocx is installed or not
    A AnsGe

    Hai, Actually i don't know the internal structure about the used COM component. Its a 3rd party control and i have only know some functions in it. I dont know any classid and interface id's. So how can i call CoCreateInstance() Byy Anish

    C / C++ / MFC question

  • DoModal returns -1
    A AnsGe

    Hai All, In my application InitInstance method the DoModal() calling of main application dialog return -1(bcoz of some loading problem). but i want to capture it and show some error mesage. But i cann't show any error message or any other dialog when it returns -1. How i can i solve this problem. ANyone can have any idea? regards Ans

    C / C++ / MFC help question

  • Checking an ocx is installed or not
    A AnsGe

    Hai All, How can i check an ocx which is droped in my main application dialog is installed or not. I not used the CoCreateInstane function , but i directly placed the control in my dialog. The application crashes when the control is not installed. How can i avoid it? Thanks in Advance Ans

    C / C++ / MFC question

  • Rotating Polygons in fixed Angle
    A AnsGe

    Hai, In my application i want to rotate the Polygons i have drawn in a specifeid angle without using the RotateTrasnfom(bcoz a lot of other object are in my drawings). Nanyone have any idea about it? Thnaks in Advance

    Managed C++/CLI question

  • Cant intercommunicate between managed classes
    A AnsGe

    Hai, i dont know the what i am saying is correct. but ur probelm can be solved in this way. But this is not recommended if u have heavy updation in ur Form1 class. One more reason for my qucik response is that next four days will not here. simply pass a reference of ur textbox to the Form2 class ie Create a TExtbox object in ur Form2 class; TextBox* t1; Passes the reference of original one to this value in Constructor frm2->t1=this->textBox1; Now u can update the text in Button click as this->tt->Text="Updated Text"; By Anish If u find a good solution plz post it here

    Managed C++/CLI help c++ tutorial csharp

  • Cant intercommunicate between managed classes
    A AnsGe

    Hai U can done it very simply. Don't include or declare Form1 in Form2 . It will produce circular referencing. change ur code like this **Form1.h** #pragma once #include "Form2.h" namespace datapassing { public __gc class Form1 : public System::Windows::Forms::Form { public: Form2 *pFrm2; public: Form1(void) { InitializeComponent(); pFrm2 = new Form2; pFrm2->Owner=this; } private: System::Void button1_Click(System::Object * sender, System::EventArgs * e) { pFrm2->Visible = true; this->Visible = false; } }; } **Form2.h** #pragma once namespace datapassing { public __gc class Form2 : public System::Windows::Forms::Form { public: public: Form2(void) { InitializeComponent(); } private: System::Void button1_Click(System::Object * sender, System::EventArgs * e) { this->Owner->Visible = true; this->Visible = false; } }; } By Anish

    Managed C++/CLI help c++ tutorial csharp

  • String conversions
    A AnsGe

    Hai u can convert it using the InteropServices const char* str=(const char*)(System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi("ManagedString")).ToPointer(); By Anish

    Managed C++/CLI c++ help question

  • KeyDown problem
    A AnsGe

    hai, Sorry i dont know how it solve!!! Some where i found to override the ProcessmdKey method but i didn't get too much ideas If u solve the problem plz post it by ANish

    Managed C++/CLI help debugging

  • Strings
    A AnsGe

    Hai, You can comapre the Strings using the static Compare method in the String class ie String* str=S"HELLO"; if(String::Compare(str,"HELLO")==0) //ie Same { TextBox1 -> Text = "Same"; } else { TextBox1 -> Text = "Not The Same""; } SubString function done all the left, right and mid functionalities by Anish

    Managed C++/CLI csharp c++ help tutorial question

  • KeyDown problem
    A AnsGe

    Hai, I just copied your code and its works!!!! Sometimes the focus is not on your Form .

    Managed C++/CLI help debugging

  • Listbox: How to ensure that last item added is visible?
    A AnsGe

    Hai, u can simply solve the problem by selecting the last item. ie this->listBox1->SelectedIndex=this->listBox1->Items->Count-1;; ANish

    Managed C++/CLI tutorial question

  • Newbie: Undeclared Identifier
    A AnsGe

    Hai Nothing wrong in ur code. i also don't know why it happened. But placing your second class before the Form1 calss will solve the problem. ie define all your classes before it uses by Anisg

    Managed C++/CLI c++ help tutorial question

  • LOGFONT structure
    A AnsGe

    Hai, I couldn't get it. Also runtime exception occures even i type caste the LOGFONT structure. Can you show a simple piece of code using LOGFONT structure and Font::FromLogFont method thank u

    Managed C++/CLI question c++

  • Reading file from OpenFileDialog.
    A AnsGe

    Hai Alex, you can solve the problem with this help of FileStram class FileStream* fs; StreamReader* InputStream; OpenFileDialog* openFileDialog1 = new OpenFileDialog(); if(openFileDialog1->ShowDialog() == DialogResult::OK) { fs=new FileStream(openFileDialog->FileName,FileMode::Open); InputStream=new StreamReder(fs); //Then done your reading using InputStream } NB: please include using namespace System::IO;

    Managed C++/CLI question c++ wpf wcf oop
  • Login

  • Don't have an account? Register

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