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
R

Rassul Yunussov

@Rassul Yunussov
About
Posts
189
Topics
123
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problems with creating very big images
    R Rassul Yunussov

    reasonable question:) Thanks:) I now that there is no reason to create images with size more than size of monitor resolution... And i know that I can programmatically capture sections frow wall image and show them on monitor separetly. But as always - i try to find the easiest way:) And why in stand alone application i don't have such problems? Thantks for participation:)

    C / C++ / MFC question com help tutorial

  • Problems with creating very big images
    R Rassul Yunussov

    I try to use CImage class for making images, but when i try to create very big images, for example 20 000 X 20 000, the method Create fails. I wrote 2 different applications, one - is stand alone application, and another one is COM object. All the functionality of both programs are same. So in stand alone application i can create image with such dimensions, but when i use COM my method fails. Why does it happens? And how can I solve this problem?

    C / C++ / MFC question com help tutorial

  • Memory Leak
    R Rassul Yunussov

    Ok! Thank You very much for participating.

    C / C++ / MFC graphics performance help

  • Memory Leak
    R Rassul Yunussov

    Well, i looked in the task manager - when this process is running the momory grows up. Here is code in pre tags

    UINT __cdecl CGNTGDALDlg::GNTClassificationFunction( LPVOID pParam )
    {
    ThreadStruct* pStruct = (ThreadStruct*)pParam;
    int n = pStruct->pDlg->m_Image.GetHeight();
    int m = pStruct->pDlg->m_Image.GetWidth();
    int LineLength = pStruct->pDlg->m_Image.GetPitch();
    unsigned char* Bitmap = (unsigned char*)pStruct->pDlg->m_Image.GetBits();
    Bitmap+=LineLength*pStruct->Offset;
    if(pStruct->pDlg->m_floatingWindowSize==0)
    {
    __declspec(align(16)) float* pInputs =(float*) _aligned_malloc(pStruct->pDlg->m_poDataset->GetRasterCount()*sizeof(float),16);
    for(int i =pStruct->Offset;iEnd;i++)
    {
    for(int j = abs(LineLength%m),l=0;jpDlg->m_poDataset->GetRasterCount();k++)
    {
    pInputs[k] = pStruct->pDlg->m_pImageMatrix[k][i][m-l-1];
    Norm+=pInputs[k];
    }
    Norm = sqrt(Norm);
    for(int k = 0;kpDlg->m_poDataset->GetRasterCount();k++)
    pInputs[k]/=Norm;
    EnterCriticalSection(&pStruct->pDlg->m_CriticalSection);
    unsigned int value = pStruct->pDlg->m_pGNTNet->Propagate(pInputs,distance,&pNeuron);
    LeaveCriticalSection(&pStruct->pDlg->m_CriticalSection);

    					\*(Bitmap-LineLength-j-1) = GetRValue(value);//eto krasnii
    					\*(Bitmap-LineLength-j-2) = GetGValue(value);//eto zelenii
    					\*(Bitmap-LineLength-j-3) = GetBValue(value);//eto sinii
    			}
    			Bitmap+=LineLength;
    		}
    	\_aligned\_free(pInputs);
    }
    else
    {
    	\_\_declspec(align(16)) float\* pInputs =(float\*) \_aligned\_malloc(pStruct->pDlg->m\_floatingWindowSize\*pStruct->pDlg->m\_floatingWindowSize\*pStruct->pDlg->m\_poDataset->GetRasterCount()\*sizeof(float),16);
    	for(int i =pStruct->Offset;iEnd;i++)
    		{
    			if(ipDlg->m\_poDataset->GetRasterYSize()-pStruct->pDlg->m\_floatingWindowSize)
    			for(int j = abs(LineLength%m),l=0;jpDlg->m\_poDataset->GetRasterXSize()-pStruct->pDlg->m\_floatingWindowSize)
    				{
    						double distance;
    						CGNTNeuron\* pNeuron;
    						int ll = 0;
    						double Norm = 0;
    						for(int k = 0;kpDlg->m\_poDataset->GetRasterCount();k++)
    							for(int ii = i;iipDlg->m\_floatingWindowSize;ii++)
    								for(int jj = l;jjpDlg->m\_floatingWindowSize;jj++)
    								{
    									pInputs\[ll++\] = pS
    
    C / C++ / MFC graphics performance help

  • Memory Leak
    R Rassul Yunussov

    I use CImage class for working with bitmaps and noticed memory leak and can't understand the problem. When i'm trying to change the content of bitmap by accessing the bytes - in different cases i see or not see memory leaks, however the code is same! Here is the code: UINT __cdecl CGNTGDALDlg::GNTClassificationFunction( LPVOID pParam ) { ThreadStruct* pStruct = (ThreadStruct*)pParam; int n = pStruct->pDlg->m_Image.GetHeight(); int m = pStruct->pDlg->m_Image.GetWidth(); int LineLength = pStruct->pDlg->m_Image.GetPitch(); unsigned char* Bitmap = (unsigned char*)pStruct->pDlg->m_Image.GetBits(); Bitmap+=LineLength*pStruct->Offset; if(pStruct->pDlg->m_floatingWindowSize==0) { __declspec(align(16)) float* pInputs =(float*) _aligned_malloc(pStruct->pDlg->m_poDataset->GetRasterCount()*sizeof(float),16); for(int i =pStruct->Offset;iEnd;i++) { for(int j = abs(LineLength%m),l=0;jpDlg->m_poDataset->GetRasterCount();k++) { pInputs[k] = pStruct->pDlg->m_pImageMatrix[k][i][m-l-1]; Norm+=pInputs[k]; } Norm = sqrt(Norm); for(int k = 0;kpDlg->m_poDataset->GetRasterCount();k++) pInputs[k]/=Norm; EnterCriticalSection(&pStruct->pDlg->m_CriticalSection); unsigned int value = pStruct->pDlg->m_pGNTNet->Propagate(pInputs,distance,&pNeuron); LeaveCriticalSection(&pStruct->pDlg->m_CriticalSection); *(Bitmap-LineLength-j-1) = GetRValue(value);//eto krasnii *(Bitmap-LineLength-j-2) = GetGValue(value);//eto zelenii *(Bitmap-LineLength-j-3) = GetBValue(value);//eto sinii } Bitmap+=LineLength; } _aligned_free(pInputs); } else { __declspec(align(16)) float* pInputs =(float*) _aligned_malloc(pStruct->pDlg->m_floatingWindowSize*pStruct->pDlg->m_floatingWindowSize*pStruct->pDlg->m_poDataset->GetRasterCount()*sizeof(float),16); for(int i =pStruct->Offset;iEnd;i++) { if(ipDlg->m_poDataset->GetRasterYSize()-pStruct->pDlg->m_floatingWindowSize) for(int j = abs(LineLength%m),l=0;jpDlg->m_poDataset->GetRasterXSize()-pStruct->pDlg->m_floatingWindowSize) { double distance; CGNTNeuron* pNeuron; int ll = 0; double Norm = 0; for(int k = 0;kpDlg->m_poDataset->GetRasterCount();k++) for(int ii

    C / C++ / MFC graphics performance help

  • Optimization question
    R Rassul Yunussov

    Well, everybody knows that program works with files very slow, so when i worked with windows API functions and MFC i just download whole file in the memory, and using the class CMemFile worked with it as with the stream. Now i want to work with files using iostream classes (ifstream). But i don't know how to do the same. Does any body know the way?

    C / C++ / MFC performance question c++ algorithms json

  • ifstream question
    R Rassul Yunussov

    Thanks a lot!!! Now i want to read the file into the memory and work with this memory like i worke as with file, i think using istream, but i can't make the istream object... Here is my code: ifstream shapefilef(ShapeFileName.c_str(),ios::binary); shapefilef.seekg(0,ios::end); streampos ps = shapefilef.tellg(); int size = ps.seekpos(); char* data = new char [size]; shapefilef.seekg(0,ios::beg); shapefilef.read(data,size); istream shapefile(data); Where is the mistake? I can't compile it... Something in constructor.

    C / C++ / MFC question tutorial

  • ifstream question
    R Rassul Yunussov

    Does anyone know how to get file size, if i work with files using ifstream class?

    C / C++ / MFC question tutorial

  • Why my "i" counter doesn't increases?
    R Rassul Yunussov

    well, shame on me. I found the problem... I was reading the data to the pointer, that i didn't reserved in the memory. So i erased the memory where "i" was stored.

    C / C++ / MFC debugging question

  • Why my "i" counter doesn't increases?
    R Rassul Yunussov

    The ComunsNuber is 3, but my cycle runs more than 3 times, because the "i" counter doesn't increases!!! I Can send you the solution in archive, give me you e-mail. And You'll see. The solution is on visual studio 2005 professional

    C / C++ / MFC debugging question

  • Why my "i" counter doesn't increases?
    R Rassul Yunussov

    The ComunsNuber is 3, but my cycle runs more than 3 times, because the "i" counter doesn't increases!!! I Can send you the solution in archive, give me you e-mail. And You'll see. The solution is on visual studio 2005 professional

    C / C++ / MFC debugging question

  • Why my "i" counter doesn't increases?
    R Rassul Yunussov

    The cycle i made should work for three times, for the first time in the debug the "i" counter increses from zero to 1, as i see on the second time "i" counter doesn't increases!!! But it have to! I can't understand... Here is the code: for(int i =0;i<ColumnsNumber;i++) { //Reading Column Definition DBFColumn column; dbffile.read(column.FieldName,10); dbffile.read((char*)&column.caPad,sizeof(char)); dbffile.read((char*)&column.cFieldType,sizeof(char)); dbffile.read((char*)&column.lwhere,sizeof(int)); dbffile.read((char*)&column.cFieldLength,sizeof(char)); dbffile.read((char*)&column.cFieldPrecision,sizeof(char)); dbffile.read((char*)&column.caPad3,14); /*for(int j= 0;j -- modified at 2:57 Wednesday 15th February, 2006

    C / C++ / MFC debugging question

  • Linker error
    R Rassul Yunussov

    Yes, it looks like i don't have a destructor in my cpp file, but i have... I found a way you can check it - in the wizard you can create a new class, but then delete it from the solution, and include it just in stdafx.h. You'll get the same error as I... So my question is - how to include library, without insertig library in the project

    C / C++ / MFC help c++ tutorial question

  • Linker error
    R Rassul Yunussov

    It is just mistake in forum... Exactly - i got : error LNK2001: unresolved external symbol "public: __thiscall CFooClass::~CFooClass(void)" (??1CFooClass@@QAE@XZ)

    C / C++ / MFC help c++ tutorial question

  • Linker error
    R Rassul Yunussov

    If i make a library, consists of two files, for example - foo.h, foo.cpp, where i described a class foo: foo.h file: class foo { ... public: foo(); void method(); }; foo.cpp file: #include "foo.h" foo::foo() { } foo::method() { } and then i make a new project, copy this files in the project and in file stdafx.h i write next string #include "foo.h" the linker says that can't link... What am i doing wrong? So... I hope i described my problem clearly:) Sorry for my bad english:sigh: -- modified at 1:05 Tuesday 14th February, 2006

    C / C++ / MFC help c++ tutorial question

  • Forms
    R Rassul Yunussov

    I got next problem: I have a lot of different forms for completing, for example the form of water investigations, that have a lot of parameters that user must enter, the form of air investigation, that have a lot of another parameters that user must fill in and so on... And number of forms can grow... I don't want to write for each form a specified ASP.NET page, i want to have functionality, that can make it automatically... I think about XML/XSL, that can handle the information of appearance of page, but how to realize it - no idea... Is it trivial problem? Where can i find any example or theory about it?

    ASP.NET xml tutorial csharp asp-net adobe

  • Something interesting
    R Rassul Yunussov

    When i make an empty project on EVC 4.0 and compile it, then copy the application on Pocket PC and try to start it i can't see the command bar with menu... Maybe it beacause of old version of Windows on this pocket?

    Mobile question announcement

  • And GAPI again
    R Rassul Yunussov

    How to draw text rotated? Not only horizontal or vertical, for example 45 degree... And what about antialiassing?

    Mobile tutorial question

  • GAPI
    R Rassul Yunussov

    I'm trying to use GAPI with MFC with frame window and child view, but i can't create window on the wall screen... Actually I made it (by typing this in FrameWnd::OnCreate() { lpCreateStruct->cx = GetSystemMetrics(SM_CXSCREEN); lpCreateStruct->cy = GetSystemMetrics(SM_CYSCREEN);}, but when i tap the window with stylus on top or bottom of window i see the sart panel or command bar - i don't want them to appear ... I just want my window be on top... How to make it?

    Mobile c++ tutorial question

  • Fast Drawing
    R Rassul Yunussov

    Does anybody know any library like DirectX on Pocket PC? Is it possible to draw faster than with GDI and with antialiasing?

    Mobile graphics game-dev 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