|
I just noticed a mistake as soon as I posted:
Between steps 5 and 6 I call SetProcessWindowStation()
with the handle returned by OpenWindowStation().
Spike McFarland
|
|
|
|
|
hai,
If I want to create my own message box in my application instead of using MessageBox(), how do I do that .Do I have to create another dialog with a statictext and change its text each time? Is there any easy way to do it?
Thanks a lot in advance.
|
|
|
|
|
magee81 wrote:
If I want to create my own message box in my application instead of using MessageBox(), how do I do that .Do I have to create another dialog with a statictext and change its text each time?
Yes, that's the general recipe.
magee81 wrote:
Is there any easy way to do it?
That's about as easy as it gets.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
|
Hi, i want to split a line from a text file which i don't know it's length just i know that line has this format:
Welcom:2004-9-5:4 :1:23
but the numbers can be one digit or 2 and that is why i don't know the length. i will just parse line and will read it.
will appreciate any help, specially with few lines of code
really thank you
|
|
|
|
|
One way is with AfxExtractSubString() . Another is with strtok() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
thanks but can you explain more (alittle bit )
really thank you
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_strtok.2c_.wcstok.2c_._mbstok.asp
http://support.microsoft.com/default.aspx?scid=kb;en-us;200421
http://www.codeproject.com/string/split_cstring.asp?df=100&forumid=14815&exp=0&select=442099
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
thank you for information but my problem is that i have the file with more than 100 lines and i have to read and seprate each line with delim.
I can read each line and save it in string ptr but how to check it with a char ",".
really thank you
|
|
|
|
|
Oriocat wrote:
...but my problem is that i have the file with more than 100 lines...
It matters not if you are processing 10 lines or 10,000 lines, both of the functions I suggested can be used. After each line is read, simply call one of the functions the appropriate number of times.
BTW, is this an MFC application?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
VC++.net
then if my line is pointer of string still those functions will work?
really thank you
|
|
|
|
|
Oriocat wrote:
VC++.net
Which has no bearing on whether it is an MFC application or not. If it is, AfxExtractSubString() can be used, whereas strtok() cna be used in either case.
Oriocat wrote:
then if my line is pointer of string still those functions will work?
That depends on what "pointer of string" is.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
what i have for getting the line is:
StreamReader* sr = new StreamReader("file.txt");
String *L = ""; //for putting each line on it
L = sr->ReadLine();
// and then i will use ArrayList to save each line
// with while loop i read line by line
now my question is how should i use L in that function?
thank you
|
|
|
|
|
I've not ever used a String object, but a cursory glance shows me it has no methods for accessing the internal object (much like the LPCTSTR operator of CString ).
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
String *L = ""; //for putting each line on it
what data type is String?
you are creating a pointer to an object and assigning it a value. I dont think this will work. Mabey it should be like this
String L = "";
if this data type is really stl::string then you can call c_str() to get a const char ptr and pass that to strtok
|
|
|
|
|
i created a doc/view app without using the wizard.the problem i am having is that the child windows don't display any title at all. the shared resource string is ok - i substituted it in a Wizard generated app. and it works fine there. my app handles ID_FILE_NEW and brings up a dialog on ID_FILE_OPEN.
do i have to include/or override something that i am overlooking ?
thanks
|
|
|
|
|
Hello...I'm a newbie in c++ win32 programming. I'm trying to create a bitmapped button in my dialog. The bitmap is already in my resource and I have checked the enable bitmap under the properties of the button.
What do i do next?
Pls help! thanks!
|
|
|
|
|
See if either of these two links are of any help:
http://flounder.com/bitmapbutton.htm
http://www.codeproject.com/buttonctrl/
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Here u go,
HANDLE hCalBmp = LoadBitmap( hInst , MAKEINTRESOURCE(IDB_BITMAP) ) ;
SendMessage( GetDlgItem( hDlg, IDC_CALIBRATE ), BM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)hCalBmp ) ;
Try this in INITDIALOG.
Hope this helps.
|
|
|
|
|
I have a Windows 2003 Server (Standard) and Visual Studio 6.0 with Service Pack 6 installed.
I try to work on a MFC project, but every 15 minutes or so I get an error message box "MSDEV.EXE could not locate \device\harddisk\0" and the MSDEV is locked up
I can bring up task manager and kill the process, but this is affecting productivity
My hard drives are letered F: and G: instead of the traditional C: and D:
Is this the problem? Has anyone else seen this and worked around it?
Is it a 'tightened' security issue?
I am logged in as a member of the local administrators group.
I am pretty sure I installed the Visual Studio while logged in under this development account as well.
Thanks for any ideas
|
|
|
|
|
I had made ocx control in MFC which contain stock proerty page (color and font). My problem is to move system color combo box of color property page to other place in same page. how i can do this
suggest me
Thanks in advance
Ajit Pratap Singh
|
|
|
|
|
Hi,
I'm working on an installer file. I want it install (among other things) some drivers for a usb device i have. The driver consists of three files: zanthic_c4u_W2K.inf, ezusb.sys, C4ULoad1W2K.sys. I can get the windows to load the drivers correctly, but only if I manually specify where each file is when windows discovers the device. I want the device to simply install "no questions asked". I found that the .sys files end up in c:\windows\system32\drivers and the .inf files end up in c:\windows\inf when I install the hardware by hand, but if I set my installer to copy the files to these directories, windows says "i can't find them, please tell me where they are". Can anyone tell me where/how I should put these files to let windows plug n' play auto locate them?
Joel Holdsworth
|
|
|
|
|
It depends. If you are using Windows 2000 or XP, and your driver is certified, you can do it this way.
Copy all the files into a semi-permenant area on the hard drive, such as Program Files\yourProgram\Drivers. Make sure the directory structure you create matches exactly what your INF says (typically, all files are in the same dir as the INF.)
Then call SetupCopyOemInf for your INF, and give it the path on the hard drive.
If you are not certified, you cannot get around the uncertified driver warning screen, unless you inform your users to go into their system settings and disable checking for certified drivers.
If you are dealing with Windows 98/Me, then I pity you.
"Fish and guests stink in three days." - Benjamin Franlkin
|
|
|
|
|
Hmm ok, that makes sense, but I'm having problems because I'm using inno setup which doesn't appear to have direct support for this - I can only really get at the command line, unless I start making mini installers to do the job. Is there any way of doing it simply through the command line?
Joel Holdsworth
|
|
|
|