I am developing a notepad package using windows API.
To acheive that I need to place windows common controls on a window but not on a dialog box
Can any body suggest me a solution for placing windows common controls on a window
bye
vamshi
I am developing a notepad package using windows API.
To acheive that I need to place windows common controls on a window but not on a dialog box
Can any body suggest me a solution for placing windows common controls on a window
bye
vamshi
No problem. But I must warn you, you can't make the controls in your resource file. Just use the CreateWindow() function.
use the
WS_CHILD style
in the
CreateWindowEx()
cast the
HMENU
param to an int ID number
(HMENU)IDC_MYCHILDCTRL,
I like to define them
#define IDC_MYCHILDCTRL 40001
the
hWndParent
defines the callback (wndproc) to which the controls messages will be sent.
Remember to
InitCommonControlsEx()
if using the more complex controls
You will have to code for different window sizes / resizes ect
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
>>But I must warn you, you can't make the controls in your resource file<<
You can if you use the CONTROL resource definition statement but you still need to use InitCommonControlsEx to load in comctl32.dll.
Nice avatar, BTW, master5001.
Thanks Ken. As far as using CONTROL's I would say that it is no less work using CreateWindow() or CreateWindowEx(). But that is just a matter of preference I suppose
My preference would be for CreateWindowEx, too.