I really would like to create my dialog boxes within a resource editor and use that resource file as my reference for the dialog box within my program, and so that's what Ive been doing... However in my program I want to include a slider toolbar to change iterations for fractal generation and this is part of my resource
And I have declared it earlier in the program as such:
IDD_TOOLBAR DIALOGEX 300,-29,236,187
FONT 8,"MS Sans Serif",0,0,0
CONTROL "Close Program",IDC_EXIT,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,142,9,84,15
CONTROL "Iterations for strange attractor and IFS fractals",IDC_STC1,"Static",WS_CHILD|WS_VISIBLE,84,46,146,9
#define IDC_TRB1 701 // Trackbar 1
When I compile my program the slider toolbar is already on the dialog that I have created, but it's virtually useless because I cant read from it or set its length, or anything!
My question is how do I use the resource.rc file where my toolbar is coded and initialize the toolbar elsewhere in my program, psuedocode or code references would be appreciated.
I know that people have declared that a toolbar was to be created right at the WM_CREATE part of the window initialization, but instead of useing:
I would rather like to use my predefined toolbar from the .rc file, sorry if im being redundant.
track_bar = CreateWindowEx(NULL, TRACKBAR_CLASS,
"Trackbar", WS_CHILD | WS_VISIBLE | TBS_AUTOTICKS | TBS_ENABLESELRANGE,
10, 10, 200, 30, hwnd, (HMENU)ID_TRACKBAR, hinstance_main, NULL );
Also I'm rather new to WIN32 API programming, I miss VGA, so please be patient with me if Ive been rather blatantly ignorant to certain aspects of API programming