|
|
Hi all,
I'm writing program in Dialog-based mode !
I have a toolbar on that, i wanna set Tooltip for all button !
I tried CBRS_TOOLTIPS flag in SetBarStyle function,
But i don't know how can i set tooltip !
Please help me
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Check the DLGCBR32 sample that comes with VC6. And please stop using exclamation marks at the end of every sentence.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks Tomasz,
Your help was very useful !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I would disable Help button on the "Customize Toolbar" dialog box
but I wan't use the caption of the control for a code independent of the language.
Thank you for your collaboration.
|
|
|
|
|
Hi!
Question: can I programmaticaly install the driver (printer driver, to be more specific), and if I can - then how? Do I need for this to deal with DDK? I'd never touched it before.
I cannot find something useful in the MSDN.
I mean conventional install, not hacking the registry.
Thanks in advance.
Regards,
Gennady
|
|
|
|
|
Which printer driver? I tend to just call the drivers own setup program from my setup. If it is a third party driver and not one of your own, using their installer is a lot easier.
Have you looked at AddPrinterDriver and AddPrinterDriverEx?
Michael
|
|
|
|
|
Thanks, Michael!
AddPrinterDriver is exactly what I looked for. Cannot understand, how I missed it !?
Thanks once more.
Regards,
Gennady
|
|
|
|
|
- I want to implement such function:
- When I press an "Enter" key, the program stops immediately and a messagebox occurs. When I press any other key (after closing the messagebox), the program goes on.
- Can you give me a sample code?
- Regards,
Maer
|
|
|
|
|
Is this an MFC application. Does the GUI have any controls on it such as edit controls. Look at WM_KEYDOWN for catching the Enter key.
Michael
|
|
|
|
|
May I add the avi to the resource file my project? If yes, then how?
Best regards,
|
|
|
|
|
Yep,
Just select Insert->Resource (or Ctrl-R), press the Import... button, change the "Files of type" field on the file dialog to All Files, and select your .avi file. When it gets imported, you need to give it a custom resource type, which will just be a string (for example, "AVI"). Then, when you want to load the resource in your program, you need to use this string as a parameter to the FindResource function:
HRSRC vhMyAvi = FindResource(vhMyModuleHandle, MAKEINTRESOURCE(IDR_MY_AVI_RESOURCE), _T("AVI"));
Hope this helps.
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
I have syntax color problem.
Can i use two different color for user define data types.
--------------------------------------------------
Say Whatever You Know.
Helping other people is good for health.
=========
Manish
=========
---------------------------------------------------
|
|
|
|
|
if I want the user to input a integer, how can I check to make sure they don't enter a letter, and then if they do enter a letter, to be able to ask that question again?
|
|
|
|
|
Check the 'number' box for your edit box in the dialog template. You *can* also use DDX, where you set the variable associated with the dialog to an int, and specify a range, but I prefer to catch changes in the edit box and handle it myself, as the default method is too obtrusive and annoying.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
I agree with Christian, catching these yourself can be much neater and you can then handle the input error in a way that doesn't inhibit the flow of the user.
If your an operater typing 10 million numbers in a day you don't want a windows messagebox every time you press a wrong key, but you don't want to be allowed to type on if you have entered 'obviously' invalid data.
It depends on whether you only respond to a whole entry (by responding to the enter key) or partial entries (each change in the data entry), as to which windows message you respond to.
On a key by key basis you may check OnChange(), I'm assuming an editbox here.
OnChange()
{
//receive the string as its default type (string)
//use which ever convertion function your data needs
//or simply scan the string to ensure only your required range
//is included.
//on error, beep or move the user to the error -- basically whatever
//your program/user situation requires.
}
I use the beep/move back to error often because I find it is what data entry people want. Put your error checking in a seperate thread and the faster users can work uninhibited until an error.
We do it for the joy of seeing the users struggle.
|
|
|
|
|
Anyone have any ideas how to convert the date such as
January 1st is 1, january 23 is 23 etc. And this must go back the other way. Any ideas would help.
|
|
|
|
|
Just grab the number ? Or do you mean Feb 1 = 32 ?
Is this your homework ?
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Christian Graus wrote:
Is this your homework ?
Now, that's almost an automatic question to such posts eh?
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Christian Graus wrote:
Is this your homework ?
Nish [BusterBoy] wrote:
Now, that's almost an automatic question to such posts eh?
Whenever someone asks for something that's really easy and seems like it might be divorced from the real world, yeah. I don't mind if people ask homework questions, except when they ask for a pat solution. In this case I wasn't sure if it was homework or if so, if the person was asking for a complete solution ( which is bad ), or was stuck on one bit ( which is fine ). I had envisaged a homework question where you parse the month name to add a number of days and then add the number of days into that month, or get the values out of an array. It seemed a likely homework question.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Convert the date to COleDateTime , and you can get the day number with the COleDateTime::GetDayOfYear() function.
|
|
|
|
|
Hello,
I'm very new to using dc and CBrush.. Basicly I have the following code in my app to custom draw the header of my list control.. I have every thing working except for that I want to change the "COLOR_3DFACE" to a RGB color. How would I go about doing this?
dc.FillRect(rcLabel, &CBrush(::GetSysColor(COLOR_3DFACE)));
Thanks,
Rob
|
|
|
|
|
FillSolidRect allows you to specify a color directly. A color is a DWORD is stored generally using COLORREF, which again is a typedef for DWORD. To declare a COLORREF use RGB, as in COLORREF c = RGB(255,0,255);
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Hello,
I would like to use wildcards with the DeleteFile() function, but I've been unsuccessful so far when using the '*' character. Does anyone know of a better function to use?
Better yet, does anyone know how to use a RemoveDirectory() function that doesn't require the directory be empty first?
-Pete
|
|
|
|
|