|
Stephen Hewitt wrote: What gives you this idea? It's far from obsolete. It's intended for "use by private window classes" where as WM_APP is "available for use by applications".
right you say, but the guy who posted the original question is intended to use it for Inter process communication!
"If it were machines, the pair_programming seem to work, but for humans it is pair_crackdown that seems to work! " - Nisamudheen
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
All this discussion on WM_USER/WM_APP is great, but what about the
reason it works in debug build but not in release build?
What's up with that?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: All this discussion on WM_USER/WM_APP is great, but what about the
reason it works in debug build but not in release build?
generally main question lost between secondary question
"If it were machines, the pair_programming seem to work, but for humans it is pair_crackdown that seems to work! " - Nisamudheen
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hello all,
I have made a dialog based application and i want to provide its title text at runtime i.e (when i click on exe then it should read a text file and should get dialog box title value)......
Can anybody please help me in doing this....
Thanks in advance....
|
|
|
|
|
|
SetWindowText("The_Title_String"); if you are using MFC.
Maxwell Chen
|
|
|
|
|
SetWindowText() also works without MFC.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: SetWindowText() also works without MFC.
I did not write the handle argument hWnd .
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: did not write the handle argument hWnd.
might be it's CWnd::SetWindowText
"If it were machines, the pair_programming seem to work, but for humans it is pair_crackdown that seems to work! " - Nisamudheen
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi,
I have an Application which supports multiple languages. I want to print the time as the footer string of a page( in AM/PM format).
On English OS(WinXP) this is printing fine but when I am using French OS, the AM/PM information is not being displayed in the footer. Please help me in this regard.
Also, I am using the GetTimeFormat() to set the time format. What should I do?
Thanks and Regards,
Purusottam Mishra
Purusottam Mishra
Software Engineer
|
|
|
|
|
Raj-Ekoham DwitiyoNasti wrote: I have an Application which supports multiple languages. I want to print the time as the footer string of a page( in AM/PM format).
Isn't that blatant ignorance of user will? A usability horror?
But OK.
Which locale and/or lpFormat are you feeding into GetTimeFormat ?
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Raj-Ekoham DwitiyoNasti wrote: Also, I am using the GetTimeFormat() to set the time format. What should I do?
You should be looking at the string that GetTimeFormat() is formatting. Forgo the printing and footer stuff until that is right.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi Exprts,
I am so curious to get the link file path but I could not. I am creating a shell context menu. As I click on link file(shortcut) Program resolve the name before the InvokeCommand() function. But in QueryContextMenu() I can detect the link file type through flag CMF_VERBSONLY but I could not get the link file path.
How can I do this?
|
|
|
|
|
hi everyone,
good afternoon to all.i am facing problem in adding the picture in the form. in my form i added one picture box i set the properties like bitmap but in image box i have to set the path.if i am giving path like E:\savitri like this it is giving error like illligal characters so please enter correct path. please tell me how can i add a picture in the form.picture means i want to browse from different dirctories and add to picture box please help me.
THANKU IN ADVANCE,
savitri
|
|
|
|
|
Are you using WinForms, then right click on the picture box and select choose Image option. And posting to WF message board will help more.
And from the Déjà vu experience, I think you are using VC++/MFC and assuming you are refering picture Box for picture control, you mentioned you set the type of picture control to bitmap and in the image field you need to set the ID of the bitmap resource. for that add the bitmap to the resource and change the ID if needed, use that ID in the Image option box. The path cannot be used directly.
|
|
|
|
|
Rajkumar R wrote: And from the Déjà vu experience, I think you are using VC++/MFC
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hi all,
I am using below code..
CString lpImagePath;
lpImagePath="D:\\Program Files\\TabTab\\TabTab\\Images\\home_32bit.ico";
UINT colormap = LR_DEFAULTSIZE |LR_LOADMAP3DCOLORS| LR_LOADFROMFILE | LR_CREATEDIBSECTION|LR_LOADTRANSPARENT;
HBITMAP hBitmap =(HBITMAP)::LoadImage ((HINSTANCE)::GetModuleHandle(NULL),lpImagePath,IMAGE_BITMAP,0,0,colormap);
I am getting null in hBitmap if I am loading an icon file with Bit Depth=32.
LoadImage is working fine for all .ico file with Bit Depth upto 24 only.
But I dont know why it is not working for icon file with Bit Depth=32.
Please help me..
|
|
|
|
|
Does GetLastError() give you any clue to the reason LoadImage() fails?
Can you really load icons using IMAGE_BITMAP?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Could you please check the error code by calling GetLastError
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Rahul Vaishnav wrote: I am getting null in hBitmap if I am loading an icon file with Bit Depth=32.
So what does GetLastError() return?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks for reply to you all...
I am not getting any error here.
the thing is I want to add that hbitmap in my ImageList.
like
HBITMAP hBitmap =(HBITMAP)::LoadImage ((HINSTANCE)::GetModuleHandle(NULL),lpImagePath,IMAGE_BITMAP,0,0,colormap);
nBmpIndex = ImageList_Add(m_hImageList, hBitmap,0);
so now I have solved that problem .
I am using below code now..
HICON hicon =(HICON)::LoadImage ((HINSTANCE)::GetModuleHandle(NULL),lpImagePath,IMAGE_ICON,0,0,colormap);
nBmpIndex = ImageList_AddIcon(m_hImageList,hicon);
it is workin fine...now I can add Icon with 32 bit Depth in my image list.
I observed one more thing that IMAGE_BITMAP works for icons also...but for icons with Bit Depth 24 only.
Thank you...
|
|
|
|
|
|
Man, I wish I had homework this easy...
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I think you must write your program and then aks the specific question.
|
|
|
|
|
All the answers you need are here[^]. Specifically the bit about buying a book and working through it.
This is so easy, if you can't work it out, you probably should talk to your teacher or consider dropping out. Either way, we don't do your homework here, we help you when you've tried to do it yourself.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|