|
|
Yup, not exactly a shocker. :/
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
The resource studio also gone from Excellent (VC6.0) to a bag of shite (VC7.0)
Along with other minor quirks it looks like they compromised VC++ for other other noddy languages that the studio supports.
phew... glad i got that of my chest
Normski. - Professional Windows Programmer
|
|
|
|
|
I salute you all,
I am trying to make a tool box like Paint's Toolbox. But When i used Spy++, I saw that there are 2 objects; first one is CControlBar object and CWnd object which buttons are placed.
My question is how can we make a toolbox based on CWnd class like Paint.
Thanks.
|
|
|
|
|
I have some troubles with making Add-In for VS.NET.
I need to receive Event about saving document and Build complete.
Can you have me with any information ? MSDN page, source or any other...
( Add-in in C++ )
Thank you.
Pavel Sokolov,
CEZEO software,
LanTalk Network,
http://www.cezeo.com
http://www.lantalk.net
|
|
|
|
|
I need to debug a CGI app made with VC++. The only way it can be executed is like http://localhost/cgi-bin/prog.exe?var1=20&var2... etc.
this may be a newbie question, but how can I set a breakpoint in VStudio that will be triggered when I execute the CGI app? I thought about adding an ASSERT(FALSE); in the code so I could enter in the code but I guess there's a better way to do it.
I have a bug that is probably nothing but not being able to see what's really happening makes it difficult to fix it.
thanks guys!
---------------
Your image solutionist on the World Wide Web
http://www.edovia.com
|
|
|
|
|
Use the console. The console uses STDIN and STDOUT just as the CGI does. Instead of passing your params via GET, just use the command line params for development and switch them over to HTTP vars afterwards.
Or, if I just need to a debug something simple and quick, I'll hardcode a value and run with that.
Jeremy L. Falcon
"The One Who Said, 'The One Who Said...'"
<nobr>
Homepage : Feature Article : Sonork = 100.16311
|
|
|
|
|
I just debug the CGI directly from Visual Studio as a standalone application (hitting F5), passing the parameters as command line args (there's an editbox in the Project settings for this purpose), and having the app begin with the following lines:
int main(int argc, char **argv)
{
#ifdef _DEBUG
if(argc>=2){
std::string str("QUERY_STRING=");
str+=argv[1];
_putenv(str.c_str());
}
#endif
...
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
In my VC++ MTS program I am trying to send and receive an XML document using MSMQ. The send part works fine, but I am having problems with the receive part. I am using ActiveX smart pointers for the MSMQ queues and message. Everything works fine until I try to reference the Body of the message (pMsg->Body) and the I get an -2147221164 Class not Registered error. I get this even with the get_Body call. Can anyone help me?
|
|
|
|
|
I want after my application run ,the executable file DELETE itself.Is that possible?
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Mazdak wrote:
Is that possible?
No
-----------------------
Perhaps if you make a batch file and run that batch file when closing your app.
Make loop in your batch file that tries to delete your EXE!
but your batch file will still be there...
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
So,how can I make it run only for ONE time? Like trial version programs.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Hi Mazy
How can you make it delete itself, it will be in use at the time and therefore cause an access denied prompt???
Me
|
|
|
|
|
alternatively i have just thought, Make a second app and get that to delete the first, waiting for the first one to delete. Therefore you will be left with the second app. Which is just there to remove the first and contains no info. alternatively again make a batch file
|
|
|
|
|
Sorry, but then I can't help you!
But if you want an unsafe way to do it: Write something to a file (EXE, DLL or just a file) in binary (of course) and then read from that file to see if it has run before!
Understand?
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
There a solution to that in msdn, if u don't find email me at blackhorus@caramail.com, so i can send u the article.
|
|
|
|
|
Yes.
Copy the file to a temp dir and run it from there. When the app ends, it should add a registry entry (I forget which) requesting Windows to delete it the next time Windows restarts.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
|
Assuming the processor supports unique serial number:
#define cpuid __asm __emit 0fh __asm __emit 0a2h
UINT PSN, ID1, ID2, ID3;
__asm
{
mov eax, 01H
cpuid
mov PSN, edx
}
if (PSN&<s>0x20000</s> 0x40000)
{
__asm
{
mov eax, 01H
cpuid
mov ID1, eax
mov eax, 03H
cpuid
mov ID2, edx
mov ID3, ecx
}
}
else
{
}
If everything works out ID1, ID2, ID3 should contain the unique 96 bit ID. I havn´t tested the code since I don´t have a PIII, but I hope it works...
More info on cpuid here (pdf).
Hope this helps
/moliate
|
|
|
|
|
|
There was a litte bug in the sample program...
Bit 18 is 0x40000, not 0x20000. If you havn't discovered it yourself I think I should save you some trouble....
/moliate
|
|
|
|
|
at first, because my poor english,I wish you can understand me!
If I draw some lines or pictures in a DC,How can I get the bitmap data and save it as a bitmap?
thank you for your help!
Don't look at me in that way!
|
|
|
|
|
CBitmap m_pGenBitmap = new CBitmap();
CClientDC dc(NULL);
int nWidth = 128;
int nHeight = 128;
HDC hDCScreen = dc.GetSafeHdc();
HBITMAP hbm = ::CreateCompatibleBitmap(hDCScreen,nWidth,nHeight);
if (hbm != NULL)
{
HDC hDCGlyphs = ::CreateCompatibleDC(hDCScreen);
HBITMAP hbmOld = (HBITMAP)::SelectObject(hDCGlyphs, hbm);
CDC *pDC2 = CDC::FromHandle(hDCGlyphs);
CRect r(0,0,nWidth,nWidth);
// your owner draw
pDC2->FillRect(&r,&CBrush(RGB(0xff,0xff,0xff)));
m_pFillUnit->Draw(pDC2,&r,0);
// end
SelectObject(hDCGlyphs, hbmOld);
m_pGenBitmap->m_hObject = hbm;
::DeleteDC(hDCGlyphs);
}
return m_pGenBitmap;
|
|
|
|
|
Check out Mike Dunns FAQ, I think it was something about that there...
or
see in the Bitmaps & Palettes section here on CP
or
Search this forum, because you're not the first who asking!
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Can someone tell me the easiest way in .NET to overload a base class function? basicly what I've been doing is looking at how the base class and just copying/pasting the code and modifying it, but i figure there has to be a built in way to overload a function without doing this?
thanks!
-dz
|
|
|
|