Click here to Skip to main content
16,006,001 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionwindow's init message ? Pin
includeh102-Aug-02 20:16
includeh102-Aug-02 20:16 
AnswerRe: window's init message ? Pin
Nish Nishant2-Aug-02 20:47
sitebuilderNish Nishant2-Aug-02 20:47 
GeneralRe: window's init message ? Pin
includeh102-Aug-02 20:52
includeh102-Aug-02 20:52 
GeneralRe: window's init message ? Pin
Nish Nishant2-Aug-02 21:05
sitebuilderNish Nishant2-Aug-02 21:05 
GeneralRe: window's init message ? Pin
includeh102-Aug-02 21:25
includeh102-Aug-02 21:25 
GeneralRe: window's init message ? Pin
PJ Arends2-Aug-02 21:53
professionalPJ Arends2-Aug-02 21:53 
GeneralRe: window's init message ? Pin
Nish Nishant2-Aug-02 22:02
sitebuilderNish Nishant2-Aug-02 22:02 
GeneralRe: window's init message ? Pin
includeh102-Aug-02 22:49
includeh102-Aug-02 22:49 
ok, i post my code, you try it if u like.

//ZView: public CView
LRESULT ZView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{//ZDoc:public CDocument
ZDoc*pDoc=(ZDoc*)GetDocument();
if(pDoc)
{
int i=pDoc->edit.WindowProc(this,message,wParam,lParam);
if(i!=-1) return i;
}
return CView::WindowProc(message, wParam, lParam);
}

//edit is a user class (no parent) for controlling edit input - the interface looks like VC edit enviorment if finish. all messages are transfered to the class.

//edit is instance of XEdit, member of CDocument
int XEdit::WindowProc(CView*pv,UINT m, WPARAM w, LPARAM l)
{
switch(m)
{
case WM_CREATE:
pv->SetTimer(100,500,0);
break;
case WM_TIMER:
P_Timer(pv,w);
break;
.......................

//the edit is used for multi-view, so it is not inside a special CView

void XEdit::P_Timer(CView *pv, WPARAM w)
{
CDC*pDC=pv->GetDC();
// use the pDC paint cursor
pv->ReleaseDC(pDC);
}

it just doesn't work. if from WM_PAINT message, it works fine!

//modified: i know y now
as futher check, pDoc is not OK on WM_CREATE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!









includeh10
GeneralRe: window's init message ? Pin
ColinDavies2-Aug-02 21:55
ColinDavies2-Aug-02 21:55 
GeneralURL for bmp to jpeg Pin
suresh_sathya2-Aug-02 20:13
suresh_sathya2-Aug-02 20:13 
GeneralRe: URL for bmp to jpeg Pin
Chris Losinger2-Aug-02 20:18
professionalChris Losinger2-Aug-02 20:18 
GeneralRe: URL for bmp to jpeg Pin
-Dy5-Aug-02 0:41
-Dy5-Aug-02 0:41 
QuestionCPP question??? Pin
alex.barylski2-Aug-02 20:00
alex.barylski2-Aug-02 20:00 
AnswerRe: CPP question??? Pin
Chris Losinger2-Aug-02 20:07
professionalChris Losinger2-Aug-02 20:07 
GeneralRe: CPP question??? Pin
alex.barylski2-Aug-02 20:49
alex.barylski2-Aug-02 20:49 
GeneralRe: CPP question??? Pin
Christian Graus2-Aug-02 21:08
protectorChristian Graus2-Aug-02 21:08 
GeneralRe: CPP question??? Pin
alex.barylski2-Aug-02 22:30
alex.barylski2-Aug-02 22:30 
GeneralRe: CPP question??? Pin
Chris Losinger3-Aug-02 5:07
professionalChris Losinger3-Aug-02 5:07 
GeneralProblem in Detecting System Idle time Pin
Prateeti2-Aug-02 19:38
Prateeti2-Aug-02 19:38 
QuestionPlug in architecture - how to create a good one? Pin
Hiusing2-Aug-02 17:45
Hiusing2-Aug-02 17:45 
AnswerRe: Plug in architecture - how to create a good one? Pin
Chris Losinger2-Aug-02 20:12
professionalChris Losinger2-Aug-02 20:12 
GeneralCDhtmlDialog (VS.NET) Pin
Roman Nurik2-Aug-02 17:34
Roman Nurik2-Aug-02 17:34 
GeneralRe: CDhtmlDialog (VS.NET) Pin
ColinDavies2-Aug-02 21:14
ColinDavies2-Aug-02 21:14 
GeneralMDI question Pin
RK_20002-Aug-02 17:18
RK_20002-Aug-02 17:18 
GeneralRe: MDI question Pin
Pavel Klocek3-Aug-02 2:46
Pavel Klocek3-Aug-02 2:46 

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.