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
L

leonigah

@leonigah
About
Posts
21
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Creating a Registry Value in C++/CLI environment
    L leonigah

    using namespace Microsoft::Win32; Registry::SetValue("HKEY_CURRENT_USER\\SOFTWARE\\MyPath", "Desired_Value_Name", "Value");

    Nigah M Manzoor

    Managed C++/CLI help c++ windows-admin question workspace

  • Visual c++ Net Designer Class disapear [modified]
    L leonigah

    your form class should be first class in the namespace, if there is other class before your form class, move that class.

    Nigah M Manzoor

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

  • Write XL File from C++.Net
    L leonigah

    Microsoft::Office::Interop::Excel::Application^ exl = gcnew Microsoft::Office::Interop::Excel::ApplicationClass(); FileInfo^ file = gcnew FileInfo("c:\\leonigah.xls"); Workbook^ wb = exl->Workbooks->Open("c:\\leonigah.xls", 0, false, 5,"", "", true, Microsoft::Office::Interop::Excel::XlPlatform::xlWindows, "\t", false, false,0, true, true, 0); Worksheet^ ws = static_cast<Worksheet^> (exl->ActiveSheet); Range^ rn = (Range^)ws->Cells[2, 4];//2=row;4=column rn->Value2 = "leonigah";

    Nigah M Manzoor

    modified on Wednesday, July 23, 2008 8:13 AM

    Managed C++/CLI csharp c++

  • How to resize control when screen resolution changed?
    L leonigah

    double xRatio = GetSystemMetrics(SM_CXSCREEN) / 800.00; double yRatio = GetSystemMetrics(SM_CYSCREEN) / 600.00; rect.left = long((rect.left/1.28)*xRatio); rect.top = long((rect.top/1.28)*yRatio); rect.bottom = long((rect.bottom/1.28)*yRatio); rect.right = long((rect.right/1.28)*xRatio);

    Nigah M Manzoor

    C / C++ / MFC oop help tutorial question

  • syntaxhighlighting
    L leonigah

    open or create usertype.dat file in a notepad and defined your keyword and save in folder where devenv.exe exist. C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\usertype.dat

    Nigah M Manzoor

    Managed C++/CLI question

  • Convert System::String^ to char* array
    L leonigah

    array<wchar_t>^ szArray = strPath->ToCharArray(); char buffer[50]={0}; int i = 0; for each(wchar_t ch in szArray) buffer[i++] = ch;

    Nigah M Manzoor

    Managed C++/CLI question data-structures

  • Can I use FOR EACH on an array of structures?
    L leonigah

    for each(myStruct in myStructArray) { //code segments }

    Nigah M Manzoor

    Managed C++/CLI csharp c++ visual-studio data-structures question

  • TextBox
    L leonigah

    void OnKeyPress(System::Windows::Forms::KeyPressEventArgs^ e)override { if((e->KeyChar=='.')) { if(this->Text->Contains(".")) e->Handled = true; } if(!(wchar_t::IsDigit(e->KeyChar) || wchar_t::IsControl(e->KeyChar))) e->Handled = true; }

    Nigah M Manzoor

    Managed C++/CLI question

  • Resizing Static Text control
    L leonigah

    use GetDlgItem(IDC_STATIC1)->GetWindowRect(rect); ScreenToClient(&rect); instead of GetDlgItem(IDC_STATIC1)->GetClientRect(rect);

    Nigah M Manzoor

    C / C++ / MFC

  • Resizing Static Text control
    L leonigah

    BOOL CMyDlg::OnInitDialog() { CDialog::OnInitDialog(); CString str; CRect rect; GetDlgItem(IDC_STATIC1)->GetWindowText(str); int iLen = str.GetLength(); int iWidth = 8*iLen;//assume 8 pixel per character GetDlgItem(IDC_STATIC1)->GetWindowRect(rect); rect.right = iWidth; GetDlgItem(IDC_STATIC1)->MoveWindow(rect); return TRUE; }

    Nigah M Manzoor

    modified on Tuesday, July 1, 2008 7:58 AM

    C / C++ / MFC

  • Increasing font size of text in static text box
    L leonigah

    What is static Text Box?

    Nigah M Manzoor

    C / C++ / MFC tutorial

  • text change
    L leonigah

    you have to use both event handler in OnKeyPress you know which key has been pressed and in OnTextChanged you can set the font and other things.

    Nigah M Manzoor

    Managed C++/CLI

  • common variables
    L leonigah

    create a public property in a form and by setting its property you can change the value //declaring property in CForm1 private: int abc; public : property int ABC { int get() { return abc; } void set(int value) { abc = value; } } // using property in CForm2 #include "Form1.h" CForm1^ frm = gcnew CForm1(); frm->ABC = 123;

    Nigah M Manzoor

    Managed C++/CLI question help

  • DataGridView Cell Format
    L leonigah

    for float type variable : bool bFloat = false; int i = 0; for each (wchar_t ch in e->FormattedValue->ToString()->Trim()) { if(!wchar_t::IsDigit(ch)) { if(ch=='.' && i == 0) { bFloat = false; i++; } else bFloat = true; } }

    Nigah M Manzoor

    Managed C++/CLI c++ question

  • DataGridView Cell Format
    L leonigah

    System::Void grid_CellValidating(System::Object^ sender, System::Windows::Forms::DataGridViewCellValidatingEventArgs^ e) { bool bInt = false; for each (wchar_t ch in e->FormattedValue->ToString()->Trim()) if(!wchar_t::IsDigit(ch)) bInt = true; if(e-->ColumnIndex==2)//Quantity { if(bInt) ;//DO else return; } }

    Nigah M Manzoor

    Managed C++/CLI c++ question

  • To load CrystallReport report with pameters
    L leonigah

    http://www.codeguru.com/cpp/cpp/cpp\_mfc/templates/article.php/c12721/ use above links to learn about crystal report.

    Nigah M Manzoor

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

  • Login& Logout Time
    L leonigah

    #include #include #include #pragma comment (lib, "ActiveDS.lib") #pragma comment (lib, "Adsiid.lib") void CSysInfoDlg::OnOK() { IADsContainer *pCont = NULL; CString str = "WinNT://DOMEN_NAME"; HRESULT hr = ADsGetObject(str.AllocSysString(), IID_IADsContainer, (void**) &pCont ); if(!SUCCEEDED(hr)) return; ULONG ulFetched = 0L; _variant_t var; _variant_t vChild; IEnumVARIANTPtr pEnum; ADsBuildEnumerator(pCont,&pEnum); while((SUCCEEDED(ADsEnumerateNext(pEnum, 1, &vChild, &ulFetched)) && ulFetched==1)) { IADsUser* pADs = NULL; hr = V_DISPATCH(&vChild)->QueryInterface(IID_IADsUser, (void**)&pADs); if(hr!=S_OK) break; DATE din = 0; pADs->get_LastLogin(&din); COleDateTime d(din); CString strIn = d.Format("%d-%m-%Y %H:%M"); DATE dout = 0; pADs->get_LastLogoff(&dout); COleDateTime d1(dout); CString strOut = d1.Format("%d-%m-%Y %H:%M"); BSTR bstrName; pADs->get_Name(&bstrName); CString strName = bstrName; SysFreeString(bstrName); pADs->Release(); pADs = NULL; MessageBox(strIn+"=="+strOut, strName); } if(pCont) pCont->Release(); }

    Nigah M Manzoor

    C / C++ / MFC tutorial question

  • Login& Logout Time
    L leonigah

    thanx, its working

    Nigah M Manzoor

    C / C++ / MFC tutorial question

  • Login& Logout Time
    L leonigah

    thanx,

    Nigah M Manzoor

    C / C++ / MFC tutorial question

  • Login& Logout Time
    L leonigah

    How to get Windows user's Login and Logout time?

    Nigah M Manzoor

    C / C++ / MFC tutorial 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