winforms - Using Windows Form in Win32 applications -


i need create win32 application. using visual studio. designing application in windows form, allows graphically designing window.

however, cannot use windows form (only). have use win32 applicaition. now, when create win32 application, cannot figure graphically design window.

is there way incorporate windows form in win32 application? or graphically design win32 window?

(if there way design win32 applications gui graphically , it's me not figure it, appreciate resources or methods so.)

in win32 application, can include dialog resource contains controls , layout information particular window. visual studio includes graphical dialog resource editor, many other win32 resource editing applications. similar you're used winforms designer, albeit few limitations. win32 older technology winforms , wasn't designed rad (rapid application development) principles in mind.

when create new win32 project based on template in visual studio, 1 dialog resource created you: box. if double-click on "projectname.rc" file in solution explorer, expand "dialog" resources folder, you'll see it. double-clicking on bring dialog editor dialog window. can add controls using familiar toolbox window, , customize them using familiar properties window.

   

you still need write code displays dialog window, of course. there 2 basic methods of doing so:

  • the dialogbox function display dialog modally, means user has close dialog before can interact rest of application. inconvenient user, rather convenient programmer because windows runs dialog's message loop you.

  • the createdialog function display normal (non-modal) dialog, requires write own message loop dialog window, normal non-dialog window.

you conceivably design of windows application way, adding separate dialog resources each of them, not idea. part of learning new ui framework learning how use framework way meant used. creating controls , setting properties through code @ runtime not difficult, , lot more powerful limiting fixed layout. (in fact, when have dialog resource fixed layout, you'll want write similar code allow customizing controls @ runtime.)


Popular posts from this blog

Apache NiFi ExecuteScript: Groovy script to replace Json values via a mapping file -

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -