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
C

Cheickna

@Cheickna
About
Posts
20
Topics
18
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how I show *.mdb table on a dialog ?
    C Cheickna

    Hi, You can use ListCtrl to do this. But you must write an sql query and insert data yourself. Property 'Datasource' don't exists in listrcl cheickna

    C / C++ / MFC question

  • I need help to display a dialog from Resource-only DLL
    C Cheickna

    Hi, I created a resource-only Dll to store string, dialog, icon and bitmap. With loadstring function i can load a string from this dll, but i don't know how dipslay a dialog from it. here is my code : UINT CDataResource::GetResourceDialog(int ResourceID) { // load resource LPCDLGTEMPLATE lpDialogTemplate = NULL; HGLOBAL hDialogTemplate = NULL; HINSTANCE hInst = AfxFindResourceHandle(MAKEINTRESOURCE(ResourceID), RT_DIALOG); HRSRC hResource = ::FindResource(hInst, MAKEINTRESOURCE(ResourceID), RT_DIALOG); hDialogTemplate = LoadResource(hInst, hResource); if (hDialogTemplate != NULL) lpDialogTemplate = (LPCDLGTEMPLATE)LockResource(hDialogTemplate); else return 0; ASSERT(lpDialogTemplate != NULL); // HERE I WANT TO DISPLAY MY DIALOG // free resource UnlockResource(hDialogTemplate); FreeResource(hDialogTemplate); return 1; } Thanks in advance

    C / C++ / MFC graphics help learning

  • READ FROM RESOURCE FILE
    C Cheickna

    Hi, I want to read version number and company name from RC File at run time. How can i do this ? Thanks in advance

    C / C++ / MFC question announcement learning

  • Problem with WM_CTLCOLOR
    C Cheickna

    Hi, I want to use OnCtlColor message to change the backgroung color of a Dialog. I use it like this : //in my header file : CBrush m_Brush; //in my source (cpp) file, in OnInitDialog : m_Brush.CreateSolidBrush(RGB(212,212,226)); //Then, in OnCtlColor message HBRUSH MyClass::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { return m_brush; } It work, BUT THE BACKGROUNG COLOR OF ALL MY EDIT CONTROL ON THIS DIALOG are paint also by the bush. Is There any way to keep the back color of an edit control to white by default ? Thanks in advance

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

  • HOW TO CLOSE AN APP WITH ANOTHER
    C Cheickna

    No i don't want to kill a third party application. The two application are mine ( created with visual C++6.0) Thanks

    C / C++ / MFC help tutorial

  • HOW TO CLOSE AN APP WITH ANOTHER
    C Cheickna

    Hi, I have two applications and want to close one by clicking on command button from the other application. I know that i must use theses functions : CreateMutex, OpenMutex, FindWindow , ... But i don't know how to realize this action Can anybody help me . Thanks in advance

    C / C++ / MFC help tutorial

  • VB PRINTER OBJECT PROBLEM
    C Cheickna

    Hi Every body I want to use VB object printer to print some informations exactly at a position (x, y) on paper. I understand each printer has its own idea of what the printable area of the paper is. Therefore i use Windows API to check left and top margin before sending data to printer. I retrieve theses informations like this : MarginLeft = GetDeviceCaps(Printer.hdc, PHYSICALOFFSETX) MarginTop = GetDeviceCaps(Printer.hdc, PHYSICALOFFSETY) With my own printer MarginLeft = 42 pixels ( 2.96666 mm ) idem for MarginTop Now, i tried to print a dot (.) at position (0,0) like this, just to check: Printer.CurrentX=0 Printer.CurrentY=0 Printer.print "." On my paper (A4) i obtain this result with ruler : Left Margin = 2.9666 mm (~ 3 mm) BUT Top margin ~ 6 mm. I dont understand why Top margin is 6 mm insted of 3 Is there any way to know where come this more 3 mm ? Is there any way to set to force printer Unprintable area ? Thanks in advance Cheickna

    Visual Basic json help question

  • I need some help about Vb Object printer
    C Cheickna

    Hi, When i use this code : Printer.ScaleMode = vbMillimeters Printer.Orientation = vbPRORPortrait Printer.PaperSize = vbPRPSA4 Printer.CurrentX =100 Printer.CurrentY =100 Printer.Print "." Printer.EndDoc if i check the result, this "." is printed at position X=103 and Y=106 I dont understand why i obtain X+3 and Y+6 Thanks in advance for any help

    Visual Basic help

  • I want to hide command line window
    C Cheickna

    HI, I create an windows service in visual C++ 6.0. To install my service i use following command line : MyService -install I want to execute this command by program for exemple by a process or Shellexecute function. It's work well but the black command line window always display. Is there any way to hide this window ? Thanks in advance Cheickna

    C / C++ / MFC c++ question

  • Problem to create an .mdb File using ODBC
    C Cheickna

    Hi, I want to create an .mdb file using ODBC like : CDatabase database; CString sDriver = "Microsoft Access Driver (*.mdb)"; CString sSql; CString strSQL; // Build the creation string for access without DSN sSql.Format("DRIVER={%s};DSN='';FIRSTROWHASNAMES=1;READONLY=FALSE; CREATE_DB=\%s\;DBQ=%s", sDriver, "F:\\TEMP\\DATABASE.MDB", "DATABASE"); // Create the database if( database.OpenEx(sSql,CDatabase::noOdbcDialog) ) { //... } OpenEx function return the following error message : "File ('inconnu') not found..... Connect string attribut non valid..." Thank for help

    C / C++ / MFC help database

  • Problem with SQL FETCH
    C Cheickna

    Hi, I have some problem with this query i execute under visual C++6.0 "SELECT Nom, CodePostal, Sum(Montant) AS MontantRemb, DateTraitement FROM TClient GROUP BY Nom, CodePostal, Montant,DateTraitement HAVING (((DateTraitement)=#09/05/2002#));" In Microsoft Access interface it work well but if i execute it via ODBC like this : retcode = SQLExecDirect(m_hstmt,(SQLCHAR*)strSQL, SQL_NTS); this isntruction work also but i have a problem with SQL Fetch: while (( retcode = SQLFetch(m_hstmt))!= SQL_NO_DATA) { SQLGetData(m_hstmt, 1, SQL_C_CHAR, szNomClient, 25, &cbName); SQLGetData(m_hstmt, 2, SQL_C_CHAR, szCodePostal, 6, &cbName); SQLGetData(m_hstmt, 3, SQL_C_CHAR, szMontant, 16, &cbName); SQLGetData(m_hstmt, 4, SQL_C_CHAR, szDateTraitement, 11, &cbName); }Here retcode return 100 and i can't obtain my data Thanks in advance for any help

    C / C++ / MFC c++ database help

  • Problem with SQL FETCH
    C Cheickna

    Hi, I have some problem with this query i execute under visual C++6.0 "SELECT Nom, CodePostal, Sum(Montant) AS MontantRemb, DateTraitement FROM TClient GROUP BY Nom, CodePostal, Montant,DateTraitement HAVING (((DateTraitement)=#09/05/2002#));" In Microsoft Access interface it work well but if i execute it via ODBC like this : retcode = SQLExecDirect(m_hstmt,(SQLCHAR*)strSQL, SQL_NTS); this isntruction work also but i have a problem with SQL Fetch: while (( retcode = SQLFetch(m_hstmt))!= SQL_NO_DATA) { SQLGetData(m_hstmt, 1, SQL_C_CHAR, szNomClient, 25, &cbName); SQLGetData(m_hstmt, 2, SQL_C_CHAR, szCodePostal, 6, &cbName); SQLGetData(m_hstmt, 3, SQL_C_CHAR, szMontant, 16, &cbName); SQLGetData(m_hstmt, 4, SQL_C_CHAR, szDateTraitement, 11, &cbName); }Here retcode return 100 and i can't obtain my data Thanks in advance for any help

    Database c++ database help

  • Get the size of a specified folder
    C Cheickna

    Hi, I want to get the size of a specified folder like this : HANDLE hDir = CreateFile ("C:\\MyFolder", GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); Then i pass a directory handle to the GetFileSize function DWORD isize = GetFileSize(hDir, NULL /*lpfilesize*/ ); This code don't work. I try this second function : PLARGE_INTEGER lpFileSize; GetFileSizeEx( hDir, lpFileSize ); It don't work Can anybody help me. Thanks in advance

    C / C++ / MFC help

  • Problem to install DAO Components
    C Cheickna

    Hi, When i try to install DAO components (Jet 3.5) on Windows NT WorkStation or Server, the following error message appear: Another application is currently using JET file, close all applications and continue. I try to follow the resolution method ( Q169497 ) to resolve this problem but it don't work. Anybody can help me to solve this problem? Thanks in advance Cheickna

    Database help sysadmin question

  • Problem with CDaoRecordset "Too few parameters. Expected 1"
    C Cheickna

    Hi, I Use Visual C++ 6.0 and an access Database. I want to execute a SQL statement with CDaoRecordset. This error message occurs : "Too few parameters. Expected 1" when i use Open method. My SQL statement is longer than 256 characters ( about 1100 ). The problem is here it seems. If i run This query directly in Microsoft Access, it work. Is there any method to execute un SQL Statement like this in DAO ( CDaoDatabase ) ??? Thanks in advance Regards,

    C / C++ / MFC database c++ help question

  • Problem to get computer name
    C Cheickna

    Hi, Here is a function (above) to browse Computers names on network. It work but I have a problem to get the name of machine which is selected. If i use this call : CString strDir = BrowseForFolder(m_hWnd, "Select a folder", 0 ); with browseInfo.pidlRoot=NULL; I obtain the name of folder selected. BUT WITH THIS CALL CString strDir = BrowseForFolder(m_hWnd, "selected a computer", BIF_BROWSEFORCOMPUTER ); with browseInfo.pidlRoot=(_ITEMIDLIST *)0x12; The function browse very match only computer but my variable strDir is empty at the end. I try to use this other function : SHGetSpecialFolderPath(hWnd,szBuffer,CSIDL_NETHOOD ,0); but i have a entry point problem to shell32.dll Can anybody help me to get computer name? Function ================================================================================ CString& CTestDlg::BrowseForFolder(HWND hWnd, LPCSTR lpszTitle, UINT nFlags) { static CString strResult = ""; LPMALLOC lpMalloc; // pointer to IMalloc if (::SHGetMalloc(&lpMalloc) != NOERROR) return strResult; // failed to get allocator char szDisplayName[_MAX_PATH]; char szBuffer[_MAX_PATH]; BROWSEINFO browseInfo; browseInfo.hwndOwner = hWnd; // set root at Network Neighborhood ( if NULL then set root at Desktop ) browseInfo.pidlRoot = (_ITEMIDLIST *)0x12; browseInfo.pszDisplayName = szDisplayName; browseInfo.lpszTitle = lpszTitle; browseInfo.ulFlags = nFlags; browseInfo.lpfn = NULL; // not used browseInfo.lParam = 0; // not used LPITEMIDLIST lpItemIDList; if ((lpItemIDList = ::SHBrowseForFolder(&browseInfo)) != NULL) { // Get the path of the selected folder from the // item ID list. if (::SHGetPathFromIDList(lpItemIDList, szBuffer)) { // At this point, szBuffer contains the path // the user chose. if (szBuffer[0] == '\0') { // SHGetPathFromIDList failed, or // SHBrowseForFolder failed. //AfxMessageBox(IDP_FAILED_GET_DIRECTORY,MB_ICONSTOP|MB_OK); return strResult; } // We have a path in szBuffer! // Return it. strResult = szBuffer; return strResult; } else { // The thing referred to by lpItemIDList // might not have been a file system object. // For whatever reason, SHGetPathFromIDList // didn't work! //AfxMessageBox(IDP_FAILED_GET_DIRECT

    C / C++ / MFC help sysadmin regex question

  • Concatenate two Files in C++
    C Cheickna

    I want to concatenate two files like Dos prompt. Example : COPY File1.txt+File2.txt File3.txt Thanks in advance

    C / C++ / MFC c++ tutorial

  • Problem to refresh modeless dialog
    C Cheickna

    Hi every body, During long processing, i display a modeless dialog like this : CModelessDlg * DlgAttente; // CModelessDlg is my class DlgAttente = new CModelessDlg; DlgAttente->Create(IDD_DIALOG_ATTENTE,this); DlgAttente->ShowWindow(SW_SHOW); DlgAttente->m_Message="Please wait, processing is being......"; DlgAttente->UpdateData(FALSE); m_message is a variable bind to CStatic control ( label ). It shows my messages. This code work well, but if i display another window, for example, windows explorer, Bloc Notes, then close it, my modeless dialog don't refresh. The message show on it by my CStatic disappear without trace. Can anybody help me ?? Thanks in advance

    C / C++ / MFC help debugging tutorial question

  • How can i insert code at current position withing Vc IDE like from VB Add In ???
    C Cheickna

    Hi every body, Here's an example in Visual Basic to write directly code in VB code window Dim lngStartLine As Long Dim lngStartCol As Long Dim lngEndLine As Long Dim lngEndCol As Long ' determine current location in code window VBInstance.ActiveCodePane.CodeModule.CodePane.GetSelection lngStartLine, lngStartCol, lngEndLine, lngEndCol ' insert ADO code at current position VBInstance.ActiveCodePane.CodeModule.InsertLines lngStartLine, GenADOCode ......... ......... I want to realize the same operation in Visual C++ 6.0 IDE Can anybody help me ? Thanks in advance Excuse me for my poor english

    C / C++ / MFC c++ question visual-studio help

  • How to print MshFlexgrid in VC++ ?
    C Cheickna

    Hi, Can anybody give me some informations or samples code about printing MSHFlexgrid data and structure in VC++ ? Thanks in advance

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