Hi, i wan't to put a program i wrote to show up under a windows program, not a dos program. HELP please.
Hi, i wan't to put a program i wrote to show up under a windows program, not a dos program. HELP please.
Could you be more specific please? I'd like to help but I'm kind of confused.
The world is waiting. I must leave you now.
I typed a windows skelton program but i can't get programs to compile in the windows skelton. the programs will be in a DOS window
> I typed a windows skelton program but i can't get programs to compile in the windows skelton. the programs will be in a DOS window.
Hold on a second:
I wrote a windows skeleton program but I can't get the programs to compile inside the windows skeleton. The programs will be in a DOS window.
Could you show me any code at all that you've been working with? I'm way confused.
The world is waiting. I must leave you now.
Here is the code for my skelton:
#include <windows.h>
LRESULT CALLBACK WindowFunc(HWND, UINT, WPARAM, LPARAM);
char szWinName[] = "MyWin";
int WINAPI WinMain(HINSTANCE hThisInst, HINSTANCE hPrevInst,
LPSTR lpszArgs, int nWinMode)
{
HWND hwnd;
MSG msg;
WNDCLASSEX wcl;
wcl.cbSize = sizeof(WNDCLASSEX);
wcl.hInstance = hThisInst;
wcl.lpszClassName = szWinName;
wcl.lpfnWndProc = WindowFunc;
wcl.style = 0;
wcl.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wcl.hIconSm = NULL;
wcl.hCursor = LoadCursor(NULL, IDC_ARROW);
wcl.lpszMenuName = NULL;
wcl.cbClsExtra = 0;
wcl.cbWndExtra = 0;
wcl.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
if(!RegisterClassEx(&wcl)) return 0;
hwnd = CreateWindow(
szWinName,
"Windows 2000 Skeleton",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
hThisInst,
NULL
);
ShowWindow(hwnd, nWinMode);
UpdateWindow(hwnd);
while(GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
LRESULT CALLBACK WindowFunc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam)
{
switch(message) {
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hwnd, message, wParam, lParam);
}
return 0;
}
i was looking at the code and i think that because there is no extra memory in the program then another program can't compile in it. am i right?
I don't know if you're right. I cannot answer that and refuse to mislead you and your program. Perhaps you should direct your post towards the Windows board. While posting it over there, use code tags please.
The world is waiting. I must leave you now.
ok, thanks for your help.
sorry for npt posting my code first
Don't be sorry. You have the code! It looks to me like you've put in the effort, now once you get it over on the windows board with some code tags, it'll be led in the right direction.
The world is waiting. I must leave you now.
I know that piece of code!
It's in the book : "C the complete reference"
& that's a problem because I'm only guessing that u got a msgbox saying that that's not a valid win32 program.
P.S.: by the way nice enhancement of the code.
Ünicode¬>world = 10.0£