|
there is some basic BMP reading code in our JpegFile[^] package. you could probably use it in VC5 without much difficulty.
|
|
|
|
|
Thanks for your reply
It is working now I used SHLoadDIBitmap()
hurrah...I have plenty of
time left.
|
|
|
|
|
Here I add a menu bar a menuitem.Now I want hide it accrodding according to a variable a .If a equals zero,then the menuitem is going to be hide,else just show it.
|
|
|
|
|
You can manipulate the menu in a handler for the WM_INITMENUPOPUP[^] message. In that handler, check your special conditions and add/remove/rename menu items as you please.
|
|
|
|
|
There is no hiding or showing a menu item.
You can add and remove them at your convenience.
Use InsertMenuItem to add a menu item and DeleteMenu to delete a menu item.
|
|
|
|
|
Hi all,
in dialog based application,i m using datetimepicker control.
using date in this format "01 Jan, 2011 10:05:06 AM"
i m using ParseDateTime to parse string of date time picker value in extern COleDateTime type variable.
when i m using English in regional settings its working fine.
but when i m using German in regional settings than parsedatetime function return false,so unable to complete the process.
please help me to resolve this.
if possible to explain me with example.
thanks in advance.
|
|
|
|
|
If you use the DTM_GETSYSTEMTIME [^] message, you should not need to do any parsing.
I must get a clever new signature for 2011.
|
|
|
|
|
hello guys... I was trying to start a process with appropriate argument (lets say Windows Media Player with path OR IE with URL). I have been looking but did not find anything useful. How can we do that? Also, if we can kill that process after specific time has elapsed.
|
|
|
|
|
|
To add some extra info to Cool_Devs answer, don't forget WaitForSingleObject is a blocking call... so make sure the thread you call it from is ok with being blocked... and USE A TIMEOUT! ...I've found so much code with no timeouts, that's asking for trouble!
|
|
|
|
|
The answer I gave here[^] uses ShellExecuteEx. It doesn't start with command line, but rather opens the document/avi/url directly by its associated program. Might be one approach.
|
|
|
|
|
Hi,
I wonder if there is a quick and easy way to change the height of a PopupMenu (i.e. so that each line in the menu has an increased vertical size), and also change the font size to use a bigger font.
Do you have any code samples that can do that? Unfortunately, CMenu does not have an appropriate member to set the font size, or am I missing something?
Thanks alot.
|
|
|
|
|
|
Thanks alot, I have found these, but they are mostly overdoing for my purpose. All I wanna do is change the font size, nothing more, so I had to remove 95% of the code. I was just wondering if there is some really simple way to achieve only the font size changing. Besides, my Menu has no mainwindow, it's just a popupmenu (CMenu::CreatePopupMenu). Most samples seem to require a mainwindow, however.
Is there really no simple example without all the fancy rest of XP-style menus?
|
|
|
|
|
I went through this msdn tutorial on Using Menus and i think owner drawn menus may be the only solution to customize menu in an application, though not sure.
|
|
|
|
|
Thanks, I have done that now. There still stays one big problem which I simply do not understand:
My menu is created using CreatePopupMenu, and it does not belong to a Main window. However, MFC always calls the MeasureItem overridable for my Mainwindow, which has a CMenu member, which is null, because the menu is not part of my mainwindow.
How can I achieve that the MeasureItem method of my subclassed menu is called directly, instead of the mainwindows Measureitem function?
|
|
|
|
|
Hi all,
i m using datatimepicker control to display date and time in this format
%d %b, %Y %I:%M:%S %p
using two date time control on a dialog and filter the list control records according to selected date.
its working fine when using on English(US).
but when i m change the regional language settings from control panel.
i m using this.
COleDateTime cdt1;
CString chk_dt1=cdt1.Format(_T("%d %b, %Y %I:%M:%S %p"));
cdt1.ParseDateTime(chk_dt1,0,LANG_USER_DEFAULT);
than it is not format the date time in above format show Invalid DateTime and not compare result.
please tell me how can i format date and user date time result in any language.
thanks in advance.
modified on Monday, March 14, 2011 4:19 AM
|
|
|
|
|
You didn't initialize cdt1. You need to use one of the COleDateTime constructors that initializes it, or use this:
cdt1 = COleDateTime::GetCurrentTime();
before calling cdt1.Format() .
|
|
|
|
|
i cant use this,
Hans Dietrich wrote: cdt1 = COleDateTime::GetCurrentTime();
coz its not confirm ,the date time control have current data time,
user can select any date time and i perform action according to selected dates.
when i debug the program i found problem arise on ParseDateTime.
|
|
|
|
|
Here is the code you posted:
COleDateTime cdt1;
CString chk_dt1=cdt1.Format(_T("%d %b, %Y %I:%M:%S %p"));
cdt1.ParseDateTime(chk_dt1,0,LANG_USER_DEFAULT); Please tell me where in this code you initialize cdt1 to some valid date value.
|
|
|
|
|
its actually this.
CString from_date,to_date;
GetDlgItemText(IDC_DATETIMEPICKER1,from_date);
GetDlgItemText(IDC_DATETIMEPICKER2,to_date);
cdt1.ParseDateTime(from_date,0,LANG_USER_DEFAULT);
cdt2.ParseDateTime(to_date,0,LANG_USER_DEFAULT);
CString chk_dt1=cdt1.Format(_T("%d %b, %Y %I:%M:%S %p"));
CString chk_dt2=cdt2.Format(_T("%d %b, %Y %I:%M:%S %p"));
cdt1.ParseDateTime(chk_dt1,0,LANG_USER_DEFAULT);
cdt2.ParseDateTime(chk_dt2,0,LANG_USER_DEFAULT);
|
|
|
|
|
A datetime picker holds a date/time value, not a string. Why on earth are you calling GetDlgItemText() on it and then parsing the outcome? Have a look here[^].
Don't use strings when there is a more appropriate type around.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
i just dont need to set text in edit control,
i have two date time picker and on button click event get date and time from these date time control and want to assign in other COleDateTime type variable.
please tell me how can i do this without ParseDateTime?
|
|
|
|
|
I just did tell you.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
please explain me with example,how can i put the selected date time control value in other COleDateTime type variable?
i have a dialog based Class A that is have ListCtrl,in ListCtrl i have some data and in this listctrl 3rd column of list have date and time details.
on button click of this dialog open a other dialog of Class B,that is have 2 DateTime Picker Control.
here i select different date and time in both date time control,than press ok and want to use these date time controls value to filter Class A list ctrl records.
please tell me how can i do this that is work for all regional language?
thanks in advance.
modified on Monday, March 14, 2011 7:30 AM
|
|
|
|