I am finding it hard to find a way to maximize a form on startup something that I was able to do on winapi

ShowWindow (hwnd, SW_SHOWMAXIMIZED);

Kindly help me sort out this very important thing to me at the moment

I am finding it hard to find a way to maximize a form on startup something that I was able to do on winapi ```` ShowWindow (hwnd, SW_SHOWMAXIMIZED); ```` Kindly help me sort out this very important thing to me at the moment

You can use the Win32 API for anything you want, because the library exposes the native handles for everything, from graphic device contexts to windows.

nana::form fm;
HWND hwnd = reinterpret_cast<HWND>(fm.native_handle());
ShowWindow(hwnd, SW_SHOWMAXIMIZED);

The window is created when you construct the form object, so you can obtain the handle immediately.

Edit: I should mention that you don't need to use Win32 in this case, you can use the library to maximize the window:

nana::form fm;
nana::API::zoom_window(fm, true);
You can use the Win32 API for anything you want, because the library exposes the native handles for everything, from graphic device contexts to windows. ```` nana::form fm; HWND hwnd = reinterpret_cast<HWND>(fm.native_handle()); ShowWindow(hwnd, SW_SHOWMAXIMIZED); ```` The window is created when you construct the `form` object, so you can obtain the handle immediately. Edit: I should mention that you don't need to use Win32 in this case, you can use the library to maximize the window: ```` nana::form fm; nana::API::zoom_window(fm, true); ````
edited Jun 24 at 1:17 am
18
views
1
replies
2
followers
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft