|
Hey Guys,
I am having problems with serialization of float variables. I am trying to serialize a float array using a for loop. While saving it works fine but while loading I am getting an Illegal operation. Can some body help me??
Nitish
|
|
|
|
|
|
the code was;
if(ar.IsLoading())
{
for(int i=0; i<n;i++)
{
="" ar="">>x[i];
}
}
else
{
for(int i=0; i<n;i++)
{
="" ar<<x[i];
="" }
="" }
where="" x="" is="" a="" float="" array;
="" the="" program="" gets="" stuck="" at="" operator="">> for float;
what am I missing???
Nitish
Smile, It makes every one wonder what you are upto.
|
|
|
|
|
Use < and > instead of < and > when posting - your source is unreadable
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
How to set cd-rom autorun?
I'd like to prevent cd-roms from executing automatically..
Is there an API function to do it?
Tom
|
|
|
|
|
See HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom
in particular the Autorun value
|
|
|
|
|
I look for an algorithm.
I have a graph which is created from a picture(table) of point.
I have the point during the click of the mouse.
I shall like knowing if this point is near to the graph and this from the picture(table).
I need help please!!
sophian
|
|
|
|
|
What exactly is your graph? You have a table of points and graph is a collection of lines connecting p0 with p1, p1 with p2 and so on?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thank u very much.
it's ok, I 've found an solution.
I've a table of points, I test my point between 2 points.
but it's a little bit more difficult!
sophian
|
|
|
|
|
Is there a way for list controls to get notified when being scrolled?
|
|
|
|
|
I would like to know how use the instructions switch, case... with a combo list.
I explain it: If i have names in the combo list, and for each name i want to do different actions, for example just create specific afxmessagebox for each name. I know that the better way to do that is to use the switch command, but as it take only numeric expression how could i solve it?
gerald
|
|
|
|
|
You can use SetItemData(nItem, dwData) for each item in the listbox/Combobox and then you can do a switch statement using the GetItemData(nItem). In order to make this more efficient you should setup an enum of the values will always be the same. Here's a question though... Are you just trying to get the text of the Item and display that in a messagebox?
Bret Faller
Odyssey Computing, Inc.
|
|
|
|
|
Thanks for the reply last time, but now I have another problem. When I include <afxcmn.h>, to use the treecontrol, I get the following error:
LINK : fatal error LNK1104: cannot open file "nafxcwd.lib"
It's damn right, because the file does't exist. And it isn't on the cd either, as the help file tells me. What the?
WAVK
|
|
|
|
|
afxcmn.h
|
|
|
|
|
You're trying to link MFC statically - nafxcwd.lib is a static MFC library, debug version. It seems you're using 'Standard Edition' of VC++ (formerly known as 'Learning Edition'). This version doesn't support static linking to MFC. There's an interesting article somewhere on CodeProject dealing with this.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
How do I create a unique key in a DaoDatabase?
Thanks.
Richard
|
|
|
|
|
I create a toolbar in the Internet Explorer.When I click one button on this toolbar,I want to show a modal dialog.I use following code in the toolbar's button click events.
CMyDialog dlg;
int ret=dlg.DoModal();
I get ret=-1.
When I create the dialog in the Band.cpp file and make the "dlg" as a global variable, then in the click event I use dlg.ShowWindow(SW_SHOW), It will show the dialog modaless.Now another problem is out.I can't use the "TAB" key to change focus between the controls on the Dialog Box.
What's wrong with it?
|
|
|
|
|
for the solution of the second problem see "Q187988 - PRB: ActiveX Control Is the Parent Window of Modeless Dialog"
|
|
|
|
|
Ok, I have this ListBox and I want to transfer the String that was selected in this List to a new Dialog.
The Problem is everytime I do dlg.DoModal(); the String reset's to NULL!
Maybe someone can help me!
Thanx
Enzi
|
|
|
|
|
Hi,
The easiest way is to create a member variable CString (or whatever) in each dialog.
Then when you've got the string you want from the list, call:
CMyDialog dlg;
then:
dlg.m_strString = strList;
where m_strString is the member variable for the string in the second dialog and strList is the string that holds the value from the list box.
Then you can call:
dlg.DoModal();
In the second dialog you can no do what you want with m_strString.
Cheers,
Peter
|
|
|
|
|
Ahh thanx!
So if u understood right.
For each variable I want to use in Dialog2 from Dialog1, I've got to make a Variable in the ckass of Dialog2.
Ok thanx for the help!
btw Windows Programming is complicated!!
Enzi
|
|
|
|
|
I would like to concatenate 2 strings like that:"1" and "y" so i would like to know how i have to declare my variables, as string or CString or as LPCSTR?
thanks for your answer
gerald
|
|
|
|
|
Its entirely up to you as to whether you use CString or LPCSTR's
if you use CStrings:
CString a,b,c;
a="hello";
b="world";
c=a + b;
// c is now "helloworld"
or, if you use LPCSTR's:
char a[]="hello";
char b[]="world";
LPCSTR c; // LPCSTR is just a long pointer to a char
c=new char[80]; // some allocation
c=a+b; // is wrong and will probably crash your program
strcpy(c,a);
strcat(c,b);
// c now points to a string "helloworld"
|
|
|
|
|
I'm making a utility plugin dll for 3d studio and I want to use a tree control in it. I have a dialog which contains the treeview, but I don't know how I can use it from the code. I can get the HWND of the ctreectrl, can I distill some kind of workable pointer from it, or something like it? The problem is that the dialog is added as a panel inside 3dstudio max, all I have is a HWND of the dialog.
Thanks,
WAVK
|
|
|
|
|