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

Lockhart

@Lockhart
About
Posts
34
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Dialog Editor doesn't show the form [image inside]
    L Lockhart

    Screenshot The form keeps staying in the upper left corner and I cant add/modify any control :( Any help appreciated, Francesco.

    Visual Studio help

  • VisualStudio - ClassView / Gloabs : missed functions
    L Lockhart

    Thanks for the trick :)

    C / C++ / MFC question workspace

  • VisualStudio - ClassView / Gloabs : missed functions
    L Lockhart

    Ah, thanks :( is there no way to let class view to display them? Class interfaces are displayed, and I supply only .h files for them (implementation reside in .libs).

    C / C++ / MFC question workspace

  • VisualStudio - ClassView / Gloabs : missed functions
    L Lockhart

    I have included an header in my project in which are listed some function headers... eg: [code]//////////////// // NGNBASIC.H // //////////////// #ifndef NGNBASIC_H #define NGNBASIC_H float ngn_sign(float f); float ngn_rad2deg(float radiant); float ngn_deg2rad(float degrees); #endif[/code] I espect that these function appear under the "globals" labed in Class View, but this doesn't happen... instead, in another workspace where I work to produce the lib owned by that header, they are listed. What am I doing wrong? :confused: Thanks in advance for your time.

    C / C++ / MFC question workspace

  • Whenever I add a CEdit I have to "Rebuild all"
    L Lockhart

    Thanks! There was an heaeder in "stdafx.h" that included an header that included an header tht included "resource.h" :)

    C / C++ / MFC help question

  • Whenever I add a CEdit I have to "Rebuild all"
    L Lockhart

    The project I'm working on is quite big now, but I don't think it's messed up too much :) What's happen? Some weeks ago this situation started: everytime I add a CEdit or any other item to a CDialog based class, I have to "Rebuild All" the project because the compiler tells me that it can't find "IDC_XXX" identifier. Can anyone help me? Thanks in advance.

    C / C++ / MFC help question

  • fseek() - generic question dued to a problem
    L Lockhart

    I'm rewriting the functions using fstream, if you say fstream acts better, I trust you :) Thanks for the advice :)

    C / C++ / MFC help question tutorial

  • fseek() - generic question dued to a problem
    L Lockhart

    Only because I'm in the abit of using them, so I can reuse some old code :) Do you suggest me using ifstream instead ?

    C / C++ / MFC help question tutorial

  • fseek() - generic question dued to a problem
    L Lockhart

    It's C++, MFC app. By now I have solved with something like this:

    while (fread(id,sizeof(char),32,f) != 0)
    {
    // almost same stuff here
    }

    But I thought that it had should exit if fseek() seeks the position over the EOF marker...

    C / C++ / MFC help question tutorial

  • fseek() - generic question dued to a problem
    L Lockhart

    Ok, but does feof() take care of a previous fseek() ? This loop never exits in a test program I've done... try it out plz if you can:

    FILE* f;
    long i;

    f = fopen("c:\\a.txt","rb");

    i = 0;

    while (!feof(f))
    {
    fseek(f,i++,SEEK_SET); // seeks at 0,1,2,3,... until reach EOF (?)
    }

    fclose(f);

    The file "a.txt" contains three simple characters.

    C / C++ / MFC help question tutorial

  • fseek() - generic question dued to a problem
    L Lockhart

    I have a save-file from my program so structured:

    char id[32]; // "DATASET_1"
    int blocksize;
    :
    : <- various data for an amount of 'blocksize' bytes
    :

    char id[32]; // "DATASET_2"
    int blocksize;
    :
    : <- various data for an amount of 'blocksize' bytes
    :

    char id[32]; // "DATASET_3"
    int blocksize;
    :
    : <- various data for an amount of 'blocksize' bytes
    :

    With a generic number of "DATASET_#" When I try to load the file, I use code similiar to this:

    char id[32];
    int blocksize;
    FILE* f;

    f = fopen(filename, "rb");

    while (!feof(f))
    {
    fread(id,sizeof(char),32,f); // read id
    fread(&blocksize,sizeof(int),1,f); // read blocksize

    if (strcmp(id,"DATASET\_1") == 0)
    {
    	fread( /\*  appropriate reading here \*/);
    }
    else if (strcmp(id,"DATASET\_2") == 0)
    {
    	fread( /\*  appropriate reading here \*/);
    }
    else // DATASET unknown
    {
    	// skip unknow block of data
    	fseek(f,blocksize,SEEK\_CUR);
    }
    

    }//while

    fclose(f);

    When I do this, the while loop never exits if, for example, the last dataset is unknown, it seems that the fseek() function has no effect on the next "while (!feof(f))" call. I must take care of something about fseek under NT or WinXP or I must look for an error elsewhere ? By now, I assume the data to be written well. Thanks in advance for any suggestion.

    C / C++ / MFC help question tutorial

  • MSDE users and passwords
    L Lockhart

    I'm going to search for the XP version of the admin extensions, if they exist. Thanks.

    Database question database sql-server sysadmin tools

  • MSDE users and passwords
    L Lockhart

    I'm using ADO to interface with MSDE (Microsoft SQL Server 7) but I still have some doubts: 1. What the 'sa' UserID ? Can I use it from my app ? 2. How can I create new accounts (userid+password) for the SQL Servers ? (no NT accounts) I have scanned all options of the "osql.exe" utility but I have found nothing. Thanks in advance.

    Database question database sql-server sysadmin tools

  • WinXP symbols - VC does not find them
    L Lockhart

    I've Windows XP, VC + SP5 I've installed (windowsxp.x86.fre.rtm.symbols.exe) but when I debug my application still they are not found: [...] Loaded 'C:\WINDOWS\system32\ole32.dll', no matching symbolic information found. [...] But "C:\WINDOWS\SYMBOLS\DLL\ole32.pdb" exists, it's been installed by the exe above. I heard about a problem with 'pdb' files and about some changes to do in the registry under DevStudio but I don't remember more :( Any help? Thanks in advance.

    C / C++ / MFC help windows-admin debugging question

  • msado15.dll missing
    L Lockhart

    Oh, thanks a lot, you have saved me... I used "Find" but nothing showed up (...) I found it in c:\Program Files\Common Files\System\ado\ as you wrote. Thanks again :) :)

    Database

  • msado15.dll missing
    L Lockhart

    I can't run the code from the articles from CPj site. I haven't msado15.dll. I have downloaded and installed MDAC 2.7. I'm running WindowsXP. VC6 + SP5. MSDE + MSSQLServer 7

    Database

  • VC++ 6.0 string bug ? (take a look plz)
    L Lockhart

    I have reinstalled, now all works... Thanks for your time

    C / C++ / MFC help c++ debugging performance question

  • VC++ 6.0 string bug ? (take a look plz)
    L Lockhart

    I have a little experience with ASM, learnt at Uni and played at home, I'll give a look at it but maybe another problem has come out. I have installed WinXP few weeks ago and I notice that no symbols are found during debugging. Maybe I have to download this 150MB package from MS site (windowsxp.x86.fre.rtm.symbols.exe) Another strange thing appened: if I put AfxMessageBox(s1) before strcpy(), the bug vanishes: void Buggy( char* result ) { char s1[6]; char s2[5]; strcpy(s1,"abcde"); strcpy(s2,"BUG!"); AfxMessageBox(s1); // DOESNT WORK strcpy(result,"anystring"); strcat(result,s1); } It displays "abcde" and 'result' is filled with "anystringabcde". If I comment out AfxMessageBox(s1) 'result' is filled with "anystringBUG!". I have made several programs, some little, others bigger, but I had never seen these strange beahviours, especially because on other PCs compiles fine. I must admit that I'm not expert in debugging, I prefer to proceed slowly, and run the program just after having added/removed some lines of code. Lately I have installed and removed MySQL, MSDE, various ServicePacks, maybe something has been wrong and I didn't notice.

    C / C++ / MFC help c++ debugging performance question

  • VC++ 6.0 string bug ? (take a look plz)
    L Lockhart

    I have found the article, thanks! Very interesting http://www.codeproject.com/debug/survivereleasever.asp) But life is hard: I have turned on debugging information for Release and the compiler gives me this error asa I press F5: "Command line error D2016 : '/ZI' and '/O2' command-line options are incompatible" /O2 is the parameter for the Optimization->MazimixeSpeed, and if I turn it OFF the bug doesn't appear, so debugging is useless in this case! Nice... Maybe I have to reinstall, I don't know

    C / C++ / MFC help c++ debugging performance question

  • VC++ 6.0 string bug ? (take a look plz)
    L Lockhart

    This is a very strange problem... rebooted, underclocked the processor, I have no idea... it still gives me different results: In Debug "anystringabcde" In Release "anystringBUG!" When Optimizations is MazimizeSpeed(default setting) Thanks for your time :(

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