|
Thankkyou Cedric for your reply.
I have implemented what you have write.As follows but again ma progg run and a window popped with a mssg
CImg<double>::load():File 'path' cannot be opened.
Plzz reply!!!
//Progg. for taking the names serially.
#include"stdio.h"
#include"string.h"
#include"conio.h"
#include"CImg.h"
using namespace cimg_library;
int main()
{
int i;
char str[10],string[10],fmt[]=".bmp",path[]="C:/Users/Shree Hari/Desktop/trial/";
for(i=1;i<=10;i++)
{
sprintf(str,"%d",i);
strcat(str,fmt);
strcat(path,str);
CImg<double> image("path");
CImgDisplay main_display(image,"Image",0);
//printf("\n\n%s\n",str);
}
getch();
return 0;
}
|
|
|
|
|
Hum, I think you need some serious tutorial on string manipulation because it seems you don't understand at all what you are doing.
First:
shyampasari wrote: CImg<double> image("path");
Because of the quotes, you are passing a string litteral and not the path variable. Remove the quotes.
Second:
Each time in your loop you will concatenate a new string to the previous string (which already contains the full path). So, it will work for the first image but not for the second anymore. You could simplify everything by simply doing this:
char path[255];
for(i=1;i<=10;i++)
{
sprintf(path,"C:/Users/Shree Hari/Desktop/trial/%d.bmp",i);
....
|
|
|
|
|
How to set the checkbox in CListView to be disable for user to change?
But user can not only double click and click the item in CListView,but also can multiple select by shift and control.
|
|
|
|
|
Well, i don't know how you could change its appearance aside of drawing the items yourself but you can avoid the changing of the check state by handling the LVN_ITEMCHANGING[^] notification.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
hi all,
i have a folder named "test" which is installed in windows directory when my program gets installed.if windows installed in D then my folder path is D:\\test
can i have some example code, in which i can open this folder and write a file with admin privileges.
i want a code example to open the folder "test" in windows directory and write a file...
thanks...
|
|
|
|
|
|
Subrat Patnaik wrote: i have a folder named "test" which is installed in windows directory...
Which implies:
d:\windows\test
If you have d:\test instead, the test folder resides off the root of the Windows volume.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
I'm trying to copy the used clusters of a hard disk partition(NTFS,windows os) to another partition.
I used the "FSCTL_GET_VOLUME_BITMAP" to get the cluster usage details.
And I'm getting the used and free cluster counts correctly.And the cluster number I got is continuous.
This makes problem for me. I wanna copy the used clusters to a different partition.
What type of cluster number I'm getting.? ; but the answer is correct.
It makes confusion to me.
Sometimes my question may be totally wrong.....
with regards Krish
modified on Friday, June 12, 2009 3:09 AM
|
|
|
|
|
how to realize scrolling text in a dialog,like the <maquee><\maquee> in html?I use double buffering to draw the text,and change the text position in Ontimer() function.However,I found the effect is not so good.I heard about that can use the Multi-threaded to realize it?How?Thanks!
|
|
|
|
|
|
CWaitCursor changes back to normal cursor on mouse move event, before the end of the function
CWaitCursor wait;
|
|
|
|
|
I think you are still stuck with the same problem . Why are you using CWaitCursor function? wasn't SetCursor() a better solution?
|
|
|
|
|
No it is good once but,SetCursor() was a working for all the dialogs except for one dialog box.
When I user CWaitCursor using this works for all the dialogs (for the one dialog which I mentioned above I used
wait.Restore(); inbetween the code).
It worked. But now the new problem was that when on mouse move event , the hour glass symbol is replaced by normal mouse cursor.
Is there some thing similar to wait.Restore(); wich I can use with SetCursor
|
|
|
|
|
ptr_Electron wrote: CWaitCursor changes back to normal cursor on mouse move event, before the end of the function
There is an option in to restore the cursor back, use CWaitCursor::Restore. Also check from where the cursor is being reset to normal cursor.
|
|
|
|
|
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Hi,
I need C or C++ code to convert the hex string to the binary string please can any one help me.
Eg Hex Data:
C1 E1 08 0F B6 C0 0B C8 8D 45 F4 50 89 4D F8 FF 15 48 70 40 00 83 45 F0 04 89 45 14 50 8D 45 E4 50 FF 75 0C FF 15 4C 72 40 00 FF 75 14 FF D3 83 45 E8 04 39 7D E8 0F 8C 77 FF FF FF 83 7E 58 FF 74 65 FF 76 34 FF 15 4C 70 40 00 85 C0 89 45 14 74 55 8B 7D 0C 6A 01 57 C7 45 E4 10 00 00 00 C7 45 E8 08 00 00 00 FF 15 50 70 40 00 FF 76 58 57 FF 15 54 70 40 00 FF 75 14 8B 35 58 70 40 00 57 FF D6 89 45 0C 8D 45 E4 68 20 08 00 00 50 6A FF 68 40 3F 42 00 57 FF 15 50 72 40 00 FF 75
To Binary Data:
Vÿq@ ‹ø;ûteÿuWÿq@ ‹ð;ót=9]ä‰]ütÿuäèéóÿÿÿÖ…Àt1ÇEü
ë(h @ h°@ h PB h ÿuøÿÖƒÄë
ÿuj÷èÊ, 9]èuWÿq@ ëjöëjçè™óÿÿSÿq@ é jðèó j߉EÐèé
|
|
|
|
|
Since your string is well formatted, it's pretty simple, for instance
char szHex[] = "C1 E1 08 0F B6 C0 0B";
const unsigned int SIZE = sizeof(szHex)/sizeof(szHex[0]) / 3;
unsigned char pBinary[SIZE];
for (int i=0; i<SIZE; i++)
{
if ( sscanf(szHex + 3 * i, "%2X", pBinary+i) != 1) break;
}
However, I see the result you're expecting is quite different. How can, for instance, you map 0xC1 to 'V' ?
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]
modified on Tuesday, June 9, 2009 3:32 AM
|
|
|
|
|
No i pasted just for a sample output that i need, its not the correct output i copied a part from the output,
Thanks for your post.
|
|
|
|
|
How would you do this using pencil and paper?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
hello,
i want to write a program in vc++ 2008 using win32 c which run on client and check the status of iis server. the status means ---- server is down or not, sql is working or not and iis is working or stopped.
please guide me
thanks
rahul
|
|
|
|
|
Can you check the IIS service on that remote machine?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
i dont know. i want to this project but i dont know much about it. i come to know that socket programming will be used for this project.
actually i am totally new to windows programming but i have to summit this project soon or i will in big trouble. i am trying my best to learn it but time is less, work is more. i will learn windows programming in detail after this project because then i will have more time.
|
|
|
|
|
rahuljin wrote: i will learn windows programming in detail after this project because then i will have more time.
Famous last words.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
really, i know basic of c, c++, java, html\xhtml, vb, etc. this is the frist time i am doing the advance level programming. i want to learn asp .net but not know.
|
|
|
|
|
rahuljin wrote: this is the frist time i am doing the advance level programming.
It's not really an advanced topic as much as it is a specialized topic. See here for an idea.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|