|
See this URL:
http://www.codeguru.com/dialog/toolbars.shtml
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
Thank you
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
hello all
please help me..
it s very urgent.
I have to develop a Windows Explorer like
application using dialog boxes only.
Is it possible to do that without Doc/view ?
If so how?
code samples will be great helpful at this
critical time.
if we have to develop in Doc/View ..how to do ?
But i fi get Dialog based code sample..
it is more helpful to me.
kumaru
"They can because they think they can" - Voltaire
|
|
|
|
|
kumaru_san wrote:
I have to develop a Windows Explorer like
application using dialog boxes only.
Is it possible to do that without Doc/view ?
If so how?
Yes, one of the first questions that AppWizard asks is whether you want a dialog-based application or not. After AppWizard creates the application, simply add the necessary controls to the dialog template.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi All,
I made a Visual C++ program that changes desktop wallpapers, how can i load the program at start up like Webshots does.
Thanks,
aidanz
|
|
|
|
|
Hi,
You have to make an entry in the registry under the key
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
You should have some values there so follow that examples. If you do not have any value you should make a string value. The name will be displayed by windows in programs managing the startup section. The value is your program that will start.
Msn has something like this:
MsnMsgr REG_SZ "C:\Program Files\MSN Messenger\MsnMsgr.Exe" /background
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
Thank you for your replying, Florin
I've done what you said and it's working now, but after making an entry for my program HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run, I saw only 2 string values, one was my program and the other was the msn that was in your example, i got a couple of other programs such as Norton Antivirus and Virtual DEAMON those run at start up as well, how do they work
Regards
|
|
|
|
|
Check msconfig (the Startup tab). Type msconfig in Start->Run. There you will see how each program is started. Be careful what you modify there.
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
More than likely they are in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run key.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
3 easy ways:
1) shortcut in "Autorun" start menu
2) entry in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
3) create a nt service
Don't try it, just do it!
|
|
|
|
|
Does anyone kno how to change time in sec to time in hours min and sec help!
|
|
|
|
|
Hours = (TimeInSeconds / 3600);
Minutes = (TimeInSeconds % 3600) / 60;
Seconds = (TimeInSeconds % 3600) % 60;
Or something like that......
|
|
|
|
|
I'm trying to implement a project for a CS class with a bit vector, and will be using these to & and | with bit masks. I'm told for speed reasons, I need to make use of the boolean functions that are "hard-wired" in the computer. For C++, what would that be?
Any help would be appreciated
Mark.
Mark Malin
(00==[||]==00)
|
|
|
|
|
Don't worry, logical operators such '&' and '|' are hard-wired in any processor of any firm The compiler will use them, as there is no use to simulate them, but also no ways to simulate them ! It it basic operators all functions rely on !
Who the hell told you to use hard-wired logical operators ? Does he knows a bit about computers and more specificaly about processors ? What about using hard-wired mathematic operators such '+' or '*' then ?
Kochise
In Code we trust !
|
|
|
|
|
My Comp. Sci. proffessor told me to use the "hard-wired" operators. I'm assuming he'd know, since he's been teaching the microprocessor and assembly lang. classes as long as I've been at the school (22 years and counting to finish my BS). Anyhow, he wants us to do these bit-wise & and | functions as fast as possible for this huge natural language processor project. The idea is, if the compiler makes use of assembly fucntions that are using registers to access the hard-wired logic operations inherant in the micro processor, they'll be faster.
Does that shed any more light on the question?
So... know anything about boolean vectors? That's my other question. He wants us to use bit vectors -- and the only thing I can find is "bitset" in the template library.
Mark.
Mark Malin
(00==[||]==00)
|
|
|
|
|
Sorry for my bad English, I'm Austrian.
I've programming a "Test"-Project, which contains a ColorButton/ColorPopup. I've downloaded 4 files (ColorButton.cpp/h and ColourPopup.cpp/h) and implanted into my Project "ColorFeld" (=German, it means in English "ColorField")
The Project works perfectly, BUT I've added an Editbutton. It should show the currently Code of ColorButton. There is are any Errors:
C:\Programme\Microsoft Visual Studio\MyProjects\ColorFeld\ColorButton.cpp(90) : error C2653: 'CColorFeldDlg' : Keine Klasse oder Namespace
C:\Programme\Microsoft Visual Studio\MyProjects\ColorFeld\ColorButton.cpp(90) : error C2065: 'm_showcolor' : nichtdeklarierter Bezeichner
Keine Klasse oder Namespace = No Class or Namespace
nichtdeklarierter Bezeichner = not declared Variable
... I've experimented with "CColorFeldDlg::m_showcolor = m_Color;" ... No idea!
Can anybody help me, please? - I'm a beginner!
You can download my Sourcecode here: http://www.xorsystem.info/ColorField.zip
THANKS!!!!
|
|
|
|
|
If I understood your code well, you're doing basic errors about inheritance in C++ and the parent-child relation between a dialog and one of its controls.
When you write
CColorFeldDlg::m_showcolor = m_Color you seem to imply that you can access the members of the parent CColorFeldDlg by means of the notation CColorFeldDlg:: . This is wrong. Inheritance is not a container/contained relationship. You can think of inheritance as an IS-A relationshpip. For instance
class Person
{
...
};
class Woman:public Person
{
}; whereas what you have is more of a HAS-A relationship:
class Car
{
...
Wheel wheels[4];
}; If you got this right you more or less will see what you're doing wrong. In MFC, there are functions for retrieving the parent of a given control:
CColorFeldDlg *pParent = (CColorFeldDlg *)GetParent();
pParent->m_showcolor = m_Color; There's a bit I haven't explained here, namely the so called cast (CColorFeldDlg *) . An excellent introduction to the basics of C++ language if Marshall Cline's C++ FAQ lite[^]. If you have the tie to read it, I recommend you do it. Good luck.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I'm using smart pointers in MSXML to retrieve nodes from a xml doc. I want to check the value of an attribute of an element using the value () fucntion. But, it returns _variant_t , how to convert it to CString so that I can compare with string?
Also, can anybody provide me with api of Smart pointers in msxml? because they are not available in msdn and are very different from normal api.
Please help
|
|
|
|
|
CString str;<br />
_variant_t v;<br />
str = V_BSTR(&v);
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Thanks Sir. can you tell me where I can get the api of smart pointer?
Ans. 5
|
|
|
|
|
Been a little while since I did this, but I think you do the following:
MSXML2::IXMLDOMElementPtr iNode = iNodeList->Getitem(iRow);
CString csVal = iNode->getAttribute("AttrName").bstrVal;
|
|
|
|
|
|
Hi, i'd searched around the forums, read many posts and also the articles in CodeGuru.com, Codeproject.com... and still find myself big trouble to Create a 24 Bit bitmap from scratch datas...
ok, i have a set of datas... and i wanto make a 24Bit Bitmap from the datas..
COLORREF RawPixelData[400];
BYTE RawData[1200];
<color=green> //example of my datas
RawData[0]=1111 1111;
RawData[1]=1111 0000;
RawData[2]=1100 0011;
: :
: :
: :
RawData[1199]=1111 1111;
<color=green>//my RGB datas
RawPixelData[0]=RGB(RawData[0],RawData[1],RawData[2]);
RawPixelData[1]=RGB(RawData[3],RawData[4],RawData[5]);
RawPixelData[2]=RGB(RawData[6],RawData[7],RawData[8]);
: :
: :
: :
RawPixelData[399]=RGB(RawData[1197],RawData[1198],RawData[1199]);
thats the datas of every pixels... that i'd made them ready to build a 24Bit BITMAP...
so, i learned from the tutorial written by Alex Salta - Creating Color Bitmap From Scratch..
<url=http: www.codeguru.com="" bitmap="" createdibsection.html="">http://www.codeguru.com/bitmap/CreateDIBSection.html
HDC dc= CreateCompatibleDC(NULL);
BITMAPINFO i;
ZeroMemory( &i.bmiHeader, <color=blue>sizeof (BITMAPINFOHEADER) );
i.bmiHeader.biWidth=5; <color=green> // Set size you need
i.bmiHeader.biHeight=5; <color=green> // Set size you need i.bmiHeader.biPlanes=1;
i.bmiHeader.biBitCount=24; <color=green> // Can be 8, 16, 32 bpp or <color=green> // other number
i.bmiHeader.biSizeImage=0;
i.bmiHeader.biSize=<color=blue>sizeof (BITMAPINFOHEADER);
i.bmiHeader.biClrUsed= 0;
i.bmiHeader.biClrImportant= 0;
VOID *pvBits;
HBITMAP hbmp= CreateDIBSection( dc,
&i,
DIB_RGB_COLORS,
&pvBits,
NULL,
0 );
<color=green> // You don't have to use 'pvBits', later DeleteObject(hbmp)
<color=green> // will free this bit array.
ok..those are the codes from the tutorial... some part i couldn't understand at all...the part i bolded them..can anyone teach me what those codes do???
also..where do i assign my RawPixelData[] into the BITMAP??
and how to save the BITMAP??
Its urgent..i hope you guys can help. I'd searched around but do not have any answers...
thanks
Thong
[email]twh81@tm.net.my[/email]
...
|
|
|
|
|
...inside the function SetBitmap !
CSkinProgress contains alotsa bitmap tricks and hints, good for newbies and educational purposes also !
http://www.codeproject.com/miscctrl/CSkinProgress.asp
Kochise
In Code we trust !
|
|
|
|
|
In VC6, you can modify the autoexp.dat file and add a section called [ExecutionControl]. Within that section you can tell the debugger about functions that you don't want it to step into; CString::CString=NoStepInto. Is this supported in VC7? It doesn't seem to be supported the same way as VC6, but perhaps there is another way to get the same result.
Thanks
Ron Ward
|
|
|
|