|
You sure you have #include "stdafx.h" as the first line in your cpp file?
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Hello,
Is it possible to make a CView like a dialog box which pops up ? I need to display different graphs from the data in ListControl in a dialog box.Is there any way to acomplish my need?
Please Reply.
|
|
|
|
|
Hi,
I read in a book that the CDC* in OnDraw function gets removed automatically.My question is-
First ,Is that true?
Second,so, can I use CDC* in my own functions without worrying to release it?
Thanx.
|
|
|
|
|
Salut Danielle
Yes, what happens is that the OnDraw is called from the OnPaint method, like so:
void CView::OnPaint()
{
CPaintDC dc(this);
OnPrepareDC(&dc);
OnDraw(&dc);
}
The creation of the CPaintDC causes GetDC and BeginPaint to be called, and its destruction releases the DC and calls EndPaint for you. So the CDC that is passed to OnDraw is yours to work with without needing to release it.
However, unless you have created the view with a special window class that has the CS_OWNDC style (unlikely) you should not store the CDC* for use outside the context of OnDraw.
HTH
|
|
|
|
|
|
Hi all,
I have a ComboBox in my dialog ...
My combobox type is Drop List ...
Now, i wanna set text in the combobox, i don't want to add any item, just i wanna put text in combobox edit control ...
I used SetWindowText, but won't work !
When i changed combobox type to DropDown, then SetWindowText will work ...
But how can i do that in Drop List type !
Help me please ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I'm not sure you can do that. The DropList type only shows what is in the list as it doesn't really have the edit control component that the others have.
What effect are you trying to create? It seems strange to want to display text that can't be selected in an Drop List.
Michael
|
|
|
|
|
Hi Michael,
Can you tell me how can change combobox type from DropList to DropDown, programically ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Please try using ModifyStyle/ModifyStyleEx.
I didnt try it out, so I am not sure. But it's worth a try.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Hi all,
Can i use DataGrid control without using ADO ?
I wanna use DataGrid control by connection to DAO !
How can i do that ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Can I recommend that you'd be better off using Chris Maunders grid control off this site ?
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hi Christian,
I read this article, but he didn't show how can i connect FlexGrid to DAO !!!
Can you write source code about it ...
I have a DataGrid or FlexGrid, HOW CAN I CONNECT TO DAO ?!
Do you know other Grid's for connecting DAO ?!
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
You want the grid to automatically populate from a database record ? I've always done it myself, I dunno if you can get the grid to do it for you.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Christian Graus wrote:
You want the grid to automatically populate from a database record ? I've always done it myself
Really ?! cooool !
You do it with DataGrid and DAO engine ?!
How ?!
Can you tell more ...
Please ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
No, I still recommend that you use Chris's grid, and not the MS DataGrid. I've used MSFlexGrid, and hated it. The concept is pretty simple, you iterate through the database, grab the values, and add them to the grid. I used ADO and Chris's grid, and it worked very nicely.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Good, I wanna use Chris's grid ...
Now, i wanna CONNECT Chris's FlexGrid to my DAO database ...
Can you tell me how can i do it, programitically ?
I'm wating for reply ...
Thanks !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I can't do much beyond reiterating my previous replies - I dunno of an automatic way, I just retrieve the values and enter them into the grid by hand. As in GetRecord/IterateThroughFields/PassEachFieldValueToAppropriateCell.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hi Chrisitian,
Thanks you for introducing functions in FlexGrid !
Please, please, please if you found useful examples about connecting to DAO with DataGrid or FlexGrid or new other grid control, please send to hadi_rezaie@noavar.com ...
It is my last request of you !
Thanks again, hadi
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hadi:
Here you can find a sample how make that with ADO, but with DAO is the same.
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Thanks Carlos,
That was useful example !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I like to write a program to delete some special folder. I try this code but it generate error : "Can not delete file: file system error (1026)".
SHFILEOPSTRUCT sh;
sh.hwnd = GetSafeHwnd();
sh.wFunc = FO_DELETE;
sh.pFrom = "c:\\windows\\temporary internet files\0";
sh.pTo = NULL;
sh.fFlags = FOF_NOCONFIRMATION | FOF_SILENT;
sh.hNameMappings = 0;
sh.lpszProgressTitle = NULL;
SHFileOperation (&sh);
please help me!
Thank you very much!
BUNG
|
|
|
|
|
I am not sure you can delete "c:\windows\temporary internet files"
It's a special system folder [that stores temp IE files]
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
I've just installed VC++6 on a new P4 system, and I'm having an isolated obscure problem that I'm trying to prove is a problem with my hardware and not with VC++. I get this problem running win2k, XP, and Me.
The problem is that I get a compiler warning C2124 'divide or mod by zero' on a legit line of code:
int main()
{
double a = 1.0; // ok
double b = 2.0f; // ok
double c = a / b; // ok
double d = 1.0 / b; // ok
double e = 1.0 * 2.0; // ok
double f = 1.0 / 2.0; // Error C2124: divide or mod by zero
return 0;
}
I get the same problem with floats, but not ints.
Has anyone seen anything like this, or know of ways of proving that this is a problem with the CPU or mb?
Any help is greatly appreciated!
thanks,
~mark
|
|
|
|
|
Well, it might make you happy to know that I got a divide-overflow error on a P-III-600/128MB
int main()
{
double f = 1.0 / 2.0;
}
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Nish,
I just tried the code on my PIII 1.2gig 512mb and it worked fine. What version of the compiler and service pack did you try it on.
Michael
|
|
|
|