Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Windows / Tier 2 how to acces the main window g_hWnd?

Author
Message
CoreGrid
1
Years of Service
User Offline
Joined: 16th Feb 2017
Location:
Posted: 16th Mar 2017 12:30 Edited at: 16th Mar 2017 12:34
So in my main.cpp script i have the following code above the the agk code:

#include "windows.h"

// Namespace
using namespace AGK;

app App;

HWND WINAPI hwndButton = CreateWindow(
"BUTTON", // Predefined class; Unicode assumed
"OK", // Button text
WS_VISIBLE, //WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // Styles
10, // x position
10, // y position
100, // Button width
100, // Button height
g_hWnd, //m_hwnd, // Parent window
NULL, // No menu.
NULL, //(HINSTANCE)GetWindowLong(m_hwnd, GWL_HINSTANCE),
NULL); // Pointer not needed.

// Then the agk code is under here


However how can i access the parent window which i think is g_hWnd which is declared in Core.cpp?
My goals is to draw a button to the screen and i cant use the agk functions since it is limited to 12 and i want to make a calculator.

Login to post a reply

Server time is: 2018-08-15 12:21:01
Your offset time is: 2018-08-15 12:21:01