Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

ALTF4

@ALTF4
About
Posts
5
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • visual studio 2003 MFC/SDI help drawing
    A ALTF4

    ok I have make the code like you told me but it still does the same thing :( ///---there is no hope for you---\\\

    C / C++ / MFC help csharp c++ visual-studio graphics

  • problem with CSocket
    A ALTF4

    try to bring the socket into the thread as an argument ? ///---there is no hope for you---\\\

    C / C++ / MFC help question

  • visual studio 2003 MFC/SDI help drawing
    A ALTF4

    ok I have made a program that simulates a petrol station (comming of cars etc..) it is a single MFC /SDI app in witch I made 2 functions first one delets the screen and the second one draws someting on the screen. I call this functions whit a timer (every 100ms) but there is a problem sometimes my program crashes and this is all that I get as help why it crashed Unhandled exception at 0x7c28af6a (mfc71d.dll) in seminarska.exe: 0xC0000005: Access violation reading location 0x00000004. So I'm sure that the problem is in this 2 functions : becouse if I run the program whit no drawing the program never crashes: ok here is the code for deleteing the screen: void CseminarskaView::brisi_ekran(void) { CDC*tabla=GetDC(); RECT Okno; GetClientRect(&Okno); CBrush copic(0xffffff); tabla->FillRect(&Okno,&copic); } and the code for drawing : void CseminarskaView::risi(Bencinska postaja[]) { //tukaj moram risati sproti CDC* tabla=GetDC(); RECT ena; ena.top=20; ena.left=20; ena.right=60; ena.bottom=60; int x1=0; int x2=0; int x3=255; int y=25; CString nizi; int i ; for (i=0;i<5;i++) { CString out; out.Format("%i",i+1); tabla->TextOut(10,y,out); CBrush pisalo(RGB(x1,x2,x3)); tabla->FillRect(&ena,&pisalo); ena.top=ena.top+60; ena.bottom=ena.bottom+60; x1=x1+60; x2=x2+60; x3=x3-60; y=y+60; //delete pisalo; } CString uu; y=25;int y1=500; for( i=0;i<5;i++) { for(int j=0;j { nizi=nizi+" I "; } tabla->TextOut(80,y,nizi); y=y+60; nizi=" "; uu.Format("postaja %i: %f",i,postaja[i].rezervar); tabla->TextOut(10,y1,uu); y1=y1+20; } } can someone please help me ? I think that the problem is CBrush but I'm not sure becouse sometimes the program finishes Ok sometimes not ///---there is no hope for you---\\\

    C / C++ / MFC help csharp c++ visual-studio graphics

  • visal studio 2003 MFC/SDI and help whit Cbrush
    A ALTF4

    ok I have made a program that simulates a petrol station (comming of cars etc..) it is a single MFC /SDI app in witch I made 2 functions first one delets the screen and the second one draws someting on the screen. I call this functions whit a timer (every 100ms) but there is a problem sometimes my program crashes and this is all that I get as help why it crashed Unhandled exception at 0x7c28af6a (mfc71d.dll) in seminarska.exe: 0xC0000005: Access violation reading location 0x00000004. So I'm sure that the problem is in this 2 functions : becouse if I run the program whit no drawing the program never crashes: ok here is the code for deleteing the screen: void CseminarskaView::brisi_ekran(void) { CDC*tabla=GetDC(); RECT Okno; GetClientRect(&Okno); CBrush copic(0xffffff); tabla->FillRect(&Okno,&copic); } and the code for drawing : void CseminarskaView::risi(Bencinska postaja[]) { //tukaj moram risati sproti CDC* tabla=GetDC(); RECT ena; ena.top=20; ena.left=20; ena.right=60; ena.bottom=60; int x1=0; int x2=0; int x3=255; int y=25; CString nizi; int i ; for (i=0;i<5;i++) { CString out; out.Format("%i",i+1); tabla->TextOut(10,y,out); CBrush pisalo(RGB(x1,x2,x3)); tabla->FillRect(&ena,&pisalo); ena.top=ena.top+60; ena.bottom=ena.bottom+60; x1=x1+60; x2=x2+60; x3=x3-60; y=y+60; //delete pisalo; } CString uu; y=25;int y1=500; for( i=0;i<5;i++) { for(int j=0;jTextOut(80,y,nizi); y=y+60; nizi=" "; uu.Format("postaja %i: %f",i,postaja[i].rezervar); tabla->TextOut(10,y1,uu); y1=y1+20; } } can someone please help me ? I think that the problem is CBrush but I'm not sure :( becouse sometimes the program finishes Ok sometimes not ///---there is no hope for you---\\\

    Managed C++/CLI help c++ graphics question

  • CFile nad struct
    A ALTF4

    how can I save a stuct whit Cfile here is my code but id does not work : struct naslovniki { CString ime1; CString naslov1; CString posta1; CString drzava1; CString naziv1; CString skupina; }; CFile f; f.Open("hasek.has",CFile::modeWrite|CFile::typeBinary); naslovniki x; x.ime1=m_ime; x.naslov1=m_naslov; x.drzava1=m_drzava; x.posta1=m_posta; x.naziv1=m_naziv; x.skupina; f.Write(&x,sizeof(naslovnik));///this is the porblem f.close(); ///---there is no hope for you---\\\

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups