|
LoadImage() is suppoted for Windows CE but dous not support load from file (LR_LOADFROMFILE) I am afreid.
Thanks for your answer.
|
|
|
|
|
Does SHLoadDIBitmap[^] work maybe?
[MSDN RANT]Is it me or does MSDN confuse the hell out of one? If you check it here[^] it says:
lpszName
...
If the fuLoad parameter includes the LR_LOADFROMFILE value, lpszName is the name of the file that contains the image.
fuLoad
[in] Set to zero.
...
So basicly this says: if you use LR_LOADFROMFILE then you can load a bitmap from file, but wait, you can't because you have to specify 0 for fuLoad. Gee, thanks. [/MSDN RANT]
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<
|
|
|
|
|
Does SHLoadDIBitmap[^] work maybe?
No it does not work, but it compiled OK and the handle it returnes looks OK.
The LR_LOADFROMFILE is not supported for win CE and yes that MSDN article is confusing.
Thanks for your time.
|
|
|
|
|
If it compiles and gives you a good looking handle, what is wrong with it?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<
|
|
|
|
|
I did something wrong. Now it works
(the handle was invalid by the time I started using it).
Thanks a lot.
hurrah there was a real good answer Now I have plenty of
time left.
|
|
|
|
|
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.
|
|
|
|