|
yes, but that makes the gui start slow .
|
|
|
|
|
Place a good splash window in another thread for your start virtual void BeHappy() = 0;
|
|
|
|
|
=))))) i am creating a serious application for my university degree:P I's a good ideea anyhow
|
|
|
|
|
How Could I Use a define macro identifier in an other define macro replacement list?
for example in the following example:
#define APP_TEST1 L"Test1"
#define APP_TEST2 L"Test2"
#define APP_TEST L"Test1 With Test2"
I want to represent the third define macro with 2 first macro?
|
|
|
|
|
#define APP_TEST APP_TEST1 " With " APP_TEST2
|
|
|
|
|
be really careful with macros, because it is hard to debug and in can lead to really bogouis errors.
=>
//const LPTCSTR APP_TEST1 = L"Test1";
const LPCTSTR APP_TEST1 = L"Test1";
...
Code quality is also an important issue
Press F1 for help or google it.
Greetings from Germany
modified on Friday, March 19, 2010 3:30 AM
|
|
|
|
|
KarstenK wrote: const LPTCSTR APP_TEST1 = L"Test1";
It should be LPCTSTR .
|
|
|
|
|
Hi;
I am working on a project involving a PC onboard a robotic vehicle transceiving (say using Wifi 802.11 connection) sensors' info to another PC housed in another moving vehicle. There are data exhchanges in both directions in real-time. I am totally new to networking/comm between PCs. Please point me to sample code/tutorial on this topic.
Thanks.
Fun Wey
|
|
|
|
|
|
I have a function that will be called for all sorts of windows (it gets the HWND), and I want it to process only static icons, but not other types of controls like buttons, combos, etc. There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
can i convert unicode string to multibyte?
|
|
|
|
|
I like to use WideCharToMultiByte[^] Величие не Бога может быть недооценена.
|
|
|
|
|
or
WideCharToMultiByte[^] ... txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
|
or use like this:
#include "StringA.h"
#include "StringW.h"
CStringW sTestW( L"Test" );
CStringA sTestA( "Test" );
CStringW sConvertW = sTestA;
CStringA sConvertA = sTestW;
</pre>
|
|
|
|
|
I have displayed a bitmap on the screen.Now i want to save it in the harddisk after performing some painting operations on it.How do i achieve this?Please help.
Thanking you in advance,
Ashwath.
|
|
|
|
|
Try it :
CImage::Attach(HBITMAP);
CImage::Save(LPCTSTR);
CImage::Detach(); virtual void BeHappy() = 0;
|
|
|
|
|
Please let me know if we can use CImage code in VS2008.
Thanks,
Ashwath.
|
|
|
|
|
Yes, just include <atlimage.h> virtual void BeHappy() = 0;
|
|
|
|
|
|
Hi all,
I was trying to make self deleting executable. I found a article on code project []
my problem is i am stucked at one place my folder is not getting deleted.
CString templ =
"del \"%s\"\r\n"
"taskkill /im selfdelete.exe\r\n"
"del \"%s\"\r\n"
"rmdir /S /Q \"%s\"\r\n"
"del \"%s\"" ;
CString tempstr;
CString modulename;
LPTSTR pPath = tempstr.GetBufferSetLength(MAX_PATH);
GetTempPath ( MAX_PATH, pPath );
tempstr.ReleaseBuffer();
tempstr = tempstr + tempbatname;
LPTSTR modulenm = modulename.GetBufferSetLength(MAX_PATH);
GetModuleFileName(NULL,modulenm,MAX_PATH) ;
modulename.ReleaseBuffer();
CString str = modulename;
int k = str.Find('\\');
while(k >= 0)
{
str = str.Right(str.GetLength()-k-1);
k = str.Find('\\');
}
CString folder = modulename.Left(modulename.GetLength()-str.GetLength());
CString iniFile = folder;
CString file = "\\selfdeletepath.txt";
iniFile = iniFile + file;
HANDLE hf ;
hf = CreateFile(tempstr, GENERIC_WRITE, 0, NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL) ;
if (hf != INVALID_HANDLE_VALUE)
{
DWORD len ;
CString bat ;
LPTSTR bBat = bat.GetBufferSetLength(MAX_PATH);
bat = (char*)alloca(strlen(templ) + strlen(modulename) * 2 + strlen(tempstr) + 20) ;
wsprintf(bBat, templ,iniFile, modulename, folder, tempstr) ;
WriteFile(hf, bat, strlen(bat), &len, NULL) ;
CloseHandle(hf) ;
ShellExecute(NULL, "open", tempstr, NULL, NULL, SW_HIDE);
}
}
can anybody please tell me what i am doing wrong.
thanks in advance
|
|
|
|