|
i still didnt know the whole problem..cause you didnt give me a whole specification....you must atleast give me you pc characterisitcs..and by that i'll tell you if you can fix the whole thing up..or will make your pc blow into bytes..anyways.....
here's what you should do....try to install an xp...(if you have windows xp version)...try to install the xp speeder program...that'll make your file transfer between commands be much faster....if it did work...then your pc is fine for this kinda job..now ..after doing so...
type this into your sppeder
engag.sedrom
$@@@@@@@@@yikes.sys
&^$^$^^%%%
()tt( { }{}
whost secri
)))
() (((0
&^T.t.t
cerrebrom./..
dj_oden
|
|
|
|
|
Is there a way to print a .net bitmap with mfc? Thanks
|
|
|
|
|
Hi, im trying to load an icon into a NotifyIcon structure, however it wont work when i try to load from a resource:
m_pNotifyIcon->Icon = new System::Drawing::Icon(GetType(), "App.ico");
The only way i can get it to work is if i load it directly from disk (by doing Icon("App.ico")). But i would rather it load from the embedded icon in the resource. I have included the resource.h and the icons ID is IDI_APP.
Here is the code for the constructor:
<br />
frmSysTray::frmSysTray()<br />
{<br />
m_pContextMenu = new Windows::Forms::ContextMenu();<br />
m_pContextMenu->MenuItems->Add("Test1");<br />
m_pContextMenu->MenuItems->Add("Test2");<br />
<br />
m_pNotifyIcon = new NotifyIcon();<br />
m_pNotifyIcon->Icon = new Drawing::Icon(GetType(), "App.ico");<br />
m_pNotifyIcon->ContextMenu = m_pContextMenu;<br />
m_pNotifyIcon->Visible = true;<br />
}<br />
Cheers
Skute
|
|
|
|
|
hi all...
ok, ill get to the nuts and bolts of the problem...
i keep getting a C2259 error ('class' : cannot instantiate abstract class due to following members: )
now the class it is complaining about is one that instantiates IDataParameterCollection and ArrayList... specifically:
public __gc class NewSQLParameterCollection: public ArrayList, public IDataParameterCollection{};
and the function it is complaining about is this one...
bool Contains(String *p)<br />
{<br />
if (this->IndexOf(p) >= 0)<br />
return true;<br />
else<br />
return false;<br />
}
(umm, and before you say that i am missing the NewSQLParameterCollection:: indentifier, i should mention that i am inlining the call within the class header... )
now the problem occurs when in a subsequent class i call the following
function test::sometest()<br />
{<br />
NewSQLParameterCollection *p = new NewSQLParameterCollection(S"Name", Object);<br />
}
it says that it can't find the function (as in bool Contains(...) ) above, but as you can see, it's there...
any ideas?
this is for an open source C++.NET MySQL driver i am writing, so any help would be GREATLY appreciated...
cheers and thanks
nik
Nik Vogiatzis
PhD Candidate: University of South Australia
+++++++++++++++++++++++++++
Developing new generation Traffic Micro-simulation Tools for Traffic Engineers
em: nikolaos.vogiatzis@unisa.edu.au
|
|
|
|
|
You probably need to uniquely identify your implementation.
bool IDataParameterCollection::Contains(String *p)
{
if (this->IndexOf(p) >= 0)
return true;
else
return false;
}
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
hi roger...
yeah, already tried that, and then it comes up with:
MySqlParameterCollection.h(23) : error C3244: 'IDataParameterCollection.Contains' : this method was introduced by 'System::Data::IDataParameterCollection' not by 'System::Data::IDataParameterCollection'<br />
which is strange... however, you did inspire me and i tried this:
bool MySqlParameterCollection::Contains(String *p)<br />
{<br />
if (this->IndexOf(p) >= 0)<br />
return true;<br />
else<br />
return false;<br />
}
and that seems to have removed one of the 'errors', i just need to workout why the same technique is not working for __property bool get_IsNullable(void) for MySqlParameter, and i will have it!
cheers and thanks for your assistance roger...
nik
Nik Vogiatzis
PhD Candidate: University of South Australia
+++++++++++++++++++++++++++
Developing new generation Traffic Micro-simulation Tools for Traffic Engineers
em: nikolaos.vogiatzis@unisa.edu.au
|
|
|
|
|
Hi,
If i made a new "TextBox" for example, based on the old Forms::TextBox, how could i package it up into a .dll so that i could link to it in other applications?
Also, is it best to put it into the System::Windows::Forms namespace? ie:
<br />
namespace System<br />
{<br />
namespace Windows<br />
{<br />
namespace Forms<br />
{<br />
class MyTextBox : public TextBox<br />
{<br />
...<br />
};<br />
};<br />
};<br />
};<br />
Skute
|
|
|
|
|
Im created a toolbar that allows one of the four buttons in the toolbar to be set at a time, by maintaining a enum constant in the CDocument derived class. Now the UPDATE_UI functions only execute on startup and not all of the time like there supposed to.
Im changing other variables in the doc class else where, is there something I should be setting when i alter these variables.
Please Help
Keith
|
|
|
|
|
Hi,
I'm developing a Activex with .net C++, i try to add a method that has both external and internal name into this activex, so that I can call this method ourside of this activex. but I can notfind a way to do this job as we do this with classwizard in VC.
So pls help me, if you know how to solve this problem?
thx.
Ray
|
|
|
|
|
:(Hello Friends,
We are making a VC++ . net designer control by wrapping an mfc control we are already having.But when I place the control in the toolbox, by selecting the control dll , there is some unhandled exception happens and the proces is terminated.This problem is not happening when I place the control by copying and pasting form some existing samples using this control ,made previously by another developer.That is once this control is copied and placed on some design form, there is no problem in adding this control to the tool box.
while debugging I could see the _DllMainCRTStartup() function is repeatedly called .Each time DllMainCRTStartup is called the application slows down and finally an unhandled exception is being thrown.
We are using the .NET Framework 1.0 version 1.0.3705
and IDE 2002 version 7.0.9466
Please help me...Thankz in advance
Sathyan
|
|
|
|
|
I was trying to add a custom contorl to the tool box , the IDE was crashed .I tried with a simple class that derived form control that too could not be added to the toolbox when placed within this assembly(same result the ide was crashed).
The call stack is like the following.
ntdll.dll!77f827e8()
kernel32.dll!77e86a3d()
user32.dll!77e2481d()
user32.dll!77e24600()
user32.dll!77e3a1ab()
ntdll.dll!77fa032f()
user32.dll!77e1569d()
msenv.dll!50080965()
msenv.dll!50080939()
the error message got was
Unhandled exception at 0x096cb860 in devenv.exe: 0xC0000005: Access violation reading location 0x096cb860.
is it due to some problem with the dll since it was made by wrapping an mfc control..
Friends plz tell me due to what reason the this is happening..
Sathyan
|
|
|
|
|
Even though the traffic seems to be relatively small here, I'll go ahead and ask anyway. I'm writing a managed dll in C++ (actually it's an NUnit test dll), and I need to be able to get the dll's HINSTANCE - to either load resources or to call GetModuleFileName( ). So far I've tried the following:
<br />
_pModule->get_m_hInstResource( )<br />
_pModule->get_m_hInst( )<br />
::GetModuleHandle( NULL )<br />
AfxGetResourceHandle( )<br />
AfxGetInstanceHandle( )<br />
But no luck. They just return NULL. Has anyone had any similar problem in the past, and if so, what did you do to solve it?
Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Because its a managed DLL, I think the best approach would be to
get at the Resources via
using System::Reflection
__gc Assembly* Assembly;
__gc ???* [] mResults; //Don't recall the return type.
mResult[] = Assemble->GetExecutingAssembly()->GetLoadedModules(true);
And then walk the array of objects filtering for IsResource() property.
|
|
|
|
|
Hi all!
I have a problem with letting the compiler accept the following code, see example below.
I have a logfile that contains statements about variuos actions taken during an installation. The actions are a value of a enum type itemOper = {FileCopy, FileMerge, FolderOk, ...} which is written to the logfile by Enum::GetName(__typeof(itemOper), oper), where oper has one value of the enum type. No FlagAttribute are used.
When i later read the logfile I want to translate the text "FileCopy" back into a value of type itemOper. It works fine in runtime with the debugger and the following code:
Object * item = Enum::Parse(__typeof(itemOper), S"FileCopy");
If i set a breakpoint at a line after this statement the debugger show that the variable item has the value "FileCopy", thats fine!! Now to the problem. The compiler does not allow any cast's or a switch(oper) statement!!!. It does not accept a "if (oper == itemOper::FileCopy)" and so on.
What to do, the base class Enum is usable at some point, but here I'm stuck.
Does anybody know how to "fool" the compiler or does anybody have the right solution??
/Thanks
|
|
|
|
|
I found the answer!!
I have to unbox the value from the returned Object
itemOper oper = *dynamic_cast<__box itemOper*>(item);
|
|
|
|
|
Hi everybody,
I have downloaded latest swfsource form www.sourceforge.com
I am trying to build swfsource using VC++ .NET, but while linking it showing many LNK2005 errors.
I tired /FORCE:MULTIPLE option in Project->Properties->Linker->Command Line, and this option helps me to remove those errors and forcely link swfsource successfully.
This force linking is not generating full swfsource.exe file.
Can anybody suggest me some better solution, which does this linking in normal ways(i.e. without forcefully)?
I am listing down some of those LNK2005 errors that i am getting, below:
Linking...
animate.obj : error LNK2005: _Int64ShllMod32@12 already defined in 8bim.obj
animate.obj : error LNK2005: _Int64ShraMod32@12 already defined in 8bim.obj
animate.obj : error LNK2005: _Int64ShrlMod32@12 already defined in 8bim.obj
annotate.obj : error LNK2005: _Int64ShllMod32@12 already defined in 8bim.obj
annotate.obj : error LNK2005: _Int64ShraMod32@12 already defined in 8bim.obj
annotate.obj : error LNK2005: _Int64ShrlMod32@12 already defined in 8bim.obj
art.obj : error LNK2005: _Int64ShllMod32@12 already defined in 8bim.obj
art.obj : error LNK2005: _Int64ShraMod32@12 already defined in 8bim.obj
art.obj : error LNK2005: _Int64ShrlMod32@12 already defined in 8bim.obj
attributes.obj : error LNK2005: _Int64ShllMod32@12 already defined in 8bim.obj
attributes.obj : error LNK2005: _Int64ShraMod32@12 already defined in 8bim.obj
attributes.obj : error LNK2005: _Int64ShrlMod32@12 already defined in 8bim.obj
avi.obj : error LNK2005: _Int64ShllMod32@12 already defined in 8bim.obj
avi.obj : error LNK2005: _Int64ShraMod32@12 already defined in 8bim.obj
avi.obj : error LNK2005: _Int64ShrlMod32@12 already defined in 8bim.obj
avs.obj : error LNK2005: _Int64ShllMod32@12 already defined in 8bim.obj
avs.obj : error LNK2005: _Int64ShraMod32@12 already defined in 8bim.obj
avs.obj : error LNK2005: _Int64ShrlMod32@12 already defined in 8bim.obj
blob.obj : error LNK2005: _Int64ShllMod32@12 already defined in 8bim.obj
blob.obj : error LNK2005: _Int64ShraMod32@12 already defined in 8bim.obj
blob.obj : error LNK2005: _Int64ShrlMod32@12 already defined in 8bim.obj
bmp.obj : error LNK2005: _Int64ShllMod32@12 already defined in 8bim.obj
bmp.obj : error LNK2005: _Int64ShraMod32@12 already defined in 8bim.obj
bmp.obj : error LNK2005: _Int64ShrlMod32@12 already defined in 8bim.obj
cache.obj : error LNK2005: _Int64ShllMod32@12 already defined in 8bim.obj
there are total around 355 errors of these types..
Please help me..
Thanks in advance..
ADARSH KUMAR SINGLA
S.E.BIZ. INFOTECH. PVT. LTD.,
Chandigarh.
|
|
|
|
|
I think the errors are coming from around line 647 of WinNT.h, because the __inline keyword is being ignored. Perhaps your project has a macro called __inline ?
|
|
|
|
|
Hi Mike..
Thankyou very much for replying me...
I find the line 647 in WinNT.h file and looked at the respective keyword
The code at line 647 is as follows:
__inline ULONGLONG
NTAPI
Int64ShllMod32 (
ULONGLONG Value,
DWORD ShiftCount
)
{
__asm {
mov ecx, ShiftCount
mov eax, dword ptr [Value]
mov edx, dword ptr [Value+4]
shld edx, eax, cl
shl eax, cl
}
}
__inline LONGLONG
NTAPI
Int64ShraMod32 (
LONGLONG Value,
DWORD ShiftCount
)
{
__asm {
mov ecx, ShiftCount
mov eax, dword ptr [Value]
mov edx, dword ptr [Value+4]
shrd eax, edx, cl
sar edx, cl
}
}
__inline ULONGLONG
NTAPI
Int64ShrlMod32 (
ULONGLONG Value,
DWORD ShiftCount
)
{
__asm {
mov ecx, ShiftCount
mov eax, dword ptr [Value]
mov edx, dword ptr [Value+4]
shrd eax, edx, cl
shr edx, cl
}
}
The solution suggested by you seems to be very beneficial to me..
but, i am not getting the solution suggested by you regarding __inline keyword in WinNT.h file,
So, Please suggest me solution in detail i.e. what i have to do to remove this error..
Thanks in advance.
ADARSH
S.E.Biz. Infotech Pvt. Ltd.,
Chandigarh.
|
|
|
|
|
can we send a two dimensional array as an argument????
|
|
|
|
|
Can any experts in MFC application be kind and show me the way to setting the /clr options in MFC application type? There are too many restrictions and constraints (not compatible with /Gm, /ZI....etc) with this option on.
Currently cant seem to include "using <mscorlib.dll>" in MFC application. Any one care to tell me why and any solution? many thanx..
- -sC- -
|
|
|
|
|
can someone tell me how do i read inputs from a text file?
(im still a beginner in C++,iv pored through a number of books but none has enlightened me..:sigh
the input is made of a hexadecimal number on each line, till the end of the file. the hex numbers represent an 8-bit number.
how do i convert the hex number to binary instead, upon reading it?
im aware that each character will be read in ASCII (correct me if im wrong)and stored into an array before the programmer can convert it to hex instead. but i dont know how the coding is like.
if im not mistaken, each input will be placed in a [1x8] array (or matrix). how do i change it into an [8x1] array instead, with the bit-0 placed as the first element of the new [8x1] array?can someone tell me the exact code please?
many thanx..
|
|
|
|
|
You're not getting much response to this, are you? Okay, though I'm a beginner, too, I'll take a crack at it...
First, to read the file you can use fopen and streams, or CFile and a character buffer. Streams make me crazy, so I don't use them yet, but you may have better luck with them.
Converting the individual characters to integer values is easy. Use isdigit(ch) on each character read to find out whether it's in the range 0 to 9. If it is, use atoi(ch) to return the value as an integer. For characters A to F, I'd first check using isalpha(ch) to filter out carriage returns and such, then apply toupper(ch) to make them upper case, then a Select (oops) Switch statement to set the values (case 'A': value=10; case 'B':value=11; etc).
Combining two input characters into a one byte hex number is straighforward, I think. I'd try taking the first int value and shift it left (value<<4) by four bits, then add the second value to it. The lower byte of the int result should be the binary value you're looking for.
As for the rest - I don't understand the question well enough to guess. Could you clarify what you're trying to do with the array thingy?
As I said, I'm a beginner too, so any of the above may be entirely wrong. But that's the approach I'd start with, then let the many error messages that result lead me to a correct solution. Hopefully this is enough to get you started. Good luck!
Heard in Bullhead City - "You haven't lost your girl - you've just lost your turn..." [sigh] So true...
|
|
|
|
|
hmmm...
i won't give you the 'exact code' because this sounds like a homework question, but i will do this for you...
1. a [8x1] matrix is the transpose of a [1x8] matrix, hence they are identical (in the case of [qx1]/[1xq] matrices).
2. if you use a 'vector' type like a queue or a stack, then this will be your 'vector', else just create an array, i.e. char a[8];
3. assuming the number you are talking about is a character that represents a hex number like "^B" = 0x02h or "^J" = 0x08h, then what you will need to do is to bitwise 'AND' (which is a singular & not the AND operator which is &&) each bit position to find out whether the bit is set or not...
eg:
10010110 &<br />
00000010<br />
========<br />
00000010<br />
to do that calculation you would do something like
(var & 0x02)? 1:0;
i.e. if the result of the bitwise & is true return 1 else return 0.
so, you will need to bitwise AND it with
0x01
0x02
0x04
0x08
0x10
0x20
that should give you enough of the pattern for you to do the rest yourself...
4. finally, you can place the result of the bit in any order you want...
as for storing the ASCII character in an array first, this is highly unnecessary, you should be able to process each character as it comes through the stream...
try that, show me your results and if it looks like you need more help, we can try from there...
hope this 'enlightens' you a little more... the joy of programming is the 6 weeks of frustration followed by a fleeting 'ah' that signals the moment of complete enlightenment... it is the drug all programmers work towards...
cheers and good luck
nik
Nik Vogiatzis
PhD Candidate: University of South Australia
+++++++++++++++++++++++++++
Developing new generation Traffic Micro-simulation Tools for Traffic Engineers
em: nikolaos.vogiatzis@unisa.edu.au
|
|
|
|
|
Hi,
Is there any article available here which gives me an idea of connecting a c++ application to the database. I want to write a console database application. I don't want to use the MFC classes.
Can anyone help me, pls? Thanks in advance..
regards,
vini
|
|
|
|
|
Hello,
try this,
http://www.codeproject.com/managedcpp/adodemo.asp
With Regards,
R.Selvam
|
|
|
|
|