Click here to Skip to main content
15,895,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionunicode to ascii Pin
asdtry4-Feb-07 22:43
asdtry4-Feb-07 22:43 
QuestionRe: unicode to ascii Pin
David Crow5-Feb-07 3:17
David Crow5-Feb-07 3:17 
AnswerRe: unicode to ascii Pin
toxcct5-Feb-07 4:19
toxcct5-Feb-07 4:19 
AnswerRe: unicode to ascii Pin
ThatsAlok6-Feb-07 20:14
ThatsAlok6-Feb-07 20:14 
QuestionStatusBar Question in MFC Pin
T.RATHA KRISHNAN4-Feb-07 22:34
T.RATHA KRISHNAN4-Feb-07 22:34 
AnswerRe: StatusBar Question in MFC Pin
kasturi_haribabu4-Feb-07 23:10
kasturi_haribabu4-Feb-07 23:10 
AnswerRe: StatusBar Question in MFC Pin
freeman8685-Feb-07 15:11
freeman8685-Feb-07 15:11 
QuestionRe: StatusBar Question in MFC [modified] Pin
T.RATHA KRISHNAN5-Feb-07 21:10
T.RATHA KRISHNAN5-Feb-07 21:10 
void CPerspectiveDoc::OnShowMsg(CCmdUI* pCmdUI)
{
char str1[150];
CString strValue;
//strValue.SetLength(100);
strValue.Format("%s", message.GetString());

//sprintf(str1, "%s",message.GetString());
pCmdUI->Enable(TRUE);
pCmdUI->SetText(strValue);
CDC* pDC = m_wndStatusBar.GetDC();
CSize mSize = pDC->GetTextExtent(strValue);
m_wndStatusBar.SetPaneInfo(1, IDS_MESSAGE, SBPS_NORMAL, mSize.cx);
//m_wndStatusBar.SetPaneInfo(1, IDS_MESSAGE, SBPS_STRETCH, len);
}
When I add this code I got an exception stating ,

'Unhandled exception at 0x7c1d71bb (MFC71.dll) in Perspective.exe: 0xC0000005: Access violation writing location 0x00000014.'

When I break this exception, it ends in a class barstat.cpp which is not created by me.

Also this exception occurs only when we add the status bar variable(m_wndStatusBar) to this class CPerspectiveDoc.

The Status Bar Pane is created in some other class.

How to resolve this?

Pls help


-- modified at 4:01 Tuesday 6th February, 2007
AnswerRe: StatusBar Question in MFC [modified] Pin
freeman8685-Feb-07 22:29
freeman8685-Feb-07 22:29 
QuestionHow can I get the Resource ID I want? Pin
freeman8684-Feb-07 22:32
freeman8684-Feb-07 22:32 
AnswerRe: How can I get the Resource ID I want? Pin
toxcct4-Feb-07 22:59
toxcct4-Feb-07 22:59 
GeneralRe: How can I get the Resource ID I want? Pin
freeman8685-Feb-07 13:09
freeman8685-Feb-07 13:09 
AnswerRe: How can I get the Resource ID I want? Pin
kasturi_haribabu4-Feb-07 23:02
kasturi_haribabu4-Feb-07 23:02 
GeneralRe: How can I get the Resource ID I want? Pin
freeman8685-Feb-07 13:10
freeman8685-Feb-07 13:10 
AnswerRe: How can I get the Resource ID I want? Pin
Hamid_RT5-Feb-07 7:29
Hamid_RT5-Feb-07 7:29 
GeneralRe: How can I get the Resource ID I want? Pin
freeman8685-Feb-07 13:13
freeman8685-Feb-07 13:13 
GeneralRe: How can I get the Resource ID I want? Pin
Hamid_RT5-Feb-07 19:21
Hamid_RT5-Feb-07 19:21 
AnswerRe: How can I get the Resource ID I want? Pin
Michael Dunn5-Feb-07 10:03
sitebuilderMichael Dunn5-Feb-07 10:03 
GeneralRe: How can I get the Resource ID I want? Pin
freeman8685-Feb-07 13:07
freeman8685-Feb-07 13:07 
Questionhi unicode problem Pin
aaaan4-Feb-07 22:32
aaaan4-Feb-07 22:32 
AnswerRe: hi unicode problem Pin
Naveen5-Feb-07 0:35
Naveen5-Feb-07 0:35 
AnswerRe: hi unicode problem Pin
Hamid_RT5-Feb-07 7:24
Hamid_RT5-Feb-07 7:24 
AnswerRe: hi unicode problem Pin
Michael Dunn5-Feb-07 10:04
sitebuilderMichael Dunn5-Feb-07 10:04 
General\r\n -confused [modified] Pin
Michael Pauli4-Feb-07 22:18
Michael Pauli4-Feb-07 22:18 
GeneralRe: \r\n -confused Pin
Bradml4-Feb-07 22:25
Bradml4-Feb-07 22:25 

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.