|
Mila025 wrote: Hi,
hm do you mean something like that:
CLedButton * led = new CLedButton;
led->Create( "an strange text", WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX, CRect( 2, 2, 120, 20 ), this, iCtrlId );
led->SetIcons(IDI_GRAY_LED_ICON, IDI_GREEN_LED_ICON);
...
...
...
delete led;
Yes, thanks. I found it out on my own at the same time and wanted to post it here, but you were faster
The BS_AUTOCHECKBOX flag needs to be set, otherwise the class asserts.
Damn, I have the feeling that asserts are really bad implemented. I'm using my non-mfc application an custom assert, which brings me directly to the line, where the assert happend and not somewhere deep in the MFC, where I have to search the huge call stack for the place, where the real assert happend.
Anyway, thanks for you help
|
|
|
|
|
Mila025 wrote: delete led;
better make a call to DestoryWindow before deleting variable or make call to delete at destructor or OnDestroy Window handller
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
hello everyone!!! i am uploading a few files using CFtpConnection:: putfile() function. the uploading is working fine in a thread. now, i want to know if there is any way (if possible) that i can add a pause-resume option to my application?? thanks...
vijay.
|
|
|
|
|
What kind of an application is that? Multi threaded or single thread? If it is a multithreaded application and if the uploading is done by a separate thread, then you will have control of that thread. If only you are using a single threaded application, Here[^] is the answer
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
well sir, thank u very much... yes, i have a separate thread for uploading files and i have even written the code to abort the thread when i press the stop button.. but still not able to make it work.. well, i will again see what mistake i am doing... thank u..
vijay.
|
|
|
|
|
Hi All,
I'm having '.jpeg' and '.png' image files in my resource.
To convert then to IPicture, I'm loading the image to HGLOBAL and from it i'm creating a IStream using CreateStreamOnHGlobal() API. Till this point i'm getting the IStream pointer for both the image types.
I'm using OleLoadPicture() to convert the IStream to IPicture... this is working file for '.jpeg' images but for '.png' i'm getting the IPicture as NULL and the HRESULT value i'm getting is some negative value..
How can i convert IStream to IPicture for '.png' images...
These files are not in disk they are in my project itself as resources...
Thanx...
Do your Duty and Don't expect the Result
|
|
|
|
|
Hi,
I have to hook a toolbar to a messanger, how can i do that.
Can any one help me in this regards, plz provide me some links regarding this issue.
Thanks in Advance
Gopinath MV
|
|
|
|
|
Hi all,
I am getting a Linker Error while Running the my exe.
error LNK2001: unresolved external symbol "public: __thiscall
What i have done is i placed a macro
AFX_EXT_CLASS before the class definition to import that class.
// code
class AFX_EXT_CLASS CGTDMultiBitTrgSettingsDlg : public CGTDBasicDlg
//code
i am getting this problem what shall i do
Uday kiran
|
|
|
|
|
I think u had used static dll.
If you have import any static dll, u have to consider two main things
1. Add the lib details in project settings
2. Add the header files into exe path
And then compile.
|
|
|
|
|
uday kiran janaswamy wrote: I am getting a Linker Error while Running the my exe.
Not possible. If you have an .exe, then the linker has already been used and was successful. If the linker failed, then no .exe was produced.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi,
can anybody please help me on backup policy implementation?
or anybody having link of some small algorithm of backup policy like FULL,INCREMENTAL,DIFFERENTIAL backup.
Thanks & Regards
rakesh baldha
|
|
|
|
|
There are heaps of backup policies and schedules on the net. Start with googling for a policy that fits your needs.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Hi to all,
I am new to Visual Studios 2003, i want to develop an application in VC++.net Framework, so i have to work through the templates "Managed C++ Application", "Managed C++ ClassLibrary" and "Managed C++ Empty Project".
But In Visual Studios 2003 i didn't found any of these templates.
Can any one help me in this regard, Do i have to install them separately or do i have to check any options???
Any help or thoughts would be greatly appreciated.
Thanks in Advance.
With regards, Gopinath MV
|
|
|
|
|
The names are different but there are managed application templates in VS 2003.
in the "Add new project" dialog...
Expand "Visual C++ Projects" in the tree on the left and select ".NET"
You should see several .NET application types on the right, including the 3 you need:
Console Application (.NET) or Windows Forms Application (.NET)
Class Library (.NET)
Empty Project (.NET)
|
|
|
|
|
Hi,
I have never worked on C++ and now I have to deliver a code in next 2-3 days asap...
I have to write a code in C++ which takes an input text file from the hard disk of the following format:
D FP CDT0 "0 :400000000000:499999999999:12,13,14,15,16,17,19:10:ABCD:2:1:11101101[ab61]"
It should first check the 3rd value in each line i.e. CDT0, store it in a variable and then read the rest of the line which is : delimited. it should store these values in some array (or watever the best way to do this). Basically these values have to be copied then in the MS access DB tables. The third value of each line shows which DB table it corresponds to.
Kindly help me with your valuable inputs (code basically!!)
Thnx!
|
|
|
|
|
Only 2 or 3 days? You had better get busy then. good luck!
|
|
|
|
|
Different color
|
|
|
|
|
if I understood you want to read file,check values,enter to array and in the end insert to Access
(1) you can use of CStdioFile or CFile for read file
(2) you can use of CStrinf::Find for if values are same on each line
(3) you can use of CStringArray for insert same values
(4) you can use of CDatabase for insert to Access(you can see examples of Working with Access On codeproject)
(5) End
|
|
|
|
|
Hi whitesky,
thnx for these hints supplied!!
bt i m nt well-versed in writing code in C++. can you gimme the code for the same?
thnx a lot!
|
|
|
|
|
If you search on codeproject you can find your answer of course for each title on codeproject you can see a lot of examples.
For read of files a lot of examples.
Working with strings.
Working with databases.
I think its better you see articles because you learning many things(you are new on c++).
|
|
|
|
|
Prinky wrote: I have never worked on C++ and now I have to deliver a code in next 2-3 days asap...
Just out of curiosity, whose idea was this, and are they expecting it to work?
Are you using C++ only, or will this be an MFC application?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Just out of curiosity, whose idea was this, and are they expecting it to work?
I'm thinking job entry test
|
|
|
|
|
I think hes a student
|
|
|
|
|
WhiteSky wrote: I think hes a student
Me too...but it was much more fun imagining it as an employment interview test
|
|
|
|
|
...And also I dont think these questions for interview why?because employment question are technical,right?
if Prinky is student I hope Prinky learns c++ early.
but I think its difficult to learning c++ in a short time
|
|
|
|