|
I don't get it.
So the full screen code should go where the WM_CREATE message is.
Andrew McIntyre
|
|
|
|
|
MrMcIntyre wrote: I don't get it.
Look, Andrew, you are never going to make any progress with this until and unless you sit down with some study materials and learn how Windows programs work. None of this stuff is hugely difficult once you get to understand things like Windows handles, messages, callbacks, user interaction etc. But, there is a learning curve, and unless you follow that route most of the answers you get here will be meaningless. And, believe me, everyone who answers these posts has had to go through that learning and hard work, to get to where they are now.
A little pain now will pay huge dividends in the long term.
|
|
|
|
|
Hi Richard,
It's just one slight problem with the display of the full screen.
<br />
hwnd = CreateWindowEx(<br />
WS_EX_CLIENTEDGE,<br />
g_szClassName,<br />
"My Project",<br />
WS_POPUP,<br />
CW_USEDEFAULT, CW_USEDEFAULT, 1062, 735,<br />
NULL, NULL, hInstance, NULL);
Andrew McIntyre
|
|
|
|
|
MrMcIntyre wrote: CW_USEDEFAULT, CW_USEDEFAULT, 1062, 735,
You are specifiying a fixed window size of 1062x735. If your screen is bigger than this (as mine is) then it does not fill it. Leave these values at the default and just change yor ShowWindow call to
ShowWindow(hWnd, SW_MAXIMIZE);
|
|
|
|
|
Take a look at this sample[^] which may help you in your quest. Note carefully the suggestions when you run the program and use them. Remember that all the tools suggested are there to help you succeed in your quest, but nothing comes without a cost. And when you have mastered all these arcane subjects please remember to share them with future generations.
|
|
|
|
|
Richard MacCutchan wrote: A little pain now will pay huge dividends in the long term.
Don't lie to me like that, Richard. I'm still waiting...
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Okay, I need to apologize to people who I have given a bad time and I truly regret it because I need your help with problems with the project that I can rely on you guys to help.
I have been trying to get this to work but its giving me nightmares. I am trying get the Win32 client to launch into full screen but I don't know where in the source code I need to place it exactly.
I know the code is:
<br />
<br />
SetWindowPos<br />
<br />
<br />
|
|
|
|
|
MrMcIntyre wrote: I am trying get the Win32 client to launch into full screen but I don't know where in the source code I need to place it exactly.
Is it an MFC application?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
What do you mean by MFC?
Andrew McIntyre
|
|
|
|
|
Apparently not. Did you not notice the "MFC" in the name of this forum?
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
No. It says C++ as well and its a Win32 not a MFC.
Andrew McIntyre
|
|
|
|
|
What does your call to CreateWindow() and ShowWindow() look like?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
<br />
hwnd = CreateWindowEx(<br />
WS_EX_CLIENTEDGE,<br />
g_szClassName,<br />
"My Project",<br />
WS_OVERLAPPEDWINDOW,<br />
CW_USEDEFAULT, CW_USEDEFAULT, 1062, 735,<br />
NULL, NULL, hInstance, NULL);
Andrew McIntyre
|
|
|
|
|
MrMcIntyre wrote: CW_USEDEFAULT, CW_USEDEFAULT, 1062, 735,
Have you changed these numbers (which are screen coordinates, not pixels) to see what the effect is? You can use CW_USEDEFAULT for all four arguments.
What about ShowWindow() ? You should be using SW_MAXIMIZE .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Can you show me how my code for the full screen should look like.
Andrew McIntyre
|
|
|
|
|
Can you show how you are calling ShowWindow() ?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I am just going out for a while. As soon as I get back I will post the code.
Andrew McIntyre
|
|
|
|
|
Do you want me to post the entire source code
Andrew McIntyre
|
|
|
|
|
Not really. I was really just trying to get you to focus in on a specific area of your code.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
<br />
ShowWindow(hwnd, nCmdShow);<br />
UpdateWindow(hwnd);
Andrew McIntyre
|
|
|
|
|
MrMcIntyre wrote: ShowWindow(hwnd, nCmdShow);
But you are not using SW_MAXIMIZE . Did you not like my suggestion?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I don't want it to maximize, I want it to launch into full screen.
Andrew McIntyre
|
|
|
|
|
Like a kiosk, or a video game? If so, you'll need to use the WS_POPUP style instead of WS_OVERLAPPEDWINDOW . You'll also have to assign 0 to lpszMenuName .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
Yeah, so you don't see the caption bar and the border.
So how will I use the WS_POPUP as code if someone could write a small bit of code just so I understand where to put it if you know what I mean.
Andrew McIntyre
|
|
|
|