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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
J

Jaran Nilsen

@Jaran Nilsen
About
Posts
17
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Maven for .Net projects?
    J Jaran Nilsen

    Hi. I was wondering if anyone know of a simliar project for .Net projects which Maven (http://maven.apache.org) is for Java projects? Or is anyone using Maven for .Net project (if it's possible), if so, could you post a description of how you went forth to accomplish it? Thanks.

    .NET (Core and Framework) java csharp apache question

  • Clearing device with alpha?
    J Jaran Nilsen

    I have just started with Direct3D in C#. It's great so far, but I have a problem when I want to "fade" my scenes out... I remember I was able to use the D3DDevice::Clear function in C++, and I could interpolate the alpha channel. This does not seem to work in C#. Anyone have an idea? Is there another way which is more efficient? Thanks. J.

    C# csharp c++ help question

  • Transparent BMP
    J Jaran Nilsen

    Are you using the BitBlt function to render the image? In that case you shold switch to TransparentBlt. As far as I remember the last parameter to the function is the transparent color...

    C / C++ / MFC question com learning

  • How do I move a Static control?
    J Jaran Nilsen

    Use the WM_MOUSEMOVE message. Have a variable which keeps track of the previous mouse position, and set this after each move of the static control. When you have calculated the translation of the static control, use the MoveWindow memberfunction of the static control. I think this should work:)

    C / C++ / MFC question c++

  • Strange problems with XmlDocument in VC++
    J Jaran Nilsen

    Hi. I want to use the XmlDocument (from the .Net framework) to download RSS files and parse them. This should be possible right? Or is there another object I should use? When I try with XmlDocument it sometimes work, and sometimes don't... It's very strange... It crashes on the XmlDocument::Load function, and gives me an unhandled exception at blahblah. The debug output gives me the following: HEAP[TeotiTrayBuddy.exe]: HEAP: Free Heap block 4050cb0 modified at 4050da8 after it was freed Unhandled exception at 0x77f75a58 in TeotiTrayBuddy.exe: User breakpoint. I am trying to catch an XmlException which is what the Load function should throw... Any ideas? I have just started up with .Net so it would not surprise me if I have taken the wrong approach. Any advice are welcome... Regards, Jaran

    C / C++ / MFC debugging csharp c++ dotnet question

  • Using .Net components in a MFC application
    J Jaran Nilsen

    Hi. I want to use some .Net components from System::Xml and System::Xml::Xsl. But I can't seem to access these from my MFC application. I have set up the compiler options, and other options to allow use of .Net components, but when I write the code I dont manage to access these objects... Can anyone tell me what I have to do in order to do this. Any tutorials / articles on the subject are highly appreciated too:) Thanks. J.

    C / C++ / MFC xml csharp c++

  • CImage::Draw - Image format?
    J Jaran Nilsen

    Hi. I am trying to use the CImage class from ATL to handle images in my GDI game. I manage to make it draw the images, or at least some formats. It says in the documentation that the CImage::Draw function is supposed to support both transparency and alpha channel. But I can't seem to make that work. I was wondering if it's just the format that I save my images in that is wrong? I have tried different PNG formats and GIF, but none work correctly. As far as I understand the documentation I am supposed to be able to create a PNG containing transparent color and alpha channel and the Draw function will take care of the rest when I call it... Is that the case? Does anyone know what format I have to save my images in to make them work properly? I tried to save the image with transparency and alpha channel as PNG-24 (from Photoshop), but the transparent color is just semi-transparent when I render it in my game. Anyone know what's wrong? Thanks.

    C / C++ / MFC c++ graphics adobe game-dev json

  • Getting content of a folder
    J Jaran Nilsen

    I found a CFileFind class... Is that the one you mean?

    C / C++ / MFC question

  • Getting content of a folder
    J Jaran Nilsen

    Is that a MFC class, or something I can download here?

    C / C++ / MFC question

  • Creating a Text editor
    J Jaran Nilsen

    Well you should put it in your init or startup function, where you define controls, set the window size...

    C / C++ / MFC c++ question

  • Creating a Text editor
    J Jaran Nilsen

    Ahhh, ok, I am unable to go to bed before this is solved:P Well, here's the code. Three lines that's all that's needed: CEdit m_editEditor; m_editEditor.Create(ES_AUTOHSCROLL | ES_LEFT,CRect(50,50,150,70),this,NULL); m_editEditor.ShowWindow(SW_NORMAL); VoilĂ ! This creates the most basic single line control. You can change the CRect parameters to change the size, and you change the ES_ values to change the look and behaviour of the control. The last parameter is the controls ID, which I could not be bothered to make. but it's simply a #define IDC_EDIT_MYEDIT 100 statement to create that.. Well, hope this sorted things out. NOW i have to sleep;) Good luck with your programming. -Jaran

    C / C++ / MFC c++ question

  • Creating a Text editor
    J Jaran Nilsen

    I will look for some code tomorrow. But you also have the ability to make your application visually in VisualStudio 6.0. When you create a new application, you will have an option for what class your C...View class should be derived from. There you select CFrameView. If you use dialog based application, you don't have to select anything. Then on your resource Tab you will have all your visual parts, and you can modify them. Play around and see what you can find out... See u tomorrow then.

    C / C++ / MFC c++ question

  • Creating a Text editor
    J Jaran Nilsen

    Well, the first thing would be: Are you using the visual tools in VisualStuio to create your application, or are you coding everything from scratch? If you use the visual tool, it's simple drag&drop to create it, and then you assign a member variable for it. If you create it from scratch it's a bit more work, but should not be too much. I do not have the code at hand now, but it should be something like this: CEdit editMyTextEditor; editMyTextEditor.Create(...); //replace "..." with parameters editMyTextEditor.MoveWindow(RECT); //Place the control within your window. editMyTextEditor.ShowWindow(); As I said I am not sure if this is the correct sequence to create the control and showing it, but hopefully you can get something out of it. I will dig out some code for you tomorrow if you have not yet found something, but right now I am going to bed!:)

    C / C++ / MFC c++ question

  • Getting content of a folder
    J Jaran Nilsen

    OK, well, then I'll make something out of FindFirstFile/FindNextFile. Thanks for your help. -Jaran

    C / C++ / MFC question

  • Getting content of a folder
    J Jaran Nilsen

    Ok, so this is what I try: CSADirRead dirReader; dirReader.Recurse() = false; dirReader.ClearDirs(); dirReader.GetDirs("D:\\Stash"); CSADirRead::SADirVector &directories = dirReader.Dirs(); //Temp var for folder name CString sFolder; OutputDebugString("Sub folders:\n"); for (CSADirRead::SADirVector::const_iterator dit = directories.begin(); dit!=directories.end(); dit++) { sFolder.Format("%s", (*dit).m_sName); OutputDebugString(sFolder+"\n"); sDirList = sDirList+"D"+sFolder+"|"; } Don't mind the OutputDebugString, and the other string formatting (sDirList). The problem is that the only thing that is returned is "D:\Stash", not the subfolders... Do you know why? What have I done wrong...? Thanks.

    C / C++ / MFC question

  • Getting content of a folder
    J Jaran Nilsen

    Thanks, I will look at the FindFirstFile/FindNextFile functions. I tried the class that you linked to, but it didn't seem like it would list the content of just the folder I selected, but all the other subdirectories, or nothing... Thanks again. -J

    C / C++ / MFC question

  • Getting content of a folder
    J Jaran Nilsen

    I am looking for a solution for getting the content of a folder (files and / or folders). Does anyone know how I can do this?

    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