|
Hi !
In my app, I'm linking at runtime to a dll to call a specific function. It works fine, but instead of calling a function, I'd like to instanciate an object of a class.
I guess I should define in my application a pure virtual base class and in the dll, implement a derived class and instantiate at runtime this class. That's what I guess I should do, but am not able to make it work.
Is it possible to do what I want to do ? How ?
Thank you for your help !
Jerome
|
|
|
|
|
hi...
i am trying to make a graphic editor..kind of like we have in visual studio that allows us to edit icons ans stuff for our VC++ apps...
i have two views and in the editor view there are grids where the user can draw....
now the problem is after drawing the grid the whole things became very very laggy..
then i inserted the class CMemeDC..
now the probem is that even though the flashing is gone...while scrolling,the whole grid is distorted..and goes out of shape....
can someone pls help me???
i dunno hwat to do...
tks in advance..
Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
"For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
John 3:16
"Therefore you also be ready, for the Son of Man is coming at an hour you do not expet."
Luke 12:40
|
|
|
|
|
Hi All,
I am seeking some help in sorting a two dimensional array in ascending order. It is a 5x5 array , I tried using a bubble sort but that didn't work. I made a selection sort work but it didn't work on the numbers in differnt rows. (IE where you end wanting to compare column 5 on row 2, with column 1 on row 3.)
Below is a link to a CPP file I've been working on. If anyone has any suggestions it would be great!
http://www.djrhenium.com/arrayprojectinp.cpp
-jay
|
|
|
|
|
What does your array declaration look like? What does it contain?
char letters[5][5] = {{'h', 'o', 'r', 's', 'e'},
{'a', 'p', 'p', 'l', 'e'},
{'g', 'l', 'a', 's', 's'},
{'l', 'a', 'r', 'g', 'e'},
{'g', 'r', 'o', 'u', 'p'}};
Or maybe you have something like:
int numbers[5][5] = {{ 6, 14, 9, 1, 55},
{ 2, 4, 6, 8, 10},
{ 5, 5, 5, 12, 12},
{ 9, 7, 5, 3, 11},
{14, 28, 7, 3, 16}};
In what order would you expect to sort these?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Dave, thanks for the reply.
I actually have a random number generator , generating random numbers between 1-60 into the array. I am trying to sort them in ascending order.
for example:
1 , 2, 3, 4, 5
6 7 8 9 10
etc. the input from the generator is random so i need to start from the bottom and work my way up, or vice versa.
|
|
|
|
|
Can you adapt this as necessary:
void SortEm( int *pNumbers, int nLeft, int nRight )
{
for (int x = nLeft; x < nRight; x++)
{
for (int y = nRight; y > x; y--)
{
if (pNumbers[y] < pNumbers[y - 1])
{
int nTemp = pNumbers[y];
pNumbers[y] = pNumbers[y - 1];
pNumbers[y - 1] = nTemp;
}
}
}
}
int numbers[25];
for (int x = 0; x < 25; x++)
numbers[x] = (rand() % 60) + 1;
SortEm(numbers, 0, 24);
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Not understand! Why the projects, created by original manufacturers for their products,don't built successfully? And usually,the reason is very simple,such as missing some header files and so on.I think they should do it faultlessly for themself,instead of making these mistakes .But why???
Rap off for you,for me,for our human.
|
|
|
|
|
What are you talking about? What manufacturer has a product for which you are trying to build a project?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
How should I create the server side to allow a unattended "Live Update" of client side apps?
Data Base ?
XML ?
HTML ?
Target File ?
Other ?
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
The only task of any server is -just as its name suggests- to serve client's requests. According to this, if you want your server to update your client, you should code your client so that it regularly sends update requests to your server and based on the server's answer your client should update itself.
You seem to have advanced with your email manager pretty far.;P
Peter Molnar
|
|
|
|
|
Hi Peter,
Rain all week here in sunny California
The email manager is comming along well, at BETA 0.0.8.8.
Most big bugs are gone, but still worried about little ui situations.
The Spam Slammer module has some minor errors on edit rule.
The autoresponder allows per account config so arrays are getting confusing (to me).
The autoupdate is working abit, I loaded a ini file on the server and the live update mod check once a day for now anyway. Users may run live update by command or by allowing the application to handle it.
I have a line in the ini file that "tell's" the server side app when to check next, this give me a little flex if I can guage about when a new release is ready. also if I take a much needed vacation I may stick the line like [checkback]hours=240
The grabbing the data and loading it per your suggestion worked so very well, a user may be up and running in less than 2 minutes. Thanks to you!
The ini file on my Unix server strips the \r\n to \r so I am working on replace('\r','\r\n') dl on the fly.
I sort of wanted to use a database for the updates but the ini was a quick solution. I am downloading in one chunk since I know the size 256 for now, I am padding to meet chunk.
Any thoughts as always will be implemented.
Best Wishes,
Marty
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
Hi Marty!
BaldwinMartin wrote:
Rain all week here in sunny California
In central Europe We have now the pleasure of temperatures around the freezing point. Just to keep you motivated.
If your "live update" is supposed to pass data only (the opposite could be: program parts, e.g.: a *.dll) then an *.ini file should do the job,
but a whole database, or *.xml file to pass would also be possible. You should make your choice depending on the data type. (Simple, linewise data: *.ini file; items with many optional attributes, structured data: *.xml or database)
As for the frequency of live update, you shouldn't overcomplicate your task. When your client apps get started (or at most daily), they should definitly check for an update and optionally you could leave the user a button for this, too.
The client's check for a newer version on the server should be as simple as possible. You could check for the availability of a file in the update dir on the server and download the new version, if the version number of this file is greater than the client's one.
Example:
http://server/update/versioninfo.txt contains only 4 bytes, the four digit representation of the version number. If this number is greater than the client's current version then the client automatically downloads http://server/update/newversion.ini which always contains the "freshest" info.
As you see a client's daily check is not more than downloading just 4 bytes from your server, which (provided you dont have zillions of clients) is not a huge network overhead.
Maybe then you could also increase the duration of your much needed vacation to over 240.
Peter Molnar
|
|
|
|
|
Hi Peter,
or is it Petro?
>>In central Europe We have now the pleasure of temperatures around the freezing point. Just to keep you motivated.
Move here we may float away but we will be warm!
>>If your "live update" is supposed to pass data only (the opposite could be: program parts, e.g.: a *.dll) then an *.ini file should do the job,
but a whole database, or *.xml file to pass would also be possible. You should make your choice depending on the data type. (Simple, linewise data: *.ini file; items with many optional attributes, structured data: *.xml or database)
Yes, I believe so, the ini will surfice in that it is only a (catalog)or (dictionary) of updates not the update itself.
>>As for the frequency of live update, you shouldn't overcomplicate your task. When your client apps get started (or at most daily), they should definitly check for an update and optionally you could leave the user a button for this, too.
The client's check for a newer version on the server should be as simple as possible. You could check for the availability of a file in the update dir on the server and download the new version, if the version number of this file is greater than the client's one.
Yes, the product (at this release) is a BroadBand product, in that I do not check for ras. I am pretty dissatisifed with the current pd ras classes so I am waiting to write my own.
The update.ini gets it's name from the app which gets the same name from another ini. Same Name just passed in parms of PostMessage.
(NOTE The installer sets some default values in all ini's
Here is a small snip of the main apps ini
[PROXY]
PROXYUSERNAME=
PROXYWORD=
PTYPE=0
PPORT=0
USE=0
[UPDATES]
UFULLNAME=http://www.digitaltcp.com/updates/appname/appname.ini
USHORTNAME=appname.ini
UDAUTOPOLL=240 // update auto-poll
Here is the little server side ini file(s) contents.
[currentversion]
major=0.0.0.0
minor=0.0.8.8
dlfile0=
dlfile1=
dlfile2=
dlfile3=
dlfile4=
dlfile5=
dlfile6=
dlfile7=
dlfile8=
dlfile9=
restart=FALSE
....
The client also logs in to a special account with dl priv's only.
Since it is loggining in anyway I store the machine serial number.
I am using this for id not to spy, but I wonder if I should use it at all?
May I send you a cd with the BETA prj included?
I am happy you are on my side, the others are hurting without you, you are just way too smart!
Best Wishes and Happy Holiday's,
ez_wayay's,
ez_way
|
|
|
|
|
I have a print preview window and want to zoom in or out
some. Where can I get some info on this?
Thank You
Bo Hunter
|
|
|
|
|
If youu look in the printing section here. My article on the multi page preview has support for additonal zoom levels. You should be able to zoom in on areas in code by using the code from the OnLButtonDown() and using your own point location and calling the relevant zoom function.
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
From the MSDN Library:
Return Value
Nonzero if the message was translated and should not be dispatched; 0 if the message was not translated and should be dispatched
I have a PreTranslateMessage function (with MFC) to catch some special keys (actually WM_SYSKEYUP). When my "special" keystroke arrives, I process it, and I don't want it to be further processed.
However, no matter what return code I give back, the message will be processed, i.e. the character arrives as if it had not been processed yet.
Modifying the MSG structure (the parameter of the function) yields nothing.
What can I do? Should I use another function instead of PreTranslateMessage? Which one?
Thanks
|
|
|
|
|
try it in PreTranslateMessage()
if (pMsg->message == WM_SYSKEYUP)
{
//do your things;
//return your bool;
}
else
return CDialog::PreTranslateMessage(pMsg);
Hello World!
|
|
|
|
|
I tried around, and just found the solution (quite trivial):
BOTH WM_SYSKEYUP and WM_SYSKEYDOWN have to be processed.
One of them has to do the "real" processing, the other nothing, but both have to return nonzero.
Thanks anyway.
|
|
|
|
|
I am wondering how to use a different res when compiling
two different project configs. I would like to change the
comments in the VS_VERSION_INFO resource in a dll project
that has A and W versions. I know this sounds petty but I
would like to do it.
Thank You
Bo Hunter
|
|
|
|
|
In the ResourceView tab, view the properties for a resource. In the prop sheet there's a Condition edit box, so enter a preprocessor symbol there (for example, _DEBUG , or you can make up your own). That turns into a #ifdef _DEBUG (or whatever symbol) in the .rc file.
You can change the defined symbols on the Resources tab in the project settings.
(Note: this is for VC 6, no idea how it works in 7 but it's probably completely different)
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
If my rhyme was a drug, I'd sell it by the gram.
|
|
|
|
|
|
I've got an application which really needs a "House Doctor/Changing Rooms" type makeover. Can anyone suggest a solution that is relatively quick, easy and hopefully free? It looks a lot better when I run it in XP, but I want something a bit tastier looking in Win2K as well. Rather than do a load of searching, which I haven't got time for, I was just wondering if there's any sort of well-trodden path to take?
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
"If you think education is expensive, try ignorance."
|
|
|
|
|
Uhm.. what exactly is it that you want to do? Skinning? Theming?
--
I can't resist a touch of evil.
|
|
|
|
|
Jörgen Sigvardsson wrote:
Uhm.. what exactly is it that you want to do? Skinning? Theming?
I don't know. I don't know the difference between using a theme or a skin. What do your suggest? I just want it to *look* better than just another Windows dialog-based application...
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
"If you think education is expensive, try ignorance."
|
|
|
|
|
I guess Visual C++ is not a right tool for that purpose, I mean great user interface with less coding effort. VB.NET, Delphi, C# or Java can do fancy user interface with lesser effort than Visual C++.
My suggestion is go for VB.NET. It is RAD and easy. It could cater most of the MIS requirement.
Of course, you would need a .NET framework for that.
If you are not opting for .NET. You could try out Borland Delphi or C++ Builder which ease of developing nice UI as well.
Hope this helps.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|