|
toxcct wrote:
project file is no a makefile
Nowhere did I say that a project file was a makefile. I said the former was like the latter, in that it contained the files comprising the project and how to build them. It was not implied that one could use cl.exe with a .mak file. However, you can use msdev.exe with a .dsp (or .dsw) file.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
This forum is for asking concrete questions, if you want to learn how the c++ language works, then you have to do it somewhere else!
Don't try it, just do it!
|
|
|
|
|
I'm trying to localize a Windows installer package (.msi) built with VS.net 2003. I followed the steps written in MSDN.
However, only the "Preparing to install" dialog is displayed in the localized language, the rest of the installer is still in English. The language/codepage ID's seem to be OK, the localized strings are also in the MSI. (I'm using an English Windows but it should not be the problem as the "Preparing to install" dialog is localized and other programs can also use localized installers.)
Have anyone ever met this problem? Any tips?
|
|
|
|
|
I'm trying to get a very basic Client-Sever app using sockets to communicate (Below are the code snipets). First I start the server, it connects to port 6001 and waits. The client starts up and connects and sends a string, the server accepts the connection and tries to read data into dwValue but I get nothing - they do not communicate after the connection, any ideas why ??
Thanks in advance !!
------------
Server Code:
m_sockRecv = new CSocket;
CString dwValue;
CSocket sockSrv;
sockSrv.Create(6001);
sockSrv.Listen();
CSocket sockRecv;
sockSrv.Accept(sockRecv);
CSocketFile file(&sockRecv);
CArchive arIn(&file, CArchive::load);
CArchive arOut(&file, CArchive::store);
arIn >> dwValue;
Client Code:
CString str = "9";
csocket.Create();
csocket.Connect("localhost",6001);
CSocketFile file(&csocket);
CArchive arIn(&file,CArchive::load);
CArchive arOut(&file,CArchive::store);
arOut << str;
|
|
|
|
|
Could someone possibly explain how the bitmask "mask" property of the LVITEM structure works?
typedef struct _LVITEM {
UINT mask;
int iItem;
int iSubItem;
UINT state;
UINT stateMask;
LPTSTR pszText;
int cchTextMax;
int iImage;
LPARAM lParam;
#if (_WIN32_IE >= 0x0300)
int iIndent;
#endif
} LVITEM, FAR *LPLVITEM; I'm trying to do something similar in my program, but I can't figure out how the LVIF_* flags work to denote which fields are valid and which are not. Any help or points in the correct direction are very appreciated. Thanks.
- Aaron
|
|
|
|
|
It works in 3 ways
1. when you are inserting the item.
mask represents the valid field that you have filling up and that the listview control should take note of it or safe it in its internal buffer.
2. When you get LVITEM in response to some notification.
now the mask represents the valid data that this structure contains.
3. When you are trying to retrive some information like GetItem.
now the mask represents the fields that you are interested to retrive
If you are trying to insert an item and say you want to put some data in lparam then you should according set the bit in the mask to indicate that you are providing that field. If you dont set the bit then lparam is ignored.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Thanks for the reply. Unfortunatley it doesn't really answer my question. I'm not really concered with LVITEM, but simply used it as an example. I'm interested in how the bitmaks actually works. I want to use a bitmask in my program to do something similar, but I don't really know how setting a bit in the mask makes an item in the structure valid. Is it simply a check (like an if statement or something) that Windows does? So for example if I set the LVIF_TEXT flag does Windows have a check something like
if (mask & LVIF_TEXT)
Thanks again.
- Aaron
|
|
|
|
|
You need to take a look at the logical bit operations in this article.
Look at the sections that deals with bitwise Masking:
Here[^]
I Dream of Absolute Zero
|
|
|
|
|
Yes thats exactly how it works.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Is there a way I can use the switch case statement to specify a range of numbers. ie
switch(val)
{
case 100 to 300:
break;
case 500 to 750:
break;
}
or equivalent to ON_COMMAND_EX_RANGE in MFC but the SDK version.
Thanks
|
|
|
|
|
no
you could:
switch(val)
{
case 100:
case 101:
case 102:
case 103:
...
case 300:
break;
case 500:
case 501:
case 502:
...
case 750:
break;
}
which could be prettied up by a #define
switch(val)
{
CASE_100_TO_300:
break;
CASE_500_TO_750:
break;
}
The maximum characters for the signature is five hundred. I was wondering how long a five hundred characters message would be, so I decided to make my signature 500 characters long. I'm sure if I had some cool html stuff in my signature, I could eat up five hundred characters, but just typing five hundred characters takes quite some time. The trick I think is finding something to say, but I'm usually a man of few words. So I guess I'll tell you what I've discovered is the secret to life. It
|
|
|
|
|
No, i would rather go for if statement.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
|
Ravi Bhavnani wrote:
Use Pascal instead.
That's usually a better choice in any case...
Will Build Nuclear Missile For Food - No Target Too Small
|
|
|
|
|
another trick might be:
switch (val<=300?1:(val<=750?2:3))
{
case 1:
break;
case 2:
break;
case 3:
break;
}
--
Joel Lucsy
|
|
|
|
|
oh, i don't think it really works...
the compiler might say that val<=300?1val<=750?2:3) is not a constant expression.... (i don't know why but... )
TOXCCT >>> GEII power
|
|
|
|
|
You're right, my mistake. But, you can do the calculation just before the switch and stuff it into a variable and it'll work just fine. I use this type of technique occasionally so I know it works.
--
Joel Lucsy
|
|
|
|
|
hi
I have created a application for supporting another application.
So before installing my program i want to check if the main application is installed. If so i will have to move certain files from my application folder to the main applications folder.
Could anyone tell me how to accomplish this using installshield.
Thanks in Advance
Shiraz
|
|
|
|
|
Try the forums on InstallShield's site. This forum is for Visual C++, a programming language. FYI, though, there are wizards in InstallShield Developer that help you accomplish this and plenty of documentation to explain the manual steps.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hello all I have normal images list that I use to display the CTreeCtrl item normal images
this is the way i set the images of the item.
<br />
m_NormalImageList.Create(IDB_BITMAP_NORMAL, 16, 6, RGB (255,255,255));<br />
smptree.SetImageList(&m_NormalImageList, TVSIL_NORMAL );<br />
<br />
treeStruct.item.pszText = nametoshow;
treeStruct.item.iImage = File_Or_Folder;
Parent= aTreeCtrl->InsertItem(&treeStruct);
they seem to works.. coz all the item has the right images as i wanted them to have.
but the problem is when you click on those images after display, the images are changing.
if you dont' click on the image, it stay the way it is.
for example, c:\tempfolder has the folder image, a.txt has file image, a.zip has zip file image but when I click on folder image which is c:\tempfolder, the image change from the folder to file, when you click again, it change file to zip file image, and you click one more time, it goes back to folder image.. like going entire IDB_BITMAP_NORMAL images list... and it is never stop changing if you dont' stop clicking on the images.
how can i prevent that effect? i want folder name to have always folder image, file name to have file image, zip file to have zip file image. diable to change image to image when you click on it.
thank you
|
|
|
|
|
There are two "normal" image indexes for each tree item: the normal-normal and the selected. Insert the following:
treeStruct.item.iSelectedImage = treeStruct.item.iImage;
|
|
|
|
|
Hey Guys
Does anyone know how i can get my software to put a drive icon in explorer and then when the user enters that drive it calls my software.
Peter
|
|
|
|
|
Sorry Guys completly pointless post i found michael's guide.
|
|
|
|
|
If you are reading my namespace extension article, keep in mind that a namespace isn't a drive. If you want an actual new drive letter, you'll need to write a device driver.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
Kosh reminded me of some of the prima-donna programmers I've worked with. Knew everything but when you asked them a question; never gave you a straight answer.
-- Michael P. Butler in the Lounge
|
|
|
|
|
I have an ansi c string, and I'd like to convert it to Unicode and stuff this into a std::basic_string<wchar_t>.
So, I thought I could do the following :
void transformAnsiToUnicode( const char* str, int stringLength, std::basic_string<wchar_t>& newStr )
int size = MultiByteToWideChar( CP_ACP, 0, str, stringLength, NULL, 0 );
newStr.resize( size );
int err = MultiByteToWideChar( CP_ACP, 0, str, stringLength, (wchar_t*)newStr.begin(), size );
if ( 0 == err ) {
err = GetLastError();
}
Now on VC6 this works perfectly (with either the default STL or with STL Port). On VC7 it bitches about
(wchar_t*)newStr.begin()
Is there away around this?
Is this even *legal* to do? Or do I have to allocate a new wchar_t buffer, use that with MultiByteToWideChar(), and then assign to the newStr variable, and then delete it?
Thanks
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|