|
Thanks for the responses guys, especially for the Grid control link (Jon) cos its pretty much what I need (i need a simplified version, but I`ll just cut it down to that). I didn`t think you could have the ranges in a switch statement (since there are no books that describe how to) so thanks to both Alvaro and Jon for reaffirming my doubts. Oh and thanks to Chris Mauder for actually producing the Grid Control and making it freely available.
Cheers guys,
Alan.
"When I left you I was but the learner, now I am the Master" - Darth Vader
|
|
|
|
|
- Yes, if you use Pascal instead of C/C++ . (Silly answer).
- You can also use GetWindowPlacement() for the general case, but IsZoomed() as pointed out earlier, is definitely easier.
- In general, you need to override the control's WM_PAINT handler to "do the right thing", i.e. display the numbers in an appropriate format. You can use Chris' grid control, but if you want your class to be lightweight, you'll probably want to just override OnPaint().
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
In response to your answers :
1. Yep, thats why I asked if you could do it in C++.
2. Its definately the easiest function, and the most appropriate for what I want.
3. I am seriously thinking of doing your OnPaint overriding advice, cos I've had a look at Chris's non-MFC code, and I must be honest, I`m struggling to understand it.
Thanks for your response though,
Alan.
"When I left you I was but the learner, now I am the Master" - Darth Vader
|
|
|
|
|
HI, All!!!
=======
MyApp.exe arg1 arg2 arg3
To get those arguments in a console application we do it like this:
void main (int x, char ** y)
{
... y[1] ...
... y[2] ...
... y[3] ...
}
How do we do it in MFC basedialog application ???
Thanks.
BTW: come to #CodeProject on DalNet (mIRC)
|
|
|
|
|
Have a look at CWinApp::ParseCommandLine in MSDN.
Michael
|
|
|
|
|
You can use ParseCommandLine like Michael mentioned or the __argc and __argv macros.
Regards,
Alvaro
|
|
|
|
|
I have used GetCommandLine() to do that, but it may not be exactly what you are looking for..
It maybe another option
Rob
|
|
|
|
|
Do you know how can i have my resources (ex. a Button in a dialog box) in a language such as Greek which needs Unicode?
I want to have buttons in Greek
|
|
|
|
|
Hi,
How do I pass on a variable argument list to another function?
E.g. In the example below I want to pass the variable argument list passed through to PrintOutput() onto fprintf.
PrintOutput(char * format, ...)
{
//I want to pass variable list through to fprintf????
fprintf(stderr, format, ...); //This does not work as it is???????
}
Thanks in advance
Neil
|
|
|
|
|
Here's an example from the MFC CString class.
void AFX_CDECL CString::Format(LPCTSTR lpszFormat, ...)
{
ASSERT(AfxIsValidString(lpszFormat));
va_list argList;
va_start(argList, lpszFormat);
FormatV(lpszFormat, argList);
va_end(argList);
}
look up va_list and va_arg in MSDN for more info.
Hope this helps,
Bill
|
|
|
|
|
hi guys,
i'd like to know how to display a static text in bold (italic, etc.) and also how to change its colour, is it possible ?
thanks to you
Fred
|
|
|
|
|
|
thanks Michael, that looks exactly what i want to do.
see you.
|
|
|
|
|
Hi!
I have got a subclassed CEdit control. When trying to scroll to the last line nothing happens. Also, when inserting text with SetWindowText I get an extra linebreak at the top of the Edit box. Anyone got an idea?
Cheers,
/Fredrik
|
|
|
|
|
Generally, if you visit to website, the site's information is saved in cookies.
now, I have many buttons.
When each button click, my computer call IE window.
I want to give a indication in saved cookie.
The indication is a meaning to come from my computer.
how to?--;
please give a courage.
|
|
|
|
|
To send cookies, you need to add them to the header of your http request. I got this from MSDN:
Cookie Header
The Cookie header is included with any http requests that have a cookie whose domain and path match the request. The Cookie header has the following format:
Cookie: <name>=<value> [;<name>=<value>]...
One or more string sequences, using the format <name><value>, contain the information that was set in the cookie.
You would use it like this:
header = "Cookie: Button1:state1;Button:state2";
then include the header in your Navigate call.
Thanks for the help,
Bill
|
|
|
|
|
To send cookies, you need to add them to the header of your http request. I got this from MSDN:
Cookie Header
The Cookie header is included with any http requests that have a cookie whose domain and path match the request. The Cookie header has the following format:
Cookie: <name>=<value> [;<name>=<value>]...
One or more string sequences, using the format <name><value>, contain the information that was set in the cookie.
You would use it like this:
header = "Cookie: Button1:state1;Button:state2";
then include the header in your Navigate call.
Hope this helps,
Bill
|
|
|
|
|
i have got two scrollviews on my dialog. (used them as two scrollcontrols.. but don't mind that..)
the fact is that they are both intended to work together -> the one shows the headlines, the other one shows the data (something like a report generator).
My question now was how to link these two scrollviews, that the user can scroll either of them, and the other one would scroll too...
another question would be (but this is not really important) how to hide the scrollbar of the upper scrollview..
is there anybody having an approach for this ?
thank in advance and have a nice day
Bernhard
"There are three roads to ruin: women, gambling and technicians. The most pleasant is with women, the quickest is with gambling, but the surest is with technicians." Georges Pompidou
|
|
|
|
|
PROBLEM
--------
Actually i want to change the Layout of Dialog at run time, so i call CWnd::ModifyStyleEx(0,WS_EX_LAYOUTRTL);
It changes the tiltle and System Menu location from right to left.but it did not change the location of other controls lying on the dialog, eg Button, ComboBox, etc. if i set the "Right to left layout (More Extended Style)at design time, then it changes the layout of all other controls lying on dialog automatically" so would u tell me where is the problem.
Explanation
-----------
if i fix the property at design time (More Extended Style) "Right to lfet layout" then it works fine, it changes the layout of all controls, even CTreeCtrl, but if i chnage this property at run time by calling CWnd::ModifyStyleEx(0,WS_EX_LAYOUTRTL);then it changes only title bar and no effect on other controls.
Have a nice wishes for multilingual guru
|
|
|
|
|
Surely the answer to this is to convert your code to Unicode !!
This support Multi-Languages, All you need to do then is to use different resource for each Language.
|
|
|
|
|
I want to but a bmp on the background
|
|
|
|
|
ListView_SetBkImage
--Mike--
http://home.inreach.com/mdunn/
While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate.
your with and
Sonork - 100.10414 AcidHelm
|
|
|
|
|
Hello,
I am new to database programming (actually, I am not started yet).
I am recording some data in real-time (voice). Now I need to allow the user for searching for some data given a specific time.
I was told that I should consider using SQL, or DAO or ODBC.
I have no clue what the best thing to use is. So I am looking for some information.
Any suggestion will be largely appreciated.
Thanks a lot.
Where there is a WISH, there is a WILL.
|
|
|
|
|
This isn't a complete solution, but should help you get started.
1. First you need establish the database requirements. e.g. exactly what do you need to store, search, retrieve from your DB. How big are the images, how many, etc.
2. With that in hand, select a database engine. There are many, each has its own strengths, weaknesses and costs. Oracle and SQL server are enterprise databases. They are beefy and very capabley (expensive). Access is good for smaller or simpliler applications. May others also exist.
3. Create the actual database schema (you don't need to populate it, just define it).
4. Finally ready to start designing/coding the app. At this point you can select accessing technologies. The main ones available are ODBC, DAO, ADO. ADO is the current favorite.
If this is a significant application, you may want to consult a DB expert to help you design your database and select a db engine.
Hope this helps,
Bill
|
|
|
|
|
>This isn't a complete solution, but should help you get started.
Ok. Let's see ...
>1. First you need establish the database requirements. e.g. exactly what do you need to store, search, retrieve from your DB. How big are the images, how many, etc.
I need to store sound files (wav, ...) with a date and time associated to every piece of data that represent 1 seconde of sound.
The user can then search for a sound that have been recorded at a specific time.
The program records continuously ... so I have a very large quantity of informations.
>2. With that in hand, select a database engine. There are many, each has its own strengths, weaknesses and costs. Oracle and SQL server are enterprise databases. They are beefy and very capabley (expensive). Access is good for smaller or simpliler applications. May others also exist.
I'm thinking about SQL servers. It sounds that it is more portable and robust. And once you know how it works, you have no problem
switching to another one.
QUESTION: Are these free? or do I have to by something?
>3. Create the actual database schema (you don't need to populate it, just define it).
Ok.
>4. Finally ready to start designing/coding the app. At this point you can select accessing technologies. The main ones available are ODBC, DAO, ADO. ADO is the current favorite.
I read a little about these technologies. I am more thinking about using ODBC. It sounds that I is faster than DAO (if I don't use Access database).
Also, my database will be on a remote computer. I read that ODBC is more efficient in this case.
>If this is a significant application, you may want to consult a DB expert to help you design your database and select a db engine.
This really is a significant application. I am used to get things done by reading, asking questions, prototyping, ...
Do you think that these are things we can't learn on the fly ?
>Hope this helps,
>Bill
This helped a lot.
Thank you very much.
Where there is a WISH, there is a WILL.
|
|
|
|
|