c++ - Create two windows in one application? -



c++ - Create two windows in one application? -

it might simple question, don't know start search answer. how create 2 individual windows interface in 1 application using native winapi? set 2 createwindow() functions using same hinstance? if want login screen windows , content page such login screen comes first, , after press button, login screen destroyed, , content page appears. how do such trick?

i thinking of using destroywindow , createwindow within button click message. however, mean main while loop (for translate/dispatch msg) in winmain exit loop , cause whole programme exit. way pre-create in winmain, how notify winmain if button clicked , come in sec loop instead of exiting program?

you're over-thinking it. create 2 windows, phone call createwindow twice. it's simple.

calling destroywindow not cause programme exit message pump. calling postquitmessage that. don't that.

when button clicked, destroy 1 window , create other. there no tricks. message pump delivers messages all windows (unless you're doing wrong explicitly requesting messages 1 window, shouldn't that).

c++ windows winapi

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -