dialog boxes c programming?
hey, i have a project to do for tonight...and what i had on my usb is gone as my usb will not work...any body out there know how to do those dialog boxes ...what was it menu open? any help would be majorly appreciated thanks
Comments
Dialouge box can be made using functions in the window API.II used Codeblock to program.There are three files of this project:-
a)source file[main.cpp]
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK);
return 0;
}
b)resource file[resourse.rs] //that is created by itself in Codeblocks
#include "resource.h"
DLG_MAIN DIALOGEX 6, 5, 194, 106
CAPTION "Code::Blocks Template Dialog App"
FONT 8, "MS Sans Serif", 0, 0, 1
STYLE 0x10CE0804
BEGIN
CONTROL "&Test", IDC_BTN_TEST, "Button", 0x10010000, 138, 5, 46, 15
CONTROL "&Quit", IDC_BTN_QUIT, "Button", 0x10010000, 138, 29, 46, 15
END
3)resource.h
#include <windows.h>
// ID of Main Dialog
#define DLG_MAIN 101
// ID of Button Controls
#define IDC_BTN_TEST 1001
#define IDC_BTN_QUIT 1002
is that what you need.I made it about 2 years ago from examples in a book.But that was in c++
There are no dialog boxes in C. Evidently you're using some kind of GUI library, that you didn't tell us about, so it'll be hard to give you the answer you're looking for.