User Profile

Collapse

Profile Sidebar

Collapse
nd3r
nd3r
Last Activity: Dec 29 '06, 02:11 PM
Joined: Oct 16 '06
Location: Romania
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • nd3r
    started a topic How to do CString to char * convertion ???
    in C

    How to do CString to char * convertion ???

    Hy!
    The problem, is that I tried everything I could to convert. The following examples are already useless:


    //Example 1:
    CString text;
    char *ch_text = new char[text.GetLength( )+1];
    strcpy(ch_text, text);


    //Example 2:
    CString text;
    char *ch_text = text.GetBuffer( );
    ///some code////
    text.ReleaseBuf fer();


    //Example 3:
    CString...
    See more | Go to post

  • nd3r
    replied to MFC CString problem
    in C
    I found something and it works, but I don't know exactly if it is correct to use:
    if I typecast the hex, I don't have any problem ( winStr=(char)0x 0D ).
    See more | Go to post

    Leave a comment:


  • nd3r
    replied to MFC CString problem
    in C
    Nope!
    If I try:
    if(t[0]==0x0A)
    {}
    it works!
    So the problem is not there.
    And btw t is a reference variable.
    i will paste my code to show you the exact function.

    void CRSADlg::WriteO nScreen(CEdit t, CString &str)
    {
    CString winStr;

    t.GetWindowText W(winStr);
    t.SetSel(winStr .GetLength(),wi nStr.GetLength( ));

    winStr="";...
    See more | Go to post

    Leave a comment:


  • nd3r
    started a topic MFC CString problem
    in C

    MFC CString problem

    To get the proper idea of my problem, I think it would be best to show you a part of my code:

    void some_function(C Edit x, CString t)
    {
    CString w;
    //some code
    if ( t[0] == 0x0A)
    w=0x0D; //this is the line where I get the error
    }

    When I try to compile the code, I get the error:
    "error C2593: 'operator =' is...
    See more | Go to post

  • nd3r
    replied to How can I test if a value is assigned ?
    in C
    Thanks a lot guys. I guess I have some points of start in continuing my work. If any of you knows another solution besides inserting a field in structure, e.g. using some special function or creating another test variable, then please tell me. As I said I need the most efficient way in this matter.
    Thank you again!
    See more | Go to post

    Leave a comment:


  • nd3r
    started a topic How can I test if a value is assigned ?
    in C

    How can I test if a value is assigned ?

    I have a problem in my code.
    Let's say we have a variable named X, and X must be tested if any value is assigned to it, and if not, then X is assigned.
    I need to tell you that X is in fact a structure and I thought that the easiest way to do the test is to insert another field:
    typedef struct X
    {
    field 1;
    field 2;
    int test; ->>the test variable, which is 0 if X.field_1 is not assigned...
    See more | Go to post
No activity results to display
Show More
Working...