Wie kann ich (ohne MFC) die dialog-leiste weg machen???



  • also:
    ich wollte gerne 2 sachen wissen:
    1. Wie kann ich (ohne MFC) die dialog-leiste weg/durchsichtig machen???
    2. Wie kann ich den ganzen Rahmen des dialogs weg/durchsichtig machen???

    danke im vorraus!



  • Ohne MFC bist du wohl im Win-Api-Forum besser aufgehoben.



  • Dieser Thread wurde von Moderator/in estartu_de aus dem Forum MFC (Visual C++) in das Forum WinAPI verschoben.

    Im Zweifelsfall bitte auch folgende Hinweise beachten:
    C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?

    Dieses Posting wurde automatisch erzeugt.



  • So - wie kann ich jetzt dabei einfügen, dass ich die dialog-leiste und den rahmen nicht brauche???
    bitte - helft mir doch...

    int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int ncmdshow)
    {
    
    	WNDCLASSEX window; //blank window, we're using the extended windows class (WNDCLASSEX)
    	HWND hwnd; //window handle
    	MSG msg; //message
    
    	//now to fill in the window class
    	window.cbClsExtra = 0; //extra class stuff, set to 0 for now
    	window.cbSize = sizeof(WNDCLASSEX); //set to the size of the WINDOWCLASSEX structure
    	window.cbWndExtra = 0; //extra class stuff, set to 0 for now
    	window.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);//BLACK_BRUSH); //sets the color of the brush to paint in, notice the type cast to HBRUSH, this is because GetStockObject() can be used for more tehn just getting the brushcolor
    	window.hCursor = LoadCursor(NULL, IDC_ARROW); //cursor for your app, sets it to the standard arrow
    	window.hIcon = LoadIcon(NULL, IDI_APPLICATION); //icon of your program
    
    window.hIconSm = LoadIcon(NULL, IDI_APPLICATION); //icon that appears on the titlebar and when minimized
    	window.hInstance = hinstance; //the application instance
    	window.lpfnWndProc = WindowProc; //name of the function that takes care of the messages
    	window.lpszClassName = "WINCLASS1"; //name of the class
    	window.lpszMenuName = NULL; //menu, dont worry about this now (maybe in a later example, just set it to NULL
    	window.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW; //finally the style of the window, these are 
    																	//the most used and should suffice
    
    	//register the window class, notice we're using RegisterWindowEx() because we are using the extended window class
    	if(!RegisterClassEx(&window))
    		return 0;
    
    	//create the window
    	if(!(hwnd = CreateWindowEx(
    		NULL,//WS_EX_TRANSPARENT, //extended style
    		"WINCLASS1", //name of the class
    		"... by K4!53R", //title of the window
    		WS_OVERLAPPEDWINDOW | WS_VISIBLE, //common flags, you DO want to see your window, right?
    		0, 0, //initial x and y postion
    		650, 515, //initial height and width
    		NULL, //handle to parent, set to NULL so the desktop is the parent
    		NULL, //handle to menu, we didnt use a menu now so dont worry about it
    		hinstance, //instance of application
    		NULL ))) //extra param
    	return 0;
    
    	//main event loop
    	while(true)
    	{
    
    		//test if we have a message waiting for us in queue, if there is, take care of it
    		if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
    		{
    
    			//check if message is a WM_QUIT message
    			if(msg.message == WM_QUIT)
    				break;
    
    			//translate any accelerator keys
    			TranslateMessage(&msg);
    
    			//send message to the window proc 
    			DispatchMessage(&msg);
    
    		}
    
    	}//end while
    
    	//use this to return to windows
    	return(msg.wParam);
    
    }//end WinMain
    


  • Benutze anstatt WS_OVERLAPEDWINDOW nur WS_OVERLAPED

    WS_OVERLAPPEDWINDOW enthält nämlich unter anderem schon WS_CAPTION und WS_THICKFRAME



  • OK habe ich gemacht!
    das ändert aber nichts daran, dass ich eine dialogleiste
    und den ramen habe...
    nur das systemmenü ist verschwunden...



  • OK...da war ich bischen zu voreilig

    mit WS_POPUP müßste es gehen.



  • JAAA es funktioniert!
    danke danke danke!!!
    🙂 😃 🙄 🕶 🤡 😋 👍


Anmelden zum Antworten