Hello World shows up, but the window is invisable, and please do nnot tell me to paint it in, its futile that I be able to see the exit button, and other buttons
Thanks for anyone who helps, I figured since this was a different question it belonged in a different thread.
switch(msg){
// Window is being created
case WM_CREATE:
return 0;
//Return it to make sureit works properly and displays the error messages
// And then break the switch statement for efficiency factors.
break;
case WM_CLOSE:
// see if the window is closes
PostQuitMessage(1);
// if so send a message to the window telling it to close
return 0;
// check for errors
break;
// break it again
DWORD COLORREF;
case WM_PAINT:
hDC = BeginPaint(hwnd, &paint);
SetTextColor(hDC, COLORREF = 0x00FF1000);
TextOut(hDC, 150, 150, string, sizeof(string)-1);
EndPaint(hwnd, &paint);
return 0;
break;
}
int APIENTRY WinMain(HINSTANCE DERP,
HINSTANCE hp,
LPSTR CmdLine,
int cmdshow ){
//shortining up and tagging everything.
//first up the class of the window.
WNDCLASSEX WC;
// The windows handle is next
HWND hwnd;
// Now the messages sent back and forth telling the window what to do and when to do it (etc)
MSG mesg;
// I am not sure what the bool valye is for.
// Now on to making the Window
WC.cbSize = sizeof(WNDCLASSEX);
// Size of the window in pixels
WC.style = CS_HREDRAW||CS_VREDRAW;
// The windows style
WC.lpfnWndProc = WndProc;
WC.cbClsExtra = 0;
WC.cbWndExtra = 0;
WC.hInstance = DERP;
WC.hIcon = LoadIcon(NULL, IDI_ASTERISK);
WC.hCursor = LoadCursor(NULL, IDC_CROSS);
WC.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
WC.lpszMenuName = "Prototype(In Progress)";
WC.lpszClassName = "Class";
WC.hIconSm = LoadIcon(NULL, IDI_WARNING);
//Register the window class
yes you can. c++ isnt an end all language. the program he is trying to do is very simple in java.it would be wrong to tell people to only program in one langauge
I know, but what if it requires as much speed as it can get? What if he's planning onintegrating it with assembly because it is a gui for a large database?
It was me, still not exactly sure what I did wrong, but I copied and pasted there code and tested it, it worked fine. I have just copied it wrong somewhere, although I am not sure where.