|
-
Jun 29th, 2002, 04:28 PM
#1
Thread Starter
Lively Member
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 )
-
Jun 29th, 2002, 07:35 PM
#2
PowerPoster
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.
-
Jun 30th, 2002, 03:28 AM
#3
Thread Starter
Lively Member
Last edited by AlbafaN; Jun 30th, 2002 at 03:40 AM.
-
Jun 30th, 2002, 03:39 AM
#4
Thread Starter
Lively Member
Do most ppl design their MAIN form using VC++'s dialog editor (and im not talking about MFC).
-
Jun 30th, 2002, 04:54 AM
#5
Thread Starter
Lively Member
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;
}
-
Jul 10th, 2002, 06:51 PM
#6
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|