|
Will you be able to post your code ?? I think it's likely that the data that you're trying to use is no longer exist. This happens when you don't overide the OK button!!
|
|
|
|
|
I'm writing to a database using appendChunk. it just goes and keeps adding to the same database - instead of overwriting it. THere dont seem to be any parameters that I can set in the method. I open the database using the recordset.Open function and I didnt see anything there that I could set either to make the database get rewritten.
PLease help!
ns
|
|
|
|
|
Try setting that field to null first.
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|
By default when I create propertysheets for my dialog they have Help button.How can I remove this button?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
In OnInitDialog() , do GetDlgItem(IDHELP)->ShowWindow(SW_HIDE);
---
Shog9
Actually I use to find learning in bars when drinking really useful.
It sort of makes a language liquid. - Colin Davies, Thinking in English?
|
|
|
|
|
Thank you Shog9.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Anybody knows where i can download the OpenML SDK?
Kiddxin
|
|
|
|
|
Have you ever heard of a search engine? I recommend google. And, boy, does this lower the signal-to-noise ratio
|
|
|
|
|
Oh,I'm searching it too .
Tell me when you find it out !
Thank you !
|
|
|
|
|
|
I have an MFC MDI program using VC6. When the application starts I want the initial child window to be maximized within the frame. I've tried ModifyStyle(0,WS_MAXIMIZE); in the OnActivateView() and added cs.style |= WS_MAXIMIZE; to the beginning of PreCreateWindow(); Any other ideas?
|
|
|
|
|
I don't know if this is the correct way, but in the ActivateFrame Method I set the SW_SHOMAXIMIZED flag, this does the job just for the intial activation of the window.
<br />
void CChildFrame::ActivateFrame(int nCmdShow)<br />
{<br />
nCmdShow = SW_SHOWMAXIMIZED;<br />
CMDIChildWnd::ActivateFrame(nCmdShow);<br />
}<br />
If you have more than one window in your MDI, i have noticed it will unmaximize when you switch to a new window.. I tried to get around this by using a ModifyStyle(NULL,WS_MAXIMIZE)
<br />
void CChildFrame::OnSetFocus(CWnd* pOldWnd) <br />
{<br />
CMDIChildWnd::OnSetFocus(pOldWnd);<br />
<br />
ModifyStyle(NULL,WS_MAXIMIZE);<br />
}<br />
As I said, I don't know if this is the correct way to do it.. Its just what I figured out while I was playing.. Please let me know if you find a better way.
-Rick
|
|
|
|
|
Thank you for your help. ActivateFrame() alone works in my program without the problem you described. My view is derived from CHtmlView, which is derived from CFormView. I created two instances of the same view during runtime (that is, I selected File | New), switched between them (Window | <view number="">) and both windows stayed maximized.
|
|
|
|
|
CChildFrame::ActivateFrame() is a recomended way to do this. I don't know if your code in CChildFrame::OnSetFocus() will do anything usefull however.
With MDI only one window is ever maximized at a time. When you switch to another window, the current window is restored to its normal size and then the new window is maximized. This is all a pain in the backside as far as I'm concerned and I assume it has something to do with the early Win 3.x MDI implementation.
One of the problems with this is that you can see the windows flash to restored and then maximized size as you change MDI windows and open and close windows. This flashing varies across different windows versions.
In my CChildFrame::ActivateFrame() in ED for Windows (see sig) I wrap the call to CMDIChildWnd::ActivateFrame() in pMDIClient->SetRedraw( FALSE/TRUE ) calls.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
Hi, I'm a newbie to MFC.
I have an MDI with CFormView as my base class. I can't find the ActivateFrame() function.
Someone suggested I try this in CMyFormView::OnInitialUpdate()
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit(FALSE);
but this still doesn't work.
Any suggestions?
Cheers
|
|
|
|
|
Kash wrote:
ActivateFrame() is a member of CMDIChildWnd. The Help will tell you this. To access it you need to derive a class from CMDIChildWnd. This is usually named CChildFrame.
Then you can use CChildFrame::ActivateFrame()
If you want to get at the MDI Client Window inside this then use: CWnd* pMDIClient = GetParent();
Make sure you call CMDIChildWnd::ActivateFrame() from within your CChildFrame::ActivateFrame().
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
I've used it in PreCreateWindow in the ChildFrm and it works great. cs.style |= WS_MAXIMIZE. I placed it after the CMDIChildWnd::PreCreateWindow( cs ); Perhaps something else is confusing it.
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|
I didn't put it in that class, and that's why it probably did not work. Thanks for your suggestion.
|
|
|
|
|
|
Checkout the docs on WM_PAINT . (sorry, i'm just too tired to try and explain this any better tonight. If the docs don't help, do a search here - there are several examples i think).
---
Shog9
Actually I use to find learning in bars when drinking really useful.
It sort of makes a language liquid. - Colin Davies, Thinking in English?
|
|
|
|
|
I have dialog based app, and I need to remove the horisontal scroll bar. How can I prevent horisontal bar creation in the ListCtrl?
Pavel Sokolov,
CEZEO software,
LanTalk Network,
http://www.cezeo.com
http://www.lantalk.net
|
|
|
|
|
Hello,
I would like to create an icon resource in order for me to create the icon at run time. Do you have any idea how to prepare the raw data for CreateIconFromResourceEx? The following is the example for what I'm talking about. This is an example from WTL Docking windows by Sergey Klimov (kidd@ukr.net)
static BYTE pinnedIconData[]={
0x28, 0000, 0000, 0000, 0x0b, 0000, 0000, 0000,
0x16, 0000, 0000, 0000, 0x01, 0000, 0x04, 0000,
0000, 0000, 0000, 0000, 0x84, 0000, 0000, 0000,
0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000,
0x10, 0000, 0000, 0000, 0000, 0000, 0000, 0000,
0000, 0000, 0000, 0000, 0000, 0000, 0x80, 0000,
0000, 0x80, 0000, 0000, 0000, 0x80, 0x80, 0000,
0x80, 0000, 0000, 0000, 0x80, 0000, 0x80, 0000,
0x80, 0x80, 0000, 0000, 0x80, 0x80, 0x80, 0000,
0xc0, 0xc0, 0xc0, 0000, 0000, 0000, 0xff, 0000,
0000, 0xff, 0000, 0000, 0000, 0xff, 0xff, 0000,
0xff, 0000, 0000, 0000, 0xff, 0000, 0xff, 0000,
0xff, 0xff, 0000, 0000, 0xff, 0xff, 0xff, 0000,
0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000,
0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000,
0000, 0x07, 0x70, 0000, 0000, 0000, 0000, 0000,
0000, 0x77, 0x77, 0000, 0000, 0000, 0000, 0000,
0000, 0x7f, 0x80, 0000, 0000, 0000, 0000, 0000,
0000, 0xf0, 0x07, 0x77, 0000, 0000, 0000, 0000,
0000, 0x0f, 0000, 0xf7, 0x70, 0000, 0000, 0000,
0000, 0000, 0x0f, 0x0f, 0x70, 0000, 0000, 0000,
0000, 0000, 0000, 0xf0, 0x70, 0000, 0000, 0000,
0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000,
0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000,
0x7f, 0xff, 0xff, 0xff, 0x81, 0xff, 0xff, 0xff,
0x80, 0xff, 0xff, 0xff, 0x80, 0x7f, 0xff, 0xff,
0x80, 0x7f, 0xff, 0xff, 0x90, 0x3f, 0xff, 0xff,
0xa4, 0x3f, 0xff, 0xff, 0xd2, 0x3f, 0xff, 0xff,
0xe5, 0x3f, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff};
HICON icons = CreateIconFromResourceEx(unpinnedIconData, 0xec, TRUE, 0x00030000, 11, 11, LR_DEFAULTCOLOR);
|
|
|
|
|
Why not just CreateIcon ? As its name implies, CreateIconFromResource is to create a HICON from a resource.
|
|
|
|
|
I have a list control with checkboxes extended style. The check boxes still shows up if the value is NULL or "". I want to gray them out when there is no corresponding text in the item. I read that SetCheck is used for CButton. I cant imagine what is meant by a checked button! What would be even better would be if the blank checkboxes vanished altogether. Any ideas on how I can go about my goals ?
(One obvious idea is to filter out the NULLs and spaces, but its not at clear to me about how to work it around my code so I'm not going that route).
Thanks,
ns
|
|
|
|
|
I think you're going to have to manage the checkboxs as images yourself. The standard control is only for checked or unchecked, but always shown. You should probably create your own ImageList and set the image property for each item separately.
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|