Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Win32 (http://www.go4expert.com/forums/win32/)
-   -   Adding a bitmap plot inside a dialog box (http://www.go4expert.com/forums/adding-bitmap-plot-inside-dialog-box-t18994/)

kansbujji 12Aug2009 02:23

Adding a bitmap plot inside a dialog box
 
Hi,
I'm developing GUI for my project. I'm working in Windows and using VC+
+ 2008.

I've found some examples, on internet, using which I've developed a
dailog box window using win32 api. The
example has a list box and few buttons. I managed to add some more
buttons which I need, but I don't want the list box.
My objective is to plot pixels and embed it in the dialog
box. So can anyone please help me on how to get rid of the listbox and
replace that area occupied by the listbox with a bitmap where I can plot pixels? Simply, put I'm trying to develop a GUI which displays signal waveforms and pixel based images.



Below is the resource file corresponding :

Instead of the LISTBOX I'd like to put my bitmap. Can anybody pls tell
me how to do it?
Code:

//Microsoft Developer Studio generated resource script.
 //
 #include "resource.h"
 
#define APSTUDIO_READONLY_SYMBOLS
 /////////////////////////////////////////////////////////////////////////////
 //
 // Generated from the TEXTINCLUDE 2 resource.
 //
 #define APSTUDIO_HIDDEN_SYMBOLS
 #include "windows.h"
 #undef APSTUDIO_HIDDEN_SYMBOLS
 
/////////////////////////////////////////////////////////////////////////////
 #undef APSTUDIO_READONLY_SYMBOLS
 
/////////////////////////////////////////////////////////////////////////////
 // English (U.S.) resources
 
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
 #ifdef _WIN32
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 #pragma code_page(1252)
 #endif //_WIN32
 
#ifdef APSTUDIO_INVOKED
 /////////////////////////////////////////////////////////////////////////////
 //
 // TEXTINCLUDE
 //
 
1 TEXTINCLUDE DISCARDABLE
 BEGIN
 "resource.h\0"
 END
 
2 TEXTINCLUDE DISCARDABLE
 BEGIN
 "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
 "#include ""windows.h""\r\n"
 "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
 "\0"
 END
 
3 TEXTINCLUDE DISCARDABLE
 BEGIN
 "\0"
 END
 
#endif // APSTUDIO_INVOKED
 
/////////////////////////////////////////////////////////////////////////////
 //
 // Dialog
 //
 
IDD_MAIN DIALOG DISCARDABLE 0, 0, 550, 350
 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "TiSER - GUI"
 FONT 8, "MS Sans Serif"
 //FONT 8, "MS Gothic"
 BEGIN
 //LTEXT "Add",IDC_STATIC,7,10,14,8
 EDITTEXT IDC_TEXT,25,7,120,14,ES_AUTOHSCROLL
 EDITTEXT IDC_NUMBER,150,7,21,14,ES_NUMBER
 //LTEXT "times.",IDC_STATIC,177,10,23,8
 LISTBOX IDC_LIST,7,25,400,256,LBS_NOINTEGRALHEIGHT |
 LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP
 PUSHBUTTON "&Add",IDC_ADD,425,30,50,14
 PUSHBUTTON "&Remove",IDC_REMOVE,425,47,50,14
 PUSHBUTTON "&RESET",IDC_CLEAR,425,63,50,14
 //PUSHBUTTON "&RESET",IDC_RESET,440,80, 50,14
 PUSHBUTTON "&PLOT-EYE",IDC_PLOT,425,80, 50,14
 
//LTEXT "This item was added",IDC_STATIC,7,291,66,8
 CTEXT "-",IDC_SHOWCOUNT,77,291,32,8
 LTEXT "Time (ns)",IDC_STATIC,214,291,90,8
 
LTEXT "Sampling Frequency (GHz)", IDC_STATIC, 425,106,90,8
 EDITTEXT IDC_SF,425,115,50,14,ES_NUMBER
 LTEXT "Laser Rep. Rate (GHz)", IDC_STATIC, 425,130,90,8
 EDITTEXT IDC_LRR,425,139,50,14,ES_NUMBER
 LTEXT "Data Rate (GHz)", IDC_STATIC, 425,154,90,8
 EDITTEXT IDC_DR,425,163,50,14,ES_NUMBER
 LTEXT "Aperture Length", IDC_STATIC, 425,178,90,8
 EDITTEXT IDC_AL,425,187,50,14,ES_NUMBER
 LTEXT "Skip pulses", IDC_STATIC, 425,202,90,8
 EDITTEXT IDC_SP,425,211,50,14,ES_NUMBER
 LTEXT "Stretch Factor (m)", IDC_STATIC, 425,226,90,8
 EDITTEXT IDC_SFM,425,235,50,14,ES_NUMBER
 LTEXT "Overlap Frames", IDC_STATIC, 425,250,90,8
 EDITTEXT IDC_OF,425,259,50,14,ES_NUMBER
 LTEXT "Initial CF guess", IDC_STATIC, 425,274,90,8
 EDITTEXT IDC_CF,425,283,50,14,ES_NUMBER
 
END
 
/////////////////////////////////////////////////////////////////////////////
 //
 // DESIGNINFO
 //
 
#ifdef APSTUDIO_INVOKED
 GUIDELINES DESIGNINFO DISCARDABLE
 BEGIN
 IDD_MAIN, DIALOG
 BEGIN
 LEFTMARGIN, 7
 RIGHTMARGIN, 200
 VERTGUIDE, 145
 VERTGUIDE, 150
 TOPMARGIN, 7
 BOTTOMMARGIN, 149
 END
 END
 #endif // APSTUDIO_INVOKED
 
#endif // English (U.S.) resources
 /////////////////////////////////////////////////////////////////////////////

Thanks a lot,
Amar


All times are GMT +5.5. The time now is 09:05.