|
dosn't work PretranslateMessage can't catch any WM_* from this control
do you have another way
|
|
|
|
|
just try if u can handle the WM_ Messages of any other active x controls. Whats the name of the active x u inserted exactly.
nave
|
|
|
|
|
Hello!
How can I view the (optimized) Release
Assembly Code in Visual C++ 6 with debug
info - or at least with function names?
Or how can I find a special function?
I noticed that the debug code is quite
inefficient - for example redundant jumps,
even local variables are never kept in
registers, the this-pointer is moved to an
register in nearly every code-line, sometimes
several times, and so on...
Is the release code better? It speeds up
the execution (of my Raytracer) a little
bit, but not as much as I hoped.
Alex
|
|
|
|
|
I think you should go to Project --> Settings --> C/C++ --> Category: Listing Files --> Listing file type and select Assembly with Source Code. In this case the compiler will generate ASM files and you can investigate them.
I hope it helps.
|
|
|
|
|
Greetings,
I have a class with over 25 data variables that have to be set or changed regularly by the user. What, in your experience, is the best strategy to use to set them? For example, should I put a vector in the class that contains the 25 variables and search for itthem all in a vector and when the user changes one go find the specific variable and change it? Or should I just use 25 set and 25 get functions for each one? The user will pick a drop down box and choose which one they want to change. I am wondering what is the most efficient way to implement that on the back end.
Thanks in advance and I look forward to your replies.
Sincerely,
BP
|
|
|
|
|
i have 2 combo boxs im my project have the data added to them have the control var's
CComboBox m_takeout;<br />
CComboBox m_putin;
set and have
m_putin.SetCurSel(0);<br />
m_takeout.SetCurSel(0); in my OnInitDialog();
but it not setting the data into the edit part of the control.
anyone know why?
|
|
|
|
|
This code is supposed to display the first data in the combobox data item. I dun know what went wrong. Can u plz paste ur OnInitDialog() function here?
Regards,
Ram
|
|
|
|
|
<code>BOOL Renamer::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
list.InsertColumn(0, "Title", LVCFMT_CENTER, 350, 0);
m_takeout.SetCurSel(0);
m_putin.SetCurSel(0);
m_takeout.UpdateWindow();
UpdateData(FALSE);
CString csTemp = BaseFolder;
csTemp += _T("\\*.mp3");
CFileFind ff;
BOOL bWorking = ff.FindFile(csTemp);
while (bWorking)
{
bWorking = ff.FindNextFile();
if ((ff.IsDirectory() && (ff.IsDots())))
{
continue;
// Recursively traverse this subdirectory
//EnumerateFolderContents(ff.GetFilePath());
}
else
{
int nIndex = list.GetItemCount();
CString m_songcount, songname, jh;
songname.Format("%s", ff.GetFilePath());
list.InsertItem(nIndex, ff.GetFileName());
list.UpdateWindow();
nIndex = nIndex + 1;
}
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}</code>
that is all of it
|
|
|
|
|
This code is supposed to work well. if u dun get display.
Try to check for the following condition.
m_takeout.SetCurSel(0);
if(m_takeout.GetCurSel() != LB_ERR)
m_takeout.SetCurSel(0);
else
give someother value to m_takeout cbBox.
Regards,
Ram
|
|
|
|
|
locoone wrote: m_takeout.SetCurSel(0);
m_putin.SetCurSel(0);
where do u insert the strings into combobox?r u keeping it in the resources?
nave
|
|
|
|
|
in the properties of the combo boxes in the data tab is where i put the data in the combo boxes like ive always done i just dont know why it isnt showing anything.
|
|
|
|
|
ok..
try putting
m_takeout.SetCurSel(0);
m_putin.SetCurSel(0);
as the last statement just above the return TRUE; statement.
nave
|
|
|
|
|
thanks dude that works and it didnt even cross my mind
now if i can figure out how to make and use a worker thread to run my progress dialog ill be almost set lol
-- modified at 0:07 Monday 10th July, 2006
|
|
|
|
|
Hello, I have received some help from earlier postings and have another question regarding the <list> class.
I have stored a list of items that are of a user-defined datatype and need a way of printing each item in the list. As shown below a struct has been defined of type data which includes 4 strings. The full program receives input by a user who types in a list of these objects of type data.
I was wondering if storing this list as a vector using a <vector> class is a better solution since I need to access each individual string per item in the vector.
Regards
HRW
#include <string>
#include <list>
#include <iostream>
using namespace std;
struct data
{ string Length;
string Sequence;
string N_Terminal;
string C_Terminal;
};
-- modified at 13:33 Sunday 9th July, 2006
|
|
|
|
|
Have you tried something like this (should work for both list and vector)?
list<data> dataList;<br />
list<data>::iterator dataListIter;<br />
<br />
for (dataListIter = dataList.begin(); dataListIter != dataList.end(); dataListIter++)<br />
{<br />
printf("%s, %s, %s, %s\n", dataListIter->Length, dataListIter->Sequence, dataListIter->N_Terminal, dataListIter->C_Terminal);<br />
}
(Haven't tested it, there might be typos).
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Hello, the code compiled but I did not see any output on my screen. I invoked a function called void tesings () to test out the program.
See below.
#include <string>
#include <list>
#include <iostream>
using namespace std;
struct data
{
string Length;
string Sequence;
string N_Terminal;
string C_Terminal;
};
list<data> g_DataList;
void tesings ()
{
list<data> dataList;
list<data>::iterator dataListIter;
data item;
item.Length ="test";
item.Sequence ="test";
item.N_Terminal ="test";
item.C_Terminal ="test";
dataList.push_back(item);
for (dataListIter = dataList.begin(); dataListIter != dataList.end(); dataListIter++)
{
printf("%s, %s, %s, %s\n", dataListIter->Length, dataListIter->Sequence, dataListIter->N_Terminal, dataListIter->C_Terminal);
}
}
|
|
|
|
|
Is it a console app or windows app?
If it's a console app, you have to drop out to a command promtp window and run your app from there to see the output.
If it's a window app, well, then you need to place the output in a windows control, like a list box or something.
Maybe try adding a few more items and see what happens. Also might try setting a breakpoint on the printf line and see if it's even getting to that point.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I am testing the program using Visual C++ 6.0 and pressing the executable button to get to the console screen. I tried using cout statments instead and still end up with a blank screen. See sample below:
void tesings ()
{
list<data> dataList;
list<data>::iterator dataListIter;
data item;
item.Length ="test";
item.Sequence ="test";
item.N_Terminal ="test";
item.C_Terminal ="test";
dataList.push_back(item);
item.Length ="test";
item.Sequence ="test";
item.N_Terminal ="test";
item.C_Terminal ="test";
dataList.push_back(item);
for (dataListIter = dataList.begin(); dataListIter != dataList.end(); dataListIter++)
{
cout << dataListIter->Length << endl;
cout << dataListIter->Sequence << endl;
cout << dataListIter->N_Terminal << endl;
cout << dataListIter->C_Terminal << endl;
}
}
I see my error. I was redeclaring my function in main() but I never actually invoked it.
I typed:
void tesings ();
instead of
tesings();
Thanks for the help!
-- modified at 16:37 Sunday 9th July, 2006
|
|
|
|
|
Cool, glad it's working now! Declaring local functions is one of the dangers of C++, but once you find the error, it's one of those "doh!" moments, and you have to laugh.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
How can a program detect other instances of itself running simultaneously? In VC++ please
|
|
|
|
|
Search CP for "single instance". You'll get tons of articles about your question.
Best,
Jun
|
|
|
|
|
|
Hi,
I'm generating an html page on-the-fly in my application.
This page should contain images. The images i have in the DB are of formats that cannot be used in html (jpeg, png etc) so i need to save them in gif format.
Does anybody have a lead on how to save these image files in gif format?
Thanks in advance.
|
|
|
|
|
I guess you can open them in MS Paint and then save them to the bmp/gif format. Paint does the conversion.
Fortitudine Vincimus!
|
|
|
|
|
Sure, but but this has to be implemented on-the-fly. The DB is dynamic and i don't know in advance what's its content.
It has to be done in coding. Thanks anyway.
|
|
|
|