Click here to Skip to main content
15,917,709 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
General[Message Deleted] Pin
Cedric Moonen30-Aug-05 23:13
Cedric Moonen30-Aug-05 23:13 
GeneralRe: How to use the struct in the VC.Net? Pin
greenwyx30-Aug-05 23:20
greenwyx30-Aug-05 23:20 
GeneralRe: How to use the struct in the VC.Net? Pin
greenwyx30-Aug-05 23:06
greenwyx30-Aug-05 23:06 
AnswerRe: How to use the struct in the VC.Net? Pin
Marc Soleda30-Aug-05 22:52
Marc Soleda30-Aug-05 22:52 
GeneralRe: How to use the struct in the VC.Net? Pin
greenwyx30-Aug-05 22:55
greenwyx30-Aug-05 22:55 
GeneralRe: How to use the struct in the VC.Net? Pin
GDavy30-Aug-05 23:09
GDavy30-Aug-05 23:09 
GeneralRe: How to use the struct in the VC.Net? Pin
Marc Soleda30-Aug-05 23:21
Marc Soleda30-Aug-05 23:21 
GeneralRe: How to use the struct in the VC.Net? Pin
greenwyx30-Aug-05 23:35
greenwyx30-Aug-05 23:35 
There are the code of the CAirrfView.cpp and CAirrfView.h.
In the CAirrfView.cpp file:
CAirrfView::CAirrfView()
{

m_MaxScreen=20000;
m_Screen=new ScreenStruct[m_MaxScreen];
m_Screen[0].sx=m_xStart;
m_Screen[0].sy=m_yStart;
m_Screen[0].blc=blc;

}
CAirrfView::~CAirrfView()
{
delete m_Screen;

}
.....
void CAirrfView::GraphAll()
{

float minx,miny,maxx,maxy,bl1;
CAirrfDoc* pDoc =(CAirrfDoc*) GetDocument();


minx=(float)1E20;miny=(float)1E20;maxx=-(float)1E20;maxy=-(float)1E20;
SetCapture();
SetCursor(LoadCursor(NULL,IDC_WAIT));
BOOL pb=pDoc->GetRect(&minx,&miny,&maxx,&maxy);

SetCursor(LoadCursor(NULL,IDC_ARROW));
ReleaseCapture();
if(!pb)
{
m_xStart=0;
m_yStart=0;
blc=1.0;
return;
}
else
{
bl1=(maxx-minx)/(m_wScreen-20);
blc=(maxy-miny)/(m_hScreen-20);
if(bl1>blc)
blc=bl1;

m_xStart=minx-10*blc;
m_yStart=miny-10*blc;
}

p_Screen[pDoc->m_CurrentScreen1].sx=m_xStart;
p_Screen[pDoc->m_CurrentScreen1].sy=m_yStart;
p_Screen[pDoc->m_CurrentScreen1].blc=blc;
pDoc->m_CurrentScreen=pDoc->m_CurrentScreen1;


Invalidate();
}
in the CAirrfView.h file:
typedef struct
{
float blc;
float sx;
float sy;
}ScreenStruct;

class CAirrfView : public CView
{
ScreenStruct *m_Screen;
ScreenStruct *p_Screen;
int m_MaxScreen;
float m_xStart,m_yStart,blc,bl1;
void GraphAll();
};
Thank you.
GeneralRe: How to use the struct in the VC.Net? Pin
Marc Soleda30-Aug-05 23:52
Marc Soleda30-Aug-05 23:52 
GeneralRe: How to use the struct in the VC.Net? Pin
toxcct31-Aug-05 0:01
toxcct31-Aug-05 0:01 
NewsWritng a VC++ Code to lock a windows File Pin
Its_Me_Shashank30-Aug-05 21:54
Its_Me_Shashank30-Aug-05 21:54 
QuestionHook expert needed : add event to JournalPlaybackProc -> i m lost ! Pin
etherny30-Aug-05 21:45
etherny30-Aug-05 21:45 
QuestionHow to dynamically load powerpoint into my MFC application? Pin
Amarelia30-Aug-05 20:30
Amarelia30-Aug-05 20:30 
AnswerRe: How to dynamically load powerpoint into my MFC application? Pin
sharpanil30-Aug-05 20:49
sharpanil30-Aug-05 20:49 
AnswerRe: How to dynamically load powerpoint into my MFC application? Pin
Eytukan30-Aug-05 22:31
Eytukan30-Aug-05 22:31 
QuestionEvent watching Pin
Nishad S30-Aug-05 19:55
Nishad S30-Aug-05 19:55 
AnswerRe: Event watching Pin
prasad_som30-Aug-05 20:18
prasad_som30-Aug-05 20:18 
AnswerRe: Event watching Pin
John R. Shaw30-Aug-05 20:19
John R. Shaw30-Aug-05 20:19 
GeneralRe: Event watching Pin
Nishad S30-Aug-05 20:40
Nishad S30-Aug-05 20:40 
AnswerRe: Event watching Pin
ThatsAlok30-Aug-05 20:51
ThatsAlok30-Aug-05 20:51 
GeneralRe: Event watching Pin
Nishad S30-Aug-05 21:43
Nishad S30-Aug-05 21:43 
QuestionIShellFolder::ParseDisplayName and UNICODE Pin
Tcpip200530-Aug-05 19:43
Tcpip200530-Aug-05 19:43 
AnswerRe: IShellFolder::ParseDisplayName and UNICODE Pin
Jose Lamas Rios31-Aug-05 2:55
Jose Lamas Rios31-Aug-05 2:55 
Questionbugs when type-casting a float to double Pin
chris_mclean30-Aug-05 18:58
chris_mclean30-Aug-05 18:58 
AnswerRe: bugs when type-casting a float to double Pin
Christian Graus30-Aug-05 19:21
protectorChristian Graus30-Aug-05 19:21 

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.