|
Immediately after posting that last message, I realised i'd used a regular dialog box template, not a IDD_FORMVIEW type template.
Oh dear, i think it's time to get some sleep.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
I have problem with style report in the concrete with resizeing columns. I wrote code to autoresize(as resizeing column in Outlook) column but problem is while users changeing width of App (for example CListView in SDI app). During resizeing (because width of column is not changeing at once) users can see horz. scrollbar. Present MS-Outlook - here is same case.
Can I set width of column at once ? Currently I useing function SetItem().
My Code :
HRESULT CDodomuHeaderCtrl::OnLayout(WPARAM wparam,LPARAM lparam){
if (!m_bNowResizeing){
AutoSizeItems();
LPHDLAYOUT lay = (LPHDLAYOUT)lparam;
HRESULT lResult = CHeaderCtrl::DefWindowProc(HDM_LAYOUT, 0, lparam);
return lResult;
}
else {
return NULL;
}
}
void AutoSizeItem(){
... compute new width
m_bNowResizeing = true;
for(....){ // (remark 1)
HDITEM item;
... fill struct
SetItem(i,&item);
}
m_bNowResizeing = false;
}
-----
remark 1. :
Here is greatest problem : If users decrease width of ListCtrl will in moment width of all column >> ( ) then client area and Windows (CListCtrl) show horz. scrollbar.
Please ... Can you help me ?
Thank VERY MUCH !!!!
Wizard
|
|
|
|
|
Haven't tried it myself, but maybe you can use WM_SETREDRAW to disable automatic redrawing while the resizing is in progress:
void AutoSizeItem(){
... compute new width
SendMessage(WM_SETREDRAW,(WPARAM)FALSE);
for(....){
HDITEM item;
... fill struct
SetItem(i,&item);
}
SendMessage(WM_SETREDRAW,(WPARAM)TRUE);
} Let us know if that worked! Regards,
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
))
Thank you for !!!
Wiizi
|
|
|
|
|
Hi
I have a property sheet , within that we have a property page
i want to change the default size of the page
OnInitDialog of page is never called as we just add pages to the sheet
How do we size the page by default ??
parag
|
|
|
|
|
By default OnInitDialog is not called when you add a property page to a sheet, but rather the first time the property page is displayed. You can force OnInitDialog to be called when the property sheet is created by setting the flag PSP_PREMATURE in the dwFlags member of the PROPSHEETPAGE structure associated to a property page --note however that this capability is only supported starting from version 4.71 of the common controls library.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
All,
Forgive this dumb-assed question...
I want to implement and owner-drawn radio button. If I add a radio button in dialog editor, it's resource id never appears in the member variables tab in ClassWizard.
Why not? Surely I don't have to CMyRButton::Create() on them? there must be a way to use the dialog editor?
Thanks
Jon
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
You mean you put radio button in dialog and check owner draw check box?
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
You have to give all radio controls a unique ID... I think thats the problem... because it's the same thing with ALL static text controls. They have ID IDC_STATIC (I think) and if you change it to IDC_STATIC1 then it will appear in the CW.
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
I tried this, having had the same problem with static's in the past. No luck though... they still don't appear.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
I tried it and no probs at all.
If you have three radio buttons then check the "group" setting for the first box. Only then will it come in CW
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Does anyone know if wizards are supported in WinCe? I am attempting to create on my device runing WinCe 3.0 and I am getting an error of SetWizardMode not a member of CWizardSheet, which is my derived class from CPropertySheet.
Just wondering if they are supported or not.
Thanks,
-Eric
Disregard this, after looking in the documentation it clearly states that wizards are not supported in wince.
|
|
|
|
|
If I create an MDI application using visual studio, how do I make an openGL child window for the application?
|
|
|
|
|
Hi !
I'm trying to subclass the control 'CListCtrl'. I now have a new class, derived from CListCtrl and I'm trying to find a way to draw specific parts of the control by myself, but I don't really know where to start.
I read articles talking about 'ownerdraw', but it seems it doesn't work the same with sublassed controls and ownerdrawed controls.
Any help will be greatly appreciated !
Jerome
|
|
|
|
|
You can check CListCtrls in CP ,look in source code of them and see DrawItem
function of them
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
Look at XListCtrl:
http://www.codeproject.com/listctrl/XListCtrl.asp
|
|
|
|
|
I don't think deriving a class is quite sub-classing...i dunno i could be wrong.
Owner drawn list controls is alot of work, I would personally suggest using CustomDraw instead...this way you only draw the parts you want and let windows draw the rest.
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
This is for you
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
hey guys and girls, sorry if this has been asked before but i couldn't find much on it, is there a quick and easy way show a open dialog box and get the filename they select?
thanks for any help
m.
|
|
|
|
|
if using mfc, see CFileDialog
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Simple,check:CFileDialog
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
CFileDialog open(TRUE, "ext", "Untitled");
CString file = open.GetFileTitle();
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Is there some function that gives me the weekday if I lend it a date? For example, if I feed it 11.02.2001 (today) it returns monday. It will simply be too troublesome to create such a function myself
Sprudling
|
|
|
|
|
check CTime::GetDayOfWeek
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
It seems that MS Visual C has compiling options
just for Portable Executables forma.
I want to write a boot sector. Can anybody tell me
if I should use another tool? Or is a way to enable VC
to compile in such target? Or maybe I should use DDK?
Thanks.
|
|
|
|