Click here to Skip to main content
15,922,584 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: string Pin
David Crow23-Apr-04 5:26
David Crow23-Apr-04 5:26 
GeneralRe: string Pin
macmac3823-Apr-04 6:17
macmac3823-Apr-04 6:17 
GeneralRe: string Pin
David Crow23-Apr-04 6:40
David Crow23-Apr-04 6:40 
GeneralRe: string Pin
macmac3825-Apr-04 22:47
macmac3825-Apr-04 22:47 
GeneralRe: string Pin
David Crow26-Apr-04 2:18
David Crow26-Apr-04 2:18 
GeneralRe: string Pin
macmac3826-Apr-04 2:25
macmac3826-Apr-04 2:25 
GeneralRe: string Pin
David Crow26-Apr-04 2:31
David Crow26-Apr-04 2:31 
Generalcustom resource problem Pin
chocm20-Apr-04 23:36
chocm20-Apr-04 23:36 
I created a custom resource in the SDI project, in other words, there is a new folder named "MyText" under the "MyView recources" in the resource view workspace , and there is an entry named "IDR_MYTEXT1" in the "MyText" folder. The content of IDR_MYTEXT1 is imported from a text file. I want to show the text file in the view window. but some error occured, I can't see the text file content at all.

Thanks for help in advance!


void CMyView::OnInitialUpdate()
{
CView::OnInitialUpdate();
HRSRC hrsrc=::FindResource(::AfxGetApp()->m_hInstance,"IDR_MYTEXT1","MyText");

HGLOBAL hglb=::LoadResource(::AfxGetApp()->m_hInstance,hrsrc);
LPVOID m_ptr=::LockResource(hglb);

}


void CMyView::OnDraw(CDC* pDC)
{
CMy0421Doc* pDoc = GetDocument();

ASSERT_VALID(pDoc);
pDC->TextOut(0,0,"I insert a text file as a custom resource, and show it in the SDI program");

pDC->TextOut(100,100,(char*)m_ptr);


}



Have you tried Internet Telephone Services[^]
GeneralRe: custom resource problem Pin
David Crow21-Apr-04 2:52
David Crow21-Apr-04 2:52 
GeneralRe: custom resource problem Pin
chocm21-Apr-04 18:46
chocm21-Apr-04 18:46 
GeneralRe: custom resource problem Pin
David Crow22-Apr-04 2:05
David Crow22-Apr-04 2:05 
GeneralRe: custom resource problem Pin
chocm22-Apr-04 18:26
chocm22-Apr-04 18:26 
GeneralRe: custom resource problem Pin
David Crow23-Apr-04 2:08
David Crow23-Apr-04 2:08 
GeneralRe: custom resource problem Pin
chocm24-Apr-04 23:20
chocm24-Apr-04 23:20 
GeneralRe: custom resource problem Pin
David Crow26-Apr-04 2:20
David Crow26-Apr-04 2:20 
QuestionHow to scroll CListView down ? Pin
vgrigor20-Apr-04 23:26
vgrigor20-Apr-04 23:26 
AnswerRe: How to scroll CListView down ? Pin
jmkhael21-Apr-04 0:06
jmkhael21-Apr-04 0:06 
Generalaudio file proprties Pin
viliam20-Apr-04 23:08
viliam20-Apr-04 23:08 
GeneralIME caret - asian systems Pin
Roger Alsing20-Apr-04 23:06
Roger Alsing20-Apr-04 23:06 
Generalhide cursor Pin
kaldoklv20-Apr-04 23:01
kaldoklv20-Apr-04 23:01 
GeneralRe: hide cursor Pin
Balkrishna Talele21-Apr-04 0:02
Balkrishna Talele21-Apr-04 0:02 
GeneralWord 2003 Pin
V.20-Apr-04 22:47
professionalV.20-Apr-04 22:47 
GeneralRe: Word 2003 Pin
RichardGrimmer21-Apr-04 2:45
RichardGrimmer21-Apr-04 2:45 
GeneralRe: Word 2003 Pin
21-Apr-04 3:15
suss21-Apr-04 3:15 
GeneralRe: Word 2003 Pin
Steve S22-Apr-04 1:51
Steve S22-Apr-04 1:51 

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.