Click here to Skip to main content
16,007,687 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSending mails using MAPI... Pin
Neha27-Aug-02 2:54
Neha27-Aug-02 2:54 
GeneralRe: Sending mails using MAPI... Pin
Michael P Butler27-Aug-02 3:18
Michael P Butler27-Aug-02 3:18 
GeneralTask bar Pin
suresh_sathya27-Aug-02 2:54
suresh_sathya27-Aug-02 2:54 
GeneralRe: Task bar Pin
User 665827-Aug-02 3:05
User 665827-Aug-02 3:05 
GeneralRe: Task bar Pin
Rickard Andersson2027-Aug-02 4:31
Rickard Andersson2027-Aug-02 4:31 
GeneralRe: Task bar Pin
User 665827-Aug-02 6:58
User 665827-Aug-02 6:58 
GeneralRe: Task bar Pin
Tomasz Sowinski27-Aug-02 3:12
Tomasz Sowinski27-Aug-02 3:12 
GeneralUrgent CStringArray help needed Pin
BK Pradeep27-Aug-02 2:34
BK Pradeep27-Aug-02 2:34 
Hi all,
Below is the code snippet and at the end is the questions.


class{
CStringArray *m_pstringarray;
...
...
};

fun1(CWnd hwnd)
{
CString temp;
hwnd.Getwindowtext(temp)
m_pstringarray->Add(temp);
}

fun2()
{
CString str = m_pstringarray->GetAt(1);
if(strcmp(str,"dialog editor")
{
}
}

Now the question is whether
a.what actually does stringarray "Add" do??
b.Do i need to make "cstring temp" in fun1 heap allocate or static allocate will do?(that is should the string exist even after adding to the string array?)
c.if i do RemoveAll for the string array, will deallocation of the memory of the strings takes place?

Thanks for your patient reading.
waiting for your reply.

Regards
Pradeep
GeneralRe: Urgent CStringArray help needed Pin
Tomasz Sowinski27-Aug-02 2:37
Tomasz Sowinski27-Aug-02 2:37 
GeneralRe: Urgent CStringArray help needed Pin
BK Pradeep27-Aug-02 2:49
BK Pradeep27-Aug-02 2:49 
GeneralRe: Urgent CStringArray help needed Pin
Tomasz Sowinski27-Aug-02 2:52
Tomasz Sowinski27-Aug-02 2:52 
GeneralRe: Urgent CStringArray help needed Pin
BK Pradeep27-Aug-02 3:01
BK Pradeep27-Aug-02 3:01 
GeneralRe: Urgent CStringArray help needed Pin
Philip Patrick27-Aug-02 2:56
professionalPhilip Patrick27-Aug-02 2:56 
GeneralRe: Urgent CStringArray help needed Pin
BK Pradeep27-Aug-02 21:13
BK Pradeep27-Aug-02 21:13 
GeneralSending Keypress to an HWND Pin
D3z27-Aug-02 2:20
D3z27-Aug-02 2:20 
GeneralRe: Sending Keypress to an HWND Pin
Tomasz Sowinski27-Aug-02 2:36
Tomasz Sowinski27-Aug-02 2:36 
GeneralRe: Sending Keypress to an HWND Pin
D3z27-Aug-02 14:23
D3z27-Aug-02 14:23 
GeneralScreen Designer Source Pin
pinkcomponents27-Aug-02 2:15
pinkcomponents27-Aug-02 2:15 
Generalsound blaster Pin
sharonharoni27-Aug-02 0:50
susssharonharoni27-Aug-02 0:50 
GeneralRe: sound blaster Pin
pankajdaga27-Aug-02 0:57
pankajdaga27-Aug-02 0:57 
GeneralB+ tree source code Pin
Wanderley M27-Aug-02 0:46
Wanderley M27-Aug-02 0:46 
GeneralDisplaying Bitmap Pin
Shibu27-Aug-02 0:42
Shibu27-Aug-02 0:42 
GeneralRe: Displaying Bitmap Pin
Christian Graus27-Aug-02 1:16
protectorChristian Graus27-Aug-02 1:16 
GeneralC++ syntax question Pin
pankajdaga27-Aug-02 0:39
pankajdaga27-Aug-02 0:39 
GeneralRe: C++ syntax question Pin
Tomasz Sowinski27-Aug-02 0:47
Tomasz Sowinski27-Aug-02 0:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.