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
T

Tara14

@Tara14
About
Posts
236
Topics
74
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • image size and type
    T Tara14

    Hi, I need to get the logo of the user and put it in my application. But it should be of about 5" X 5" and jpg/bmp type only. How do check these specifications in the image? I am using VC++6/MFC

    Thanks, Tara

    C / C++ / MFC c++ question

  • folder to VS IDE
    T Tara14

    I tried it. But sadly it does not work.:confused:

    Thanks, Tara

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

  • folder to VS IDE
    T Tara14

    Hi, My VC6 (MFC) project folder contains 60-70 files. I want to put all custom controls and common control class files into a folder and add that folder to my project workspace. I tried adding a new folder to the "file view" tab and then adding the files to it. But when I debug, I get the error that so-and-so file not found. Please can you tell me the correct way of doing this?

    Thanks, Tara

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

  • split string - better way?
    T Tara14

    Thank you. I shall look into ParseDateTime. Didn't know about that! Although for now, what you showed me (left,right, mid) is perfect for what I am trying to do.

    Thanks, Tara

    C / C++ / MFC question

  • split string - better way?
    T Tara14

    Wow! Thats nice. Thanks a billion.

    Thanks, Tara

    C / C++ / MFC question

  • split string - better way?
    T Tara14

    Hi, I have to split a string in the format mm/dd/yyyy. This is what I do:

    CString date,sMM,sDD,sYY,str;
    int	yy,mm,dd; 
    
    // date\_poleSet = CString object date in the format mm/dd/yyyy
    // the month,day and year have to be seperated into int mm,dd,yy
    
    int offset = date\_poleSet.Find('/');
    date = date\_poleSet;
    sMM = date\_poleSet.Left(offset); 
    mm = atoi(sMM); // gives the month
    str = date.Mid(offset+1);
    
    offset = str.Find('/');
    date = str;
    sDD = str.Left(offset);
    dd = atoi(sDD); // gives the day
    sYY = date.Mid(offset+1);
    yy = atoi(sYY); // gives the year
    

    Is this good enough? Or can it be done in two or three lines?

    Thanks, Tara

    C / C++ / MFC question

  • sql structure
    T Tara14

    Thank you for the reply. I am basically connecting to MS Access through my VC++ code. I tried the code that you have given and it works with a few parenthesis added. Thank you.

    Thanks, Tara

    Database database tutorial question

  • sql structure
    T Tara14

    I got it. Just needed to place a parenthesis.

    SELECT f.item, f.vendor, f.quote, v.phone, v.fax
    FROM ((SELECT item, min(quote) AS minprice FROM quote_tb WHERE ID='11' GROUP BY item)
    AS x INNER JOIN quote_tb AS f ON f.item = x.item AND f.quote = x.minprice)
    inner join vendor_tb as v on f.vendor = v.name

    Thank you for the help.

    Thanks, Tara

    Database database tutorial question

  • sql structure
    T Tara14

    Thank you for the reply. But for some reason, whatever way I try it doesn't seem to be working. I am connecting to MS Access database through VC++. In whatever way I try to add an extra 'inner join' it gives me the error : "Syntax error(missing operator) in query expression". If I remove the extra 'inner join' its all fine. Can't understand why. Is it something to do with the formatting? Thanks, Tara

    Thanks, Tara

    Database database tutorial question

  • sql structure
    T Tara14

    Hi, I have two table like this:

    quote_tb:

    ID item vendor quote
    11 a v1 100
    11 a v2 200
    11 b v1 400
    11 b v2 300
    11 c v1 555
    11 c v2 777
    22 a v1 122
    22 a v2 222
    22 b v1 322
    22 b v2 422
    22 c v1 555
    22 c v2 777

    vendor_tb

    name phone# fax# address#
    v1 1111 2222 3, x street
    v2 1212 2323 4, m street

    I am trying to write an sql that given me the following result:

    lowestQ_tb
    ID item vendor quote phone# fax#
    11 a v1 100 1111 2222
    11 b v2 300 1212 2323
    11 c v1 555 1111 2222

    i.e for each of the items a,b,c having the id(11) select the vendors that have the lease quote and then get the phone and fax numbers of the vendors form the table vendor_tb. To get the first part i.e. lowest quote for each item, this is the sql I use:

    SELECT f.item, f.vendor, f.quote
    FROM (SELECT item, min(quote) AS minprice FROM quote_tb WHERE ID='11' GROUP BY item)
    AS x INNER JOIN quote_tb AS f ON f.item = x.item AND f.quote = x.minprice

    which gives me the result:

    ID item vendor quote
    11 a v1 100
    11 b v2 300
    11 c v1 555

    I don't know how to take it further form here to get lowestQ_tb. Please can you tell me how to get the above desired result i.e tabele _lowestQ_tb_. Is it possible to do such a thing?

    Thanks, Tara

    Database database tutorial question

  • FTP?
    T Tara14

    Thanks.

    _


    Fortitudine Vincimus!_

    C / C++ / MFC database adobe sysadmin question announcement

  • FTP?
    T Tara14

    :)

    _


    Fortitudine Vincimus!_

    C / C++ / MFC database adobe sysadmin question announcement

  • FTP?
    T Tara14

    DavidCrow wrote:

    So the machines are not on the same intranet?

    No, they are not. The program will be deployed on the users personal computer and the database that will be manually modified/updated by the company will be hosted on its webserver. Just curious: how does our operating system (win XP) automatically connect to the net and download updates? What protocal does it use? Thanks, Tara

    _


    Fortitudine Vincimus!_

    C / C++ / MFC database adobe sysadmin question announcement

  • FTP?
    T Tara14

    DavidCrow wrote:

    Can't you just connect directly to the database on the remote machine?

    I guess for that, the user would need to be connected to the internet to work with the program. I don't want it that way. Bacically, I just need to update the prices of items in the database. Something like : User selects "Update price list" item in the program's menu - a dialog appears saying 'connecting...' - on establishing a connecting dialog says 'Updateing pirces..' and closes. Thanks, Tara

    _


    Fortitudine Vincimus!_

    C / C++ / MFC database adobe sysadmin question announcement

  • FTP?
    T Tara14

    DavidCrow wrote:

    Maybe that's the protocol he wanted to use to download the database file.

    Thats right. I assumed that in order to do what I am trying to, using FTP is the correct way.

    _


    Fortitudine Vincimus!_

    C / C++ / MFC database adobe sysadmin question announcement

  • FTP?
    T Tara14

    Hi, I am writing an application in VC6 that has a database, which needs to be updated periodically. The database is going to be .mdb, using DAO to interact with the program (I know this is supposed to be obsolete, but... i like it). To do this, I plan to get the program to connect to a web server where the new database is hosted, download it and replace the old one that is on the user’s computer. Please can you tell me if my approach is correct? Or, is there a better way to do this? How do MS Office, Adobe, win XP… etc update their programs? Thanks

    _


    Fortitudine Vincimus!_

    C / C++ / MFC database adobe sysadmin question announcement

  • PostMessage(WM_QUIT);
    T Tara14

    It turned out that the computers on which this was happening, after re-installing MS Office, the problem disappeared. I wonder why. Would you be having any idea? The program only uses the IE browser to display reports; nothing else that would clash with MS Office.:confused:

    _


    Fortitudine Vincimus!_

    C / C++ / MFC help c++ html

  • PostMessage(WM_QUIT);
    T Tara14

    Thanks. I have tried as you suggested. But the program still crashes. For some reason, it is happening on some XP systems. It doesn't happen on my computer. Also if the 'X' button is clicked or File-Exit is clicked there is no problem. I just don't understand why this is happening.

    _


    Fortitudine Vincimus!_

    C / C++ / MFC help c++ html

  • PostMessage(WM_QUIT);
    T Tara14

    Hi, I have an MFC (VC6) app that uses a splitter window. There are buttons on the left and info is displayed on the right. I have added a "Quit" button to the left splitter with the following code"

    void CControlPanel::OnBtnQuit()
    {
    PostMessage(WM_QUIT);
    }

    And some clean up operation is done in CResidentialEstimatorApp::ExitInstance()

    int CResidentialEstimatorApp::ExitInstance()
    {

        CString file;
    file = GetPath("tempEst","html");
    CleanUPm(file);
    
    return CWinApp::ExitInstance();
    

    }

    The program crashes sometimes when the 'Quit' button is clicked. I can't figure out why this is happening. If the program is closed using the 'X' button or File-Exit from the menu, there is no problem. Any help is highly appreciated! Thanks, Tara

    _


    Fortitudine Vincimus!_

    C / C++ / MFC help c++ html

  • WM_CTLCOLOR
    T Tara14

    Hi, I am using WM_CTLCOLOR to make the static text transparent and change the font and colour. Please can you tell me how to do the font-clean-up action if any is required here?

    HBRUSH CF4_NewEstimate::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
    {
    HBRUSH hbr = CResizableFormView::OnCtlColor(pDC, pWnd, nCtlColor);

    CFont \*m\_pFont = new CFont;
    m\_pFont->CreateFont(12,0,0,0,600,0,0,0,0,0,0,ANTIALIASED\_QUALITY,0,"MS Sans Serif");
    CFont \*pOldFont = NULL;
    

    // Make transparent static control
    switch (nCtlColor)
    {
    case CTLCOLOR_STATIC:
    pDC->SelectObject(m_pFont);
    hbr = (HBRUSH)::GetStockObject (HOLLOW_BRUSH);
    pDC->SetBkMode (TRANSPARENT);
    pDC->SetTextColor(RGB(255,128,0));

    	break;
    }
    
    
    return hbr;
    

    }

    Thanks.

    _


    Fortitudine Vincimus!_

    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