I'm stuck with the same problem. I think the first thing you should do is figure out exactly why you're losing (or failing to gain) weight. Are you not taking in enough calories, or are you not absorbing what you eat properly - or both.
If you can, work out how many calories you consume on an average day - record what you eat and how many calories it provides; often the nutritional information is printed on food packaging, and where it's not you can find the information easily online. Take care to work out the amount of each food you consume accurately in order to get a good estimate of your calories intake. Once you've done this for several days work out your average calorie consumption. Then there are calculators online where you enter your height, weight, the amount of exercise you take, etc. and it will tell you how many calories you need per day to sustain your weight.
From the results of this, you will be able to tell whether you are losing weight because you are not eating enough. If the results tell you that you are eating enough and should not be losing weight, then you know you have a problem with absorption.
If it's an absorption problem, you'll need medical input to try to get your disease under control.
If it's not an absorption problem, you need to add in more calories. You can try to just eat more snacks and larger portions, but if you can't, see if you can substitute what you eat for higher-calorie options; for example, use full-fat milk instead of skimmed, butter rather than low-fat spread, avocados rather than other vegetables. Liquid calories can be very helpful as they go down easily; in addition to the Carnation, drink fruit juice rather than water, energy drinks rather than low-calorie drinks, etc..
Eating little and often helps too, so snack more rather than eating bigger meals.
Also, eat food that you like. Don't worry about eating what you feel you should in order to be healthy. It's far easier if you eat something you want to eat. Don't take this to extremes, obviously - to some extent you have to have a balanced diet - but when gaining weight is your priority, "junk" food definitely has its place. Fruit and veg can fill you up and be difficult to digest due to their fibre content, so rather than filling up on them in order to get your vitamins, try a vitamin pill or supplements like Ensure to make sure you are getting all that you need without needing to consume a lot of fruit and veg.
But then, I do all these things and I'm still struggling to gain! So if you can't add in more calories - e.g. due to lack of appetite or stomach pain, nausea, whatever, again, you may need a doctor's help to try to get the symptoms under control.