Questions tagged [winmain]

WinMain is the user provided entry point for graphical Windows based applications.

WinMain is the user provided entry point for graphical Windows based applications. It is used as an entry point in every such Windows application. WinMain is used to initialize the application, display its main window, and enter a message retrieval-and-dispatch loop that is the top-level control structure for the remainder of the application's execution.

125 questions
0
votes
2 answers

I am trying to put a WINAPI WinMain in a dll

I am making a dll file and at the same time trying to call this function automatically when my DLL is loaded. How can I do this? It is a Windows API main function that creates a window but I dont know how do it. My first idea is to put it into…
Programmer
  • 121,791
  • 22
  • 236
  • 328
0
votes
4 answers

c++ use of winmain()

I just started learning programming for windows in c++. I had this crazy image, that win32 programming is based on calling windows functions and sending parameters to and from them. Like, when you want to create window, you call some win32 function…
Jack
  • 761
  • 1
  • 7
  • 4
0
votes
1 answer

How to detect if a user pressed Ctrl-Alt-Del or Alt-Tab so that I may minimize my program?

I'm writing a program in C++ using DirectX 11, and I would like to have it so that my program minimizes whenever a user presses Ctrl-Alt-Del or Alt-Tab. Getting the window itself to minimize is the easy part, as all I have to do is call this…
Tundra Fizz
  • 473
  • 3
  • 10
  • 25
0
votes
1 answer

LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

Googled for a couple of hours already to solve this error and found out a lot of people get this error, but haven't found a solution for my own case yet. Most of the time the solution is to change the SubSystem to the appropriate option in the…
Jvlonden
  • 155
  • 2
  • 8
0
votes
1 answer

Error creating a window in windows "undefined reference to 'WinMain@16'"

#ifndef UNICODE #define UNICODE #endif #include LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int …
Paolo Caponeri
  • 127
  • 4
  • 15
0
votes
2 answers

Boost C++ - Entry points?

Basically I moved on from the main() entry point in my project and changed to a windows project - WINAPI WinMain(...) However Boost complains saying that cpp_main() is missing. How can I avoid this? Thanks.
user1255454
  • 669
  • 1
  • 8
  • 18
0
votes
1 answer

Command Line Parameters Through WinMain and CommandLineToArgvW

I'm encountering a problem when trying to pass a parameter through my program via the command line (eg. -w 1280 -h 1024) while attempting to utilize WinMain. I've looked through every topic I could find, and have created code that builds and runs,…
iikorni
  • 507
  • 5
  • 16
0
votes
2 answers

WinAPI - how to organize lots of HWND objects?

As I push forward my first winapi UI, I find myself creating large, uncomfortable stacks of HWND variables in my WinMain file: HWND foo; HWND bar; HWND baz; HWND etc; int WINAPI WinMain(...) {} Of course, these variables are used in the functions…
Ben
  • 54,723
  • 49
  • 178
  • 224
0
votes
1 answer

visual studio compiler?

i try to complete this tutorial, but i don't know what VS 2008 project to use for it, as everything that i tried gave me either a error C2731: 'wWinMain' : function cannot be overloaded error (for a Win32 project where i change the APIENTRY…
MRM
  • 561
  • 5
  • 12
  • 29
0
votes
2 answers

Calling WinMain from Java : Possible ? Any other way?

How do i call this method from java : WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) Is it possible to call WinMain from java ? I want the value of the arguments in that function be same as when…
Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328
0
votes
1 answer

Trouble with libgsl and wxwidget

I'm having difficulty building a project in Windows 7 / Visual Studio 2010, and already spent longer than I would admit googling and fixing other errors to get to this point, but frustratingly I can't seem to get rid of the very last error. There is…
3lbom
  • 139
  • 1
  • 1
  • 11
-1
votes
1 answer

undefined reference to `WinMain'

I am taking a course in c++ and I've copied the code and done exactly the same as the tutor in the course did in the lecture, however when I do so I get a long error "...undefined reference to `WinMain'" and I don't know what to do. I am using…
Tob237
  • 291
  • 1
  • 5
  • 15
-2
votes
1 answer

Overloading WinMain() function while using Unicode character set

How can i overload the WinMain() function while using Unicode character set in Visual Studio? Thank you. Here's the code i am talking about
Anon
  • 1,274
  • 4
  • 17
  • 44
-2
votes
1 answer

Why can I not set "Game Window Class" as my class name?

I'm wondering why I cannot set the name. This is the error: It doesn't even let me assign a char. #include LRESULT CALLBACK window_callback(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { return DefWindowProc(hwnd, uMsg,…
Stella
  • 1
  • 3
-2
votes
2 answers

Where is WinMain() in Win32 API implemented?

Was just curious to know where the WinMain() method in the Win32 API is implemented. I know that WinMain() is declared in WinBase.h, but when the application runs, where does it refer to for WinMain() function's body?
Kumaravel Rajan
  • 131
  • 1
  • 2
  • 10
1 2 3
8
9