|
I'm not sure if you really can. I suppose explorer.exe will read the path from the registry when you run it and then store it in internals variables, so 2 ways... find and change these variables or restart the explorer.
Don't try it, just do it!
|
|
|
|
|
Hi guys
Taking a look in resource.h I've seen that.
#define IDC_SG_MIN11 1143
#define IDC_P101 1143
This happens in a lot of resources (resources with the same number).
That could be a problem?
It's better to have each resource with his own and unique number?
Best Regards
Doc
|
|
|
|
|
This plagues me as well.
Check out this utility for checking and fixing duplicate resource ids >
ResOrg[^]
I Dream of Absolute Zero
|
|
|
|
|
In my experience this duplication occurs whenever I copy & paste controls.
I've spent many an hour over the years rectifying such duplicates!
Ant.
|
|
|
|
|
Then you recommend me to change it, isn't it?
I haven't problems compiling but somke guys advised me that in W98 a non valid resource or something like this error happened, it's possible due to this?
Thanks
Doc
|
|
|
|
|
Yes I recommend that you change it.
Note: Remember to change the _APS_NEXT_CONTROL_VALUE at the end of the resource.h file also if you do it by hand otherwise subsequent controls will have duplicates.
Ant.
|
|
|
|
|
delete one of the resource and then add it, any problems due to duplication will go away...
but are you sure both where IDC_xxx
it is possible to have
IDC_xx 2233
IDI_xx 2233
and it is ok.
|
|
|
|
|
I need to programatically save some image displayed in WebBrowser control to some file, or get the image's data into memory.
How to do this ? (IHTMLImgElement offers only functions for getting image's size and creation date, but I could not find any function for getting image's data or it's name in temporary internet files)
Any ideas ?
Thank you !
rrrado
|
|
|
|
|
Your question (the same one posted a while ago...) inspired me a little. Using samples from CodeProject,
and MSDN documentation, I've glued together an IE toolbar with "Grab Pictures", and "Grab pointed to
Pictures" functions.
Once you have a IHTMLImgElement , just use its get_src method. Then use URLDownloadToFile , or URLOpenStream
if you are more masochistic...
Iain.
|
|
|
|
|
Hello, thank you for reply, but unfortunately image I need to save is not cached, is dynamically created and is different every time I reload the page or download it again
rrrado
|
|
|
|
|
I want to post a message from a Global Function to a UI thread.who can tell me ,how can i get the thread pointer or id in the Global Function?
void CALLBACK Timer2(HWND hwnd,UINT uMsg,UINT idEvent,DWORD dwTime)
{
//::PostThreadMessage(WM_TIMEUP,0,2);
}
class CServiceWnd : public CWinThread
{
............
}
ON_THREAD_MESSAGE(WM_TIMEUP,TimerProc)
afx_msg void CServiceWnd::TimerProc(WPARAM wParam, LPARAM lParam)
{
..............
}
|
|
|
|
|
You can get a pointer to your current thread by calling AfxGetThread . If you need a different thread, you'll need to store a pointer to it somewhere.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Problem: Convert the Global variables into Class Variables
A good example is the variable ‘OurString’ which is declared in
file oam.var in the following way:
TCHAR OurString[260];
It is used in 209 different places according to “Find in Files”.
There are two problems with those global variables:
1) they might break if we start using multiple threads
2) the code does not typically check if there is enough space for the stuff that is put to those variables.
Can U give some idea for implementation?
dadsadasd
|
|
|
|
|
|
hi...could anyone check the codings below? thanks.
#include <iostream>
#include <iomanip>
using namespace std;
class Bus
{
int number;
char startDepot[30];
char endDepot[30];
int departureTime;
public:
void update();
void display();
};
void Bus::update()
{
cout << "Enter the bus number (eg 83): ";
cin >> number;
cin.ignore(80, '\n');
cout << "Enter the start depot (eg Sengkang): ";
cin.getline(startDepot, 30, '\n');
cout << "Enter the end depot (eg Punggol): ";
cin.getline(endDepot, 30, '\n');
cout << "Enter the departure time (eg 1605): ";
cin >> departureTime;
cin.ignore(80, '\n');
}
void Bus::display()
{
cout << "Bus number : " << setw(3) << setfill('0') << number << endl;
cout << "Start depot : " << startDepot << endl;
cout << "End depot : " << endDepot << endl;
cout << "Departure time : " << setw(4) << setfill('0') << departureTime << endl;;
}
int main()
{
int count;
Bus *b;
cout << "How many buses are there: ";
cin >> count;
b = new Bus[count];
char choice;
int num;
do
{
cout << "u. Update\n";
cout << "d. Display\n";
cout << "e. Exit\n";
cout << "enter selection: ";
cin >> choice;
switch(choice)
{
case 'u' :
cout << "enter bus number (1-" << count << "): ";
cin >> num;
b[num-1].update();
break;
case 'd' :
cout << "enter bus number (1-" << count << "): ";
cin >> num;
b[num-1].display();
break;
}
} while (choice != 'e');
delete [] b;
return 0;
|
|
|
|
|
so...?????
what is your question ?
TOXCCT >>> GEII power
|
|
|
|
|
does the coding looks logical?
|
|
|
|
|
|
It has very severe error that it is without comments. And believe me my friend a code without comments is just a deadbody.
cheers
|
|
|
|
|
How to delete a file which name is contained in the CString variable "m_csPCFileName" ?
I tried this but it doesn't seem to work:
char* pTempFileName = "";
strcp(pTempFileName,m_csPCFileName); //Conversion CString to CHAR*
CFile::Remove(pTempFileName);
I have an handled exception error message...
Thank's for advance
|
|
|
|
|
Anonymous wrote:
strcp(pTempFileName,m_csPCFileName); //Conversion CString to CHAR*
false strcpy() is not designed() to work with CString s.
use the CString::operator (LPCSTR) () instead.
TOXCCT >>> GEII power
|
|
|
|
|
strcpy works just fine with CString. However, the code in the first message is badly broken.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
|
How about a simpler function, DeleteFile( lpszFileName );
It's a standard Win32 api.
--
Joel Lucsy
|
|
|
|
|
Hi,
I have a batch file that is used for daily build and has large number of projects build from the command line using this file.
The Command Line command that does the build using the batch file is
msdev xmlTest.dsw /MAKE "BuildAll - Win32 Debug" /OUT ..\..\xmlTest.log
This build is based on the settings made to the .dsp files present in the Workspace and works fine for existing settings.
Now i want to modify the batch file to build with the option /ZI or /Zi turned on in order to generate the .PDB files.
So the thing is that i have to build first without /Zi or /ZI option and next set this option and run the second time to get the .pdb files generated.
What is that i need to modify in the batch file to make both the options working from the command line..
I think it has something do to with the environment variable setings....but have no idea how to do it...
Thanks
AR
|
|
|
|