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
D

damir_tk

@damir_tk
About
Posts
49
Topics
15
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Some things will always suck in .Net, I guess
    D damir_tk

    Well I guess no need to discuss different people and different customs, but also maybe you need to be mature enough to regard something ridiculous as that remark was. But this is not about that anyhow, but about you and somebody who dares to touch your God. So please, do not let me disturb you in your worshiping. End of discussion. Damir

    The Lounge csharp linq json functional help

  • Some things will always suck in .Net, I guess
    D damir_tk

    Thank you, you are very knowledgeable, I appreciate you discuss these with me in general. Just some of my thoughts on the above:

    Marc Clifton wrote:

    Ah, well, that's a good question, and frankly that's the reason I haven't touched WF or Entity Framework. Lack of trust, because I agree with you--a lot of what's coming out of MS is half-baked, even after the RTM.

    Agree.

    Marc Clifton wrote:

    Because other programmers at MS use the tools/technologies available, without much thought? I see this even in non-MS devs: they reach for the "simple" solution because it's there, without thinking.

    Agree.

    Marc Clifton wrote:

    You can. You have to provide the fully qualified path. And there's a nifty event that fires that lets you resolve an assembly when .NET can't. I use it a lot. Very useful.

    Not everything is that simple really. Try this: You have your project in c:\Projects\TestForMarc, and you have other assemblies that you want to load in c:\SomeAsms. Now you do LoadFrom("c:\ComeAsms\SomeAsm.dll");, meaning that asm is in the LoadFrom context. Now you are back in your AppDomain doing stuff, you serialize that asm and deserialize it there. Now, deserialization will call Load("ASM, [...]"), or something like this, where path is not presented, and what will happen is that if ASM is not in the LoadContext then you get an exception, even though you have it loaded in your AppDomain! List out the loaded assemblies, and it is there! Now it gets even worse - you rely on all mighty AssemblyResolve to save the day, but that will automatically load any that assembly that exists in the GAC or below the AppBase - and will do that automatically. After that, you will end up with two same assemblies in your current AppDomain, none of which you will be able to cast the types from.

    Marc Clifton wrote:

    Erm...that's an indication you are not controlling the serialization correctly. Sounds like you're relying on the automation too much.

    There are many classes and we put a lot of focus on implementing a correct design pattern to make a proper solution for every single architectural problem or enhancement. Now saying that, we use every possible way to declare, seal, inherit, override or whatever it takes to implement a correct solution for a specific problem - now throw in some need for serial

    The Lounge csharp linq json functional help

  • Some things will always suck in .Net, I guess
    D damir_tk

    I am not even going to reply to this or the next 2 posts under that one up there, as you are obviously not on top of this.

    The Lounge csharp linq json functional help

  • Some things will always suck in .Net, I guess
    D damir_tk

    I agree with you to the most part. But tell me - why do we have all new emerging technologies and fancy stuff, when even this what we have is not working properly? If serialization is for small object, then why the whole Workflows in WF are getting serialized, and with their state as well? I had to write an extensive plugin architecture a year ago, now I resolved all the issues this way or another, but the painful parts: Why shadow folders are not working? If it was spotted in framework version 1.0, why it hasn't been fixed by now? Why can't I load an assembly from anywhere on the disk, if we are beyond "dll hell", but only below the current executing folder? If I serialize an object, why can't I use it later on if I change the version of my assembly? I have to go custom serialization each and every time, and many of my classes are HUGE! Why is it possible to load multiple instances of the same dll any number of times into the app domain? Why does an assembly gets locked the moment I touch it? Why can't it ever be unloaded from that or any other app domain? Why I can only serialize objects of classes that only have public constructors, and no other flavors? How to use serialization when it will break the moment I change the name of my class, or use strong name for the assembly? Why should I use a process that is relying internally on CodeDom, and will turn the execution order of my constructors upside down after deserialization? Create an assembly and try to load some plugins for it. Designate a folder for plugins, those plugin assemblies have some references, compile it, everything works. Check it to TFS, get somebody else on your team to pull the latest version and to compile it on his computer, drop those assemblies into the very same folder, and it will throw an exception. Why is that? Everybody says something underlying buried deep down in .Net framework. How to solve it? Why the code compiles at all even on my machine? Apparently, you have to add an empty event for AppDomain.CurrentDomain.AssemblyResolve, and nobody knows why this resolves the problem, when it does nothing in it just exists as an event. Somebody may even like this mystery and net framework being so full of surprises (this is why people use Linux in the first place, cause they like to suffer and have time for that), but I need an environment that is working and that I can rely on 100%, at least in the major features. Otherwise I get in the situation where production goes crazy and is stating how much

    The Lounge csharp linq json functional help

  • Some things will always suck in .Net, I guess
    D damir_tk

    I am sure this was supposed to be funny...just don't get if it's only Bangalore funny or worldwide funny.

    The Lounge csharp linq json functional help

  • Some things will always suck in .Net, I guess
    D damir_tk

    MS is only moving forward, everybody hype about LINQ, Workflow Foundation (another sucker technology that is to be matured around year 2014.), should I use var or not var, class initializers...but okay, will somebody explain me why I can not serialize my object without making a few hundred lines of code? I want to be able to serialize any object and to be able to deserialize it any time I want to, regardless of the assembly version I will be using later, I do not want to make custom serializers or to skip or include this or that field with attributes...I just want to have serialization working! There are zillion issues with serialization, and even more are emerging. Why don't somebody just fix this, then we can go wow about Lambda expression and other nonsense. I know MS freaks like Nishant would probably be crying by now, if they could have keep reading up to this point at all, but this post is for the folks who look at things from the perspective anyways. Cheers.

    The Lounge csharp linq json functional help

  • Programmatic printing of PDF
    D damir_tk

    Anybody knows how to batch print PDF files, using say Acrobat SDK or something? I downloaded the SDK, but it will take me days to go through it, so some guidelines would be appreciated. I thought it should be easy, but all existing libs are for modifying and creating pdf docs, not for printing them. I want to be able to print many pdf files, but without installing a pdf printer driver, such as CutePDF or something like that. The only stupid way I found was to call the AcroRd32.exe and pass the file to print in command line parameters, but if you send many files it is very slow (that app itself loads many other libs), and it sometimes gets stuck. Not to mention it is not multithreaded, can not control it, etc. Thanks.

    IT & Infrastructure help tutorial question

  • WTL Menu problem
    D damir_tk

    The problem still persists in some way. After I call DrawMenuBar(), it does refreshes the menu but now the code that checks and unchecks the menu item does not work at all. Also, the code that grays out some menu item does not work either, and it doesn't matter how many times I call DrawMenuBar(). I am not sure whether this behavior is specific to DrawMenuBar(), or is caused by the ModifyMenu command, but it sure screws up the app. Thank you.

    ATL / WTL / STL help c++ question

  • WTL Menu problem
    D damir_tk

    Exactly! Thanks for your help, I really appreciate it.

    ATL / WTL / STL help c++ question

  • WTL Menu problem
    D damir_tk

    Hi everybody, I have a problem with a menu on a regular dialog. I want to change the text of the menu item in run-time, so I do this: ModifyMenu( GetMenu(), 0, MF_STRING | MF_BYPOSITION, 0, (LPCTSTR) _T( "View" ) ); This works if the menu is submenu and I am changing the items there, but if I want to change the root menu (the one that sits on the menu bar and does not have an ID), then it changes but it does not display any changes until I move the mouse over it, so I guess it does not refreshes immediatelly. Or maybe there is a whole better way to change the text of the menu items at runtime? I went through Michael Dunn's articles, but only have seen the examples of toolbar and statusbar, with UISetText, but this does not work in my case. Thanks for your help in advance.

    ATL / WTL / STL help c++ question

  • WTL User Defined Message
    D damir_tk

    Thanks Mike, you are as helpful as always. I ran through all of your articles about WTL, but couldn't figure this GetTopLevelParent() out. Thank again.

    ATL / WTL / STL question c++ hardware help

  • WTL User Defined Message
    D damir_tk

    I can not, because I am using a derived class to embed my dialog class into the tab control, so I need to reflect the messages. Thanks.

    ATL / WTL / STL question c++ hardware help

  • WTL User Defined Message
    D damir_tk

    Thanks, I know that. But the parent dialog does not intercept the message, as I have REFLECT_NOTIFICATIONS defined, so it doesn't work.

    ATL / WTL / STL question c++ hardware help

  • WTL User Defined Message
    D damir_tk

    Hi everybody. Can somebody please help me with this? I have a dialog that I use embedded in the tab control, that is on the main dialog. I want to send a user defined message (or is there a better way?) to notify the parent dialog to hide-show itself. How do I go about this? Thanks.

    ATL / WTL / STL question c++ hardware help

  • Compile errors in ATL/WTL application
    D damir_tk

    Tried it, does not work. Thanks.

    ATL / WTL / STL c++ help question learning

  • Compile errors in ATL/WTL application
    D damir_tk

    In my ATL application I get a huge number of errors when trying to compile it. This is my stdafx.h: #pragma once #ifndef STRICT #define STRICT #endif #define WIN32_LEAN_AND_MEAN #define WINVER 0x0500 #define _WIN32_WINNT 0x0500 #define _WIN32_IE 0x0501 #define _RICHEDIT_VER 0x0100 #define _ATL_ALL_WARNINGS #include <atlbase.h> #include <atlapp.h> extern CAppModule _Module; #include <atlwin.h> #include <atlstr.h> #include <atlcontrols.h> #include "../FileEnc/resource.h" using namespace ATL; Any ideas? I tried changing the WTL 8.0 to WTL 7.1, but it is the same. I also updated the header files and moved the include WTL to the bottom of the list in the include options dialog, but to no avail. This is the error list I get: Error 2 error C2061: syntax error : identifier 'CHARRANGE' e:\wtl80\include\atlctrls.h 7269 Error 3 error C2061: syntax error : identifier 'CHARRANGE' e:\wtl80\include\atlctrls.h 7282 Error 4 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7298 Error 5 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7305 Error 6 error C2061: syntax error : identifier 'PARAFORMAT' e:\wtl80\include\atlctrls.h 7324 Error 7 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7425 Error 8 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7432 Error 9 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7439 Error 10 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7446 Error 11 error C2061: syntax error : identifier 'PARAFORMAT' e:\wtl80\include\atlctrls.h 7459 Error 12 error C2146: syntax error : missing ';' before identifier 'GetWordBreakProcEx' e:\wtl80\include\atlctrls.h 7490 Error 13 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7490 Error 14 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7491 Error 16 error C2146: syntax error : missing ';' before identifier 'SetWordBreakProcEx' e:\wtl80\include\atlctrls.h 7496 Error 17 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7496 Error 18 error C2061: syntax error : identifier 'EDITWORDBREAKPROCEX' e:\wtl80\include\atlctrls.h 7496 Error 19 error C4430: missing t

    ATL / WTL / STL c++ help question learning

  • WTL compile problems
    D damir_tk

    Hello everybody. I get the following errors when compiling a small dialog app. I am using WTL 8.0 with VS 2005, but the same goes if I use 7.5 or 7.1, and I did everything correctly, moving the Platform SDK include to the top of the list in the include options, etc. Any help is appreciated. Error 94 error C2446: '==' : no conversion from 'int' to 'LPCTSTR' e:\wtl80\include\atlmisc.h 3878 Error 95 error C2040: '==' : 'LPCTSTR' differs in levels of indirection from 'int' e:\wtl80\include\atlmisc.h 3878 Error 96 error C2061: syntax error : identifier 'CHARRANGE' e:\wtl80\include\atlctrls.h 7269 Error 97 error C2061: syntax error : identifier 'CHARRANGE' e:\wtl80\include\atlctrls.h 7282 Error 98 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7298 Error 99 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7305 Error 100 error C2061: syntax error : identifier 'PARAFORMAT' e:\wtl80\include\atlctrls.h 7324 Error 101 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7425 Error 102 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7432 Error 103 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7439 Error 104 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7446 Error 105 error C2061: syntax error : identifier 'PARAFORMAT' e:\wtl80\include\atlctrls.h 7459 Error 106 error C2146: syntax error : missing ';' before identifier 'GetWordBreakProcEx' e:\wtl80\include\atlctrls.h 7490 Error 107 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7490 Error 108 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7491 Error 110 error C2146: syntax error : missing ';' before identifier 'SetWordBreakProcEx' e:\wtl80\include\atlctrls.h 7496 Error 111 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7496 Error 112 error C2061: syntax error : identifier 'EDITWORDBREAKPROCEX' e:\wtl80\include\atlctrls.h 7496 Error 113 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7497 Error 115 error C2061: syntax error : identifier 'TEXTRANGEA' e:\wtl80\include\atlctrls.h 7502 Error 116 error C2061: syntax error : identifier 'CHARFORMAT2A' e:\wtl80\include\at

    ATL / WTL / STL c++ help visual-studio

  • Tab Control and GroupBox...Anybody?
    D damir_tk

    Thanks for your help, Mike, but it doesn't work. Simply selecting a Transparent property from the property control ( I use Visual Studio .Net 2005, but the application is Visual C++ with ATL 8 ) would add a WS_EX_TRANSPARENT bit to the group box (I checked the .rc file and it is like that). However, even though the group box does draw transparently, the caption bar of the group box still has an ugly gray background behind the black color text. I just don't know how to get rid of it.

    C / C++ / MFC c++ question

  • Tab Control and GroupBox...Anybody?
    D damir_tk

    Yeah....this is why more and more businesses are dumping Visual C++...this is something that C# or VB programmers are not even thinking about, they just put it on the window and concentrate on the more important business logic.

    C / C++ / MFC c++ question

  • Tab Control and GroupBox...Anybody?
    D damir_tk

    No, it is not that. A group box has a caption, but I don't want a gray background for it.

    C / C++ / MFC c++ 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