Results 1 to 6 of 6

Thread: Third-party form designers

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109

    Third-party form designers

    Anyone know of any good form designers? I dont like using MFC, so I'm using CreateWindow for all my controls, but getting coordinates is a hassle, id rather use a simple form designer where i can just draw some controls on it and get the coordinates (maybe even set some properites, and let it generate my CreateWindow code for all my controls for me )

  2. #2
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Actually, I am working on this type of project.
    Meanwhile, you can also use a resouce dialog box and there are some resource editor that will let you create controls at design time using drag and drop. Infact, Visual C++ comes with its own good one.
    Baaaaaaaaah

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109
    ignore this post.
    Last edited by AlbafaN; Jun 30th, 2002 at 03:40 AM.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109
    Do most ppl design their MAIN form using VC++'s dialog editor (and im not talking about MFC).

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109
    Does this all seem correct?... Also, my window never gets a WM_DESTROY.. I thought it was supposed to? Just gets a WM_CLOSE.

    Code:
    #include "windows.h"
    #include "resource.h"
    #include "main.h"
    
    int APIENTRY WinMain(HINSTANCE hInst,HINSTANCE hPrev,LPSTR line,int CmdShow)
    {
    	HWND hMainDlg;
    	MSG msg;
    
    	hMainDlg = CreateDialog(hInst, MAKEINTRESOURCE(IDD_MAIN_DLG), NULL, MainDlgProc);
    	ShowWindow(hMainDlg, SW_SHOWNORMAL);
    
    	while(GetMessage(&msg, NULL, 0, 0))
        {
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }
    
    	return msg.wParam;
    }
    
    BOOL CALLBACK MainDlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
    {
        switch(Message)
        {
            case WM_COMMAND:
                switch(LOWORD(wParam))
                {
                    case IDC_OK:
    					switch(HIWORD(wParam))
    					{
    						case BN_CLICKED:
    							MessageBox(hwnd, "Hello World!", "Hi", MB_OK | MB_ICONEXCLAMATION);
    							break;
    					}
    					break;
    
                    case IDC_CANCEL:
    					switch(HIWORD(wParam))
    					{
    						case BN_CLICKED:
    							SendMessage(hwnd, WM_CLOSE, NULL, NULL);
    							break;
    					}
    					break;
                }
    			break;
    
    		case WM_CLOSE:
    			DestroyWindow(hwnd);
    			PostQuitMessage(0);
    			break;
    
            default:
                return FALSE;
        }
    
        return TRUE;
    }

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    AlbafaN: That depends. If the main window is really a form - that is a window with lots of controls - then a dialog template makes sense. If not it doesn't make sense.
    I made a single app that uses a dialog as main window...
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width