Archive for the ‘Visual Studio’ Category

Microsoft SDK? Windows Kit?

MS는 참 웃기는 것이..

Windows SDK를 Win 7때는 Microsoft SDK 폴더에 다 설치하더니, Win 8 SDK는 .NET쪽은 여전히 거기에, 그 외는 Windows Kit에 설치한다.
그래서 Win 7은 DirectX/2D/3D등이 Microsoft SDK에 있고, Win8 SDK는 Windows Kits에 있다.
문제는 레지스트리에서 여전히 Microsoft SDK에 가서 헤더나 라이브러리를 찾게 되어 있다.
그렇기 때문에, Win 8 SDK를 VS 2012등에 설치하면 제대로 설치된 SDK를 인식 못한다.

도대체 왜 이러냐 MS? 좀 일관적으로 해라.

사람이 많이 들러 붙어서 만드니까, 어느 정도 바보 같은 것이 있는 것은 이해한다.
근데 가만 보면.. 안드로이드나 윈도우즈 쪽은 서로 비슷한 데가 있다.
버그가 생기거나 이렇게 일관성 없는 일이 생길 때 보면, 얘네들은 뭔가 개념이 없어 보인다.
반면에 애플쪽에서 생기는 문제는, 문제를 인식은 하고 있는데, 시간이 없어서 못하는 느낌이 나고.

적어도 접촉을 해봐도, 애플 쪽은 답변이 비교적 감을 잡고 온다. (물론 최근 5년 사이엔 무척 후져졌다. Xcode 4 이래로. Xcode 4를 누가 만든지 안다. 애플 내에서도 잡음이 많았던 것으로 안다. 버그 리포팅을 하면 오는 답변의 태도나 방식이 이전에 비해 엉망이다.)
하지만  MS쪽이나 Android 쪽/전반적 구글쪽은 그렇지 못하다.
그래도 예전에 구글에서 Picasa app 나오고 할 땐 괜찮았는데. S/W에 개념이 있는 회사라고 생각했는데…

한쪽만 이야기 하면, 윈빠네, 애플빠네들 소리들 할 거 같은데.. 난 윈도우즈, 맥, 유닉스 다 하는 사람이고..
선호하는 플랫폼은 있어도, 무조건 한쪽을 좋다하진 않는다. 나같은 사람이 미국에서도 엄청 적더라. 말이 엔지니어들이지 빠들에 가까워서.. 자기가 싫어하는 플랫폼 쪽은 무조건 나쁘다하는 사람들이 태반이다.
그러니 문제를 공론화하기도 참 힘들다.

Visual Studio 2015 – What’s new?

So, finally MS looks to wake up from its long hibernation.
This time they are very aggressive and I believe Apple and Google ( not as much as Apple ) should get alarmed.

VS 2015 has many good things, however, as many of us know by now, it contains open source version of .NET. I didn’t check which .NET it’s referring, but mostly it looks to contain APIs for server-side functionality at this moment.
Also, it embraced Xamarin, which is Mono-based Android/iOS cross platform development solution.
if MS gets involved in development of Mono more actively, Apple should get notified about it.

So, please try to read and see what’s new about VS 2015!

It’s better than Apple’s approach to block using old Xcode on newer OS X, at least

At home, I have Visual Studio 2010 Premium(?) and 2013 Express.
If I bring project file created and built using VS 2012 to home and tries to build with VS 2010 ( of course, I change settings in a project file to use 2010 toolset. ), it still fails and some error messages are not quite clear.
For example, __report_rangecheckfailure error is specific to VS 2012 and later project files.

It’s odd. But you can set it even for VS 2010.

Well, there are people who hate VS. But I like VS more overall ( especially Xcode 4 and later.. )
Apple prevents from using older Xcode on newer OS X.

How not to build with “ClickOnce” deployment option?

“ClickOnce” deployment is cleaner and easier option than “InstallShield” option. Also, it is free.
However, there is one glitch. ( MS people will call it a “feature”. )
“ClickOnce” doesn’t allow execution level higher than “AsInvoker”. So, it means that you can’t include a call to some functionality which requires “Administrator” privilege.
What? Isn’t it totally different thing to elevate execution level when launching, and building/deploying an executable? Right. However, it’s the approach MS people chose, and when building a project, it will warn and stop building.
In my code ( I got rid of “s” here, because my native English speakers said it was wrong if you wrote/speak codes. Well, a language keeps changing. According to English grammar book, you should not say, “Give me (a) milk”. A correct one will be “Give me a cup of blah blah”. But one very surprising thing I found in living here is that there has been virtually no person who ordered like “give me one cup of Cafe Mocha”, “Give me one glass of Coke” etc. They always say “Two Cokes”, etc ) I call WMI method to enable/disable network interface. It requires “Administrator” privilege.

So, I had to change a deployment method not to use ClickOnce.

However, how not to use ClickOnce? Isn’t it enough not to click “Publish” menu item?
Visual Studio still spit out the error message.

How to solve it is to turn off “Security Option” like shown below.

How to turn-off checking “ClickOnce” in building


The following is when the option is on.

ClickOnce doesn’t support “Administrator” level



Rethinking Visual Studio as a development tool

Well, I have used Visual C++ or Visual Studio for about 20 years.
On Windows platform, Visual C++/Studio was the tool you should choose to create Windows apps on Windows. Borland C++ was very good, but to me Visual C++ was the right tool because it was MS which created the Windows and introduced technologies for Windows. Borland should talked with MS to implement the latest MS technology for Windows.

However, since I used the Visual C++, I got impression that coding for Windows was kind of dirty job. Why? I didn’t “recognize” the reason clearly so far. However, recently I started to open my eyes and finally saw the reason.

If you override member functions, windows message handler, event handler and so on, the Visual Studio automatically generates those and put those in header files and implementation files. What makes things dirty is that Visual Studio just put new methods and new variable to the last line of the header file of interested classes. For the Visual Studio developers, it would be the easiest way of implementing the code generation.

class CMYClass
    // Member Variables
private :

protected :

public :

   // Member Functions

protected :

public :



class CMYClass
private :
    // Member Variable

    // Member Functions

protected :
    // Member Variable

    // Member Functions

public :
    // Member Variable

    // Member Functions

Things can be complicated because there are Windows Message handlers, event handlers, overriden functions, the methods of the class itself.

Whatever it is, the above two organizations make it easy to figure out what the class does.
Maybe it is not Visual Studio developers’ concern. Any programmers who use VS should not rely on the automatically generated codes completely. Once they are generates, individual programmers should organize the codes better way or more manageable way.

Also, I found out that #pragma mark used by Xcode was very convenient and very good to manage codes.
Especially when you migrate old codes to a new codes, you need to make sure if there will be any missing functionality. Then marking group of methods with #pragma mark in Xcode helps a lot. It provides easier way to figure out what existing classes do and how they are organized.
It also DRIVES people to organize their codes. With Visual Studio, it is very easy to have related methods placed here and there in implementation file, *.cpp. However, if #pragma mark is introduced, people will start organize their member functions under related mark tags.

Fast Open… for Visual Studio 2005/2008

When there are a lot of files in a project, it is pretty hard to find where the file is. In such case, I desperately wanted to have Xcode’s Fast Open… feature for Visual Studio 2005/2008.

So, while finding some plugins for Visual Studio, I found one tip.

What you should do is to type

>of [file name]

in the Find field.

Even intellisense works there!

Visual C++ 2008 resource editing and control variable annoyance

Hmmm.. It was strange that VC++ 2008 add variables wizard didn’t let a “value” variable of a radio button. With VC++ 6, it was possible as far as I remember.

So, I searched to find out what changed since VC++ 6.

What I found are :

However, the most official document is :
Grouping Radio Buttons on a Dialog Box

People are confused by the different way of setting variable for a radio button to they way you do with its previous version, and MS didn’t seem to present “What is changed and How is changed” document.

So, the way it manipulate resources was changed. No, problem. However again MS’s approach shows problems.

  1. In the resource editor, there is no way to group radio boxes visually
  2. Because only one radio buttons is to be turned on exclusively in its group, there should be a visual way to make a series of radio buttons grouped. However, a group is defined by setting the order of radio buttons in series and only the first radio button is flagged as “Group”.

  3. Setting only the first radio button as “Grouped” is not reasonable.
  4. Basically there are multiple radio buttons in a group. Then all should be “grouped”. But MS want you to set only the 1st radio button as “grouped”. Then all the following radio buttons are grouped. It doesn’t feel natural.

  5. Setting the variable to the first radio button
  6. So, a variable for a group should be declared for the group. But a variable for the 1st button is declared and treated like that it is the representative button for the group.

All of them don’t look natural and reasonable.

I think this is why people get confused and couldn’t get a clue on how to make set a variable for radio buttons.

%d bloggers like this: