|
Hi there ! I want to load a bitmap from inside my application in order to display it on a dialog box !
In "resource.h" file i wrote:
"#define IDB_BITMAP_SPLASH 500"
In "resource.rc" file i wrote:
"IDB_BITMAP_SPLASH BITMAP "SPLASH.BMP", where SPLASH.BMP is the name of my bitmap file.
In "main.cpp" file i wrote:
"HBITMAP hBitmap=(HBITMAP)LoadBitmap(hInst,MAKEINTRESOURCE(IDB_BITMAP_SPLASH));", where "hInst" is my application's instance handle.
The problem is that this function is returning NULL. I've also tried with "LoadImage()" and "LoadResource()" functions. None of them work ! I've tried instead of MAKEINTRESOURCE to simply write "Splash.bmp" as if i were loading it directly from the file. Does not work !
Can anyone help me ? I'm using Windows 2000 SP4 and i'm not writing this in MFC, but in simple Win32API.
ThankYou !!!
|
|
|
|
|
|
I use Bloodshed Dev-C++ IDE with MINGW compiler, so i don't have a resource editor !
|
|
|
|
|
ThEdreamMaker wrote:
"HBITMAP hBitmap=(HBITMAP)LoadBitmap(hInst,MAKEINTRESOURCE(IDB_BITMAP_SPLASH));", where "hInst" is my application's instance handle.
The problem is that this function is returning NULL
Have you checked GetLastError() ?
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
GetLastError() returns 1814, and FormatMessage() for this error number says: "The specified resource name cannot be found in the image file."
|
|
|
|
|
The problem was that hInst was NULL ! Thank you anyway !!!!!!!
http://gxsoftware.idilis.ro
|
|
|
|
|
Hi !
We Need a custom activex control so we are looking for a programmer
any one having experience in developing activex control should email us for further details
email : asim.khan007@gmail.com
Thanks
|
|
|
|
|
And what's in it for us?
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Bob Stanneveld wrote:
And what's in it for us?
I Believe , MONEY
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Isn't the collaboration / testing forum introduced for that?
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Is there someone know the windows nt timestamp format?I want to write code to convert the date/time(yy::mm::dd/hh::mm::ss) into windows nt timestamp format.Who can tell me something about windows nt timestamp format?
Thanks!
|
|
|
|
|
What timestamp format are you talking about?
Don't try it, just do it!
|
|
|
|
|
I understood yesterday.Thank you!
|
|
|
|
|
CTime::GetTime might give you what you want.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
No,It can't.You don't understand me.
Now ,I understand.
Ask you a question.
What's the meaning of 'splode'?
|
|
|
|
|
How about clarifying your original post, and elaborating on the solution you came up with instead of leaving us all in the dark? Maybe it'll help someone in the future.
If CP forums contained nothing but posts similar to yours, it would become absolutely useless. Share the knowledge!
|
|
|
|
|
I'm wondering if the less value 'n' get, the less time tooltip appears needed?
CTooltipCtrl::SetDelayTime(n);
...always look on the <blink>bright
side of life...
(Whistle)
|
|
|
|
|
Per MSDN:
Call this function to set the delay time for a tool tip control. The delay time is the length of time the cursor must remain on a tool before the tool tip window appears. The default delay time is 500 milliseconds.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I want to seperate a video file (mpeg2) into three different files. The content of the first file should be I-Frames, P-Frames in the second file and B-Frames in the third frame. In the next step the three files should be manipulated and merged into one file again. The idea is to simulate a air-interface.
My problem is still to seperate a file into three single files.
I hope someone has an idea.
If there is a C-Code available it would help a lot.
Armin Schlögl
|
|
|
|
|
hey...
My application draws a plots data given at run-time ...but having problem in properly scaling time(in seconds) along x-axis
|
|
|
|
|
You have to provide more details[^] in order to expect any valuable answer...
|
|
|
|
|
Hello.
I need to set an [ExgangeServer] and a [User] to MAPI Profile.
I do it like this:
MAPIAdminProfiles(0L, &pProfAdmin);<br />
pProfAdmin -> AdminServices(m_ProfileName, "", 0L, 0L, &lpSvcAdmin );<br />
pSvcAdmin->CreateMsgService("MSEMS", "Microsoft Exchange", 0L, 0L);<br />
pSvcAdmin->GetMsgServiceTable(0L, &pMsgSvcTable);<br />
...<br />
HrQueryAllRows(pMsgSvcTable, (LPSPropTagArray)&sptCols, &sres, NULL, 0, &pRows);<br />
....<br />
<br />
SPropValue rgval[2];<br />
rgval[0].ulPropTag = PR_PROFILE_UNRESOLVED_NAME;<br />
rgval[0].Value.lpszA = m_User;<br />
rgval[1].ulPropTag = PR_PROFILE_UNRESOLVED_SERVER;<br />
rgval[1].Value.lpszA = m_ExchangeServer; <br />
<br />
hr = pSvcAdmin->ConfigureMsgService(<br />
(LPMAPIUID)pRows->aRow->lpProps[iSvcUID].Value.bin.lpb, 0, 0, 2, rgval);
As it has been described in the article: http://support.microsoft.com/kb/q170225
The ulFlags parameter I set to the value 0 (!) to prevent any popup dialogs.
But anyway every time when I try to set different Exchange Server from another active directory, the
Authentication popup dialog appears. And User needs to type here the <domain>\<username> and <password>.
The question is:
How to prevent such a dialog to appear?
How is it possible to pass all the data (like this [domain]\[username] and [password]) by code in order to prevent the dialog to pop-up?
|
|
|
|
|
Hi all,
Iam changing the backGround colour of a bitmap. When I go to the "ResourceView" of my visual studio editor,Click on the bitmap,The bitmap is displayed. I wanted to add a new custom colour as the "colors" toolbar doesn't contain any colour,of interest to me.
so I go to the "Image" menu & call "AdjustColours" to add my new custom colour.Using this colour I change the background of my bitmap & the colour is changed.
Now When I run my application the customcolour which I added is not displayed in the bitmap as background.
Iam using this bitmap as an image in my CTreeCtrl,which is created at runtime.
I have my CTreeclass: public CTreeCtrl
In the OnInitDialog,I do as follows:
m_ImageList.Create(IDB_MRO_IMAGELIST, 16, 1, RGB(255, 255, 255)))
m_wndTree.SetImageList(&m_ImageList, TVSIL_NORMAL);
//m_wndTree is my class derived from CtreeCtrl
Thanks...
|
|
|
|
|
Did you load correct palette before you started adjusting color?
If not load pallete. Menu/Image/Load palette. You need to find file *.pal which has 256 color. After you load it you will see all 256 color. The rest you doing correct. VS6 may not show all 256 colors but I am no sure.
sorry if misslead you.
|
|
|
|
|
Thanks for the reply
From where Can I load the *.pal palette(Which one & from where)
|
|
|
|