|
Paulraj G wrote: Is there any otherway to convert from c[90000000] to CString?
Sorry I don't know if something like that can be done. However here [^] is an sample code/algorithm I found through Google, that may help you.
-Suhredayan
|
|
|
|
|
gnanapaul wrote: How to convert char[array] to CString for huge values?
*That* isn't what your problem is! If you're using MFC, you'll do far better by using CString and CFile . Don't you think?
I don't understand the point of writing C-Style code within MFC. There can be no justification for such insanity.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
There's no need for such large buffers.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
gnanapaul wrote: char out[90000000];
char out1[90000000];
If you have to use such large buffers, then I think something is wrong with your code. I advise you revise your design a bit. Why for instance do you need to read the file in one huge chunk ?
|
|
|
|
|
But if you want to continue on your road replace char out[90000000] with a call to memalloc() (and memfree()). And in align with previous answers you could study what memory-mapped files are...
Rozis
|
|
|
|
|
gnanapaul wrote: char out[90000000];
Replace this with:
char *out = new char[90000000];
gnanapaul wrote: char out1[90000000];
Remove this.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanks...
char *out = new char[90000000];
Its working...
G.Paulraj
|
|
|
|
|
I am working on a project to create a Visual C++ application that loads a grayscale image (bitmap) and performs basic image processing tasks like Zooming/Shrinking, Histogram equalization, basic filtering in both spatial and frequency domains, noise reduction etc. Now I have some basic exposure to C++ coding before but I've never worked with VC++ before and am completely lost trying to build the "app" from the code (which typically involves operating with the pixels). I am told MFCs are the way to go, but it seems too complex for a beginner.
So I was just wondering if someone can help me/point me towards a place where I can get a sort of a basic skeleton MFC which, say has the window and the menus (with the various tasks) designed and can open an image file and extract the pixels from it.
I hope it's not too much to ask for. I am an Electrical Engineer by background and have had not much coding experience before and although I have the logic for this project figured out, I'm running into a brick wall when it comes to coding it. Any help will be much appreciated. Thank you.
|
|
|
|
|
vishal_c wrote: I am an Electrical Engineer by background
Heh - me too.
Run Visual Studio and select File/New/Project to open the new project dialog. Select VC++, MFC, then MFC Application.
You're probably going to want a Single Document Interface (SDI) project type (but mabe not... depends on what you have in mind). This'll generate a skeleton project for you. There are a lot of project options you can specify; play around and seen the differences in the wizard-created code for the various options.
There's also a fairly decent tutorial called 'Scribble' that demonstrates a lot of the basics of VC++ project development. If you have the time, it's worth working your way through it.
|
|
|
|
|
How would I go about hooking Explorer so that any calls to BitBlt get hooked and my application can use the parameters explorer was trying to pass to do something else with them?
|
|
|
|
|
|
Is there a way to determine if a Drivespec, say "F:" refers to a Volume F: on 'this' computer, or whether it is a 'Mapped' drive elsewhere on the Network.
Regards,
Bram van Kampen
|
|
|
|
|
|
Thanks,
Does the Trick Nicely.
Regards,
Bram van Kampen
|
|
|
|
|
I'm able to find the handle to taskbar using FindWindow("Shell_TrayWnd", NULL);
But I want to find the handle to the window containing the text "Run...". I want to change it. It should change to different values at different time. So I can't patch Explorer.exe
I wanna change its text dynamically using SetWindowText, change its styles etc.
Or create some effects like bounce (by movine the window using some mathematical equation)
I tried EnumChildWindows but that doesn't help me.
Plz tell me a way to get handle the child window that displays "Run..."
I want to change the text, move the position and just play around with it!
(Just a hobby project)
-
S.V.Kaushik
|
|
|
|
|
The Run window is not a child of Shell_TrayWnd .
This is why EnumChildWindows doesn't work for you.
The Run Dialog is an independent dialog whose parent is the desktop.
In your case you can get notification that a dialog is appearing by writing a global shell hook using SetWindowsHookEx .
Check if the dialog is the Run dialog and then change its title.
|
|
|
|
|
He is reffering to the Run button in the start menu that makes the dialog appear, not the dialog itself.
Have you tried the Krypton Toolkit? http://www.componentfactory.com/free-windows-forms-controls.php
|
|
|
|
|
His suggestion still remains, however. You first have to get access to the dialog before you can worry about any captions or controls on it.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
If you mean you have to get the start menu 'dialog'/popup before getting the "Run" button on it then I agree.
Have you tried the Krypton Toolkit? http://www.componentfactory.com/free-windows-forms-controls.php
|
|
|
|
|
Even GetMenu fails!
I want to find the coordinates of "Run..." that appears in the start menu.
Plz see this:
http://i626.photobucket.com/albums/tt346/yeswekey/run.jpg
I actually don't wanna change the text, but i want to find its coordinates
-
S.V.Kaushik
|
|
|
|
|
lately when I use STL map as a parameter in a function I have a problem?
such as:
void func(const map<struct>& mapUsed)
{
map<struct>::iterator iterMap = mapUsed.begin()
while(iterMap != mapUsed.end())
{
}
}
The vs2008 report an error and when I use const_iterator to instead random iterator
It's ok
And I wanna know If STL use "const" overloading such as operator == ...
If not ?
How dose STL do?
Thanks a lot!
|
|
|
|
|
map<struct> should be more like map<int, int> or something. you're indexing one type of thing to another type of thing. you're not just making a vector of structs. even then, if you are making a map of int->structs, then the data type has to be used. the map must know how large of an allotment of memory it has to block off for each part of the map. hope that made sense...
|
|
|
|
|
Hi,
I'm sorry that I made a mistake!
what I mean is when I use STL::map or else
Using iterator as a left value and a map&lt;X,Y&gt; as a parameter of a function
as bellow
void func(const map<X,Y> mapUsed)
{
map<X,Y>::iterator iterMap = mapUsed.begin();
while(iterMap != mapUsed.end())
{
}
}
mapUsed.begin() returned a const_iterator
it dosen't match with iterator
I was confusing that how dose mapUsed know itself is a const one and return const_iterator
Did the IDE do it for us or STL used some other way?
Thanks a lot!
|
|
|
|
|
>> I was confusing that how dose mapUsed know itself is a const one and return const_iterator...
It depends on how "mapUsed" is declared for the function func :
void func(const map<X,Y> mapUsed)
since "mapUsed" is declared as a const, the compiler naturally uses the const_iterator.
- Bio.
|
|
|
|
|
I thought it is about the program language
Now I know the complier do this, Thank you
|
|
|
|