Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I want to run the app in silent mode by passing in a parameter, otherwise I will show the window.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
291 views
Welcome To Ask or Share your Answers For Others

1 Answer

ShowWindow(... SW_HIDE ...) doesn't work?

The best practice here is to not create the window in the first place. Nothing forces you to actually create a window in InitInstance. Though if you're working with MFC it's likely a lot of your application/domain/business logic is sitting there, tightly coupled to those MFC message handlers and so forth. In which case the window will need to exist.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...