|
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
|
|
|
|
|
MrMcIntyre wrote: So how will I use the WS_POPUP as code...
Since I suggested using WS_POPUP instead of WS_OVERLAPPEDWINDOW , can you find in your code where WS_OVERLAPPEDWINDOW is currently being used and replace it with WS_POPUP ?
"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
|
|
|
|
|
Here it my code for the Create Window part, to see if I have done it right.
<br />
hwnd = CreateWindowEx(<br />
WS_EX_CLIENTEDGE,<br />
g_szClassName,<br />
"iWorld",<br />
WS_POPUP<br />
CW_USEDEFAULT, CW_USEDEFAULT, 1062, 735,<br />
NULL, NULL, hInstance, NULL);
Andrew McIntyre
|
|
|
|
|
Aside from the missing comma, what you have is right. To save confusion, you might want to use CW_USEDEFAULT or 0 for arguments 5-8.
"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
|
|
|
|
|
The code ran successfully. But the application did not cover the entire screen in full screen it was just a client with no border to the top left.
I would like the full screen to cover the entire screen if you know what I mean.
Andrew McIntyre
|
|
|
|
|
|
I created a Win32 app with just the two changes I mentioned and it was indeed full screen.
"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
|
|
|
|
|
David, I don't really understand the 5-8 argument part. I solved the other one.
"To save confusion, you might want to use CW_USEDEFAULT or 0 for arguments 5-8."
Andrew McIntyre
|
|
|
|
|
See here and 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
|
|
|
|