|
Your code is not even trying to display an image, and it will leak resources.
1) Load bitmap image:
HBITMAP image = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_BITMAP2));
2) Select bitmap into DC. ( See SelectObject() )
3) Bit-blit bitmap it hdc. ( See BitBlt() )
4) Select previous bitmap into DC. ( See SelectObject() )
5) Delete bitmap. ( DeleteObject() )
INTP
Every thing is relative...
|
|
|
|
|
Hello Friends,
Please help me..
How can I get the relative path for a folder? Is there a function in vb,vb.net,c#,java,c or C++ which generates the relative path depending on two input-paths, like:
RelativePath = GetRelativePath(strSelectedFolder, strBaseFolder)
Or anybody have expert-exchange login then do login for me and get the solution from there:
https://secure.experts-exchange.com/register.jsp?query=relative+path&clearTAFilter=true&srid=ANaQRBFkNu6qNzcPciZwgw%3D%3D&redirectURL=%2Fsearch.jsp%3Fquery%3Drelative%2Bpath%26clearTAFilter%3Dtrue%26rsid%3D10%26begin%3D11&rsid=10
Waiting for your valuable reply.
Sachin Gedam
(Software Engg.)
Pune India
|
|
|
|
|
Hi Sachin,
check out this nice CodeProject article here[^]
The described class can everything you want. Especially check the section Relative path methods .
Regards, mykel
If they give you lined paper, write the other way!
|
|
|
|
|
Dear Mykel,
Thanks for your kind reply.
I got one more and effective solution which is exactly feet to my requirement.
http://www.freevbcode.com/ShowCode.asp?ID=968
Thanks for your help.
~Sachin
Sachin Gedam
(Software Engg.)
Pune India
|
|
|
|
|
Hi,
Try CPath ATL Class.
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Sachin Gedam wrote: How can I get the relative path for a folder?
Use PathRelativePathTo() .
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi all
How to create a window whose width and height are
exactly 5 inches(in physical mesurement), the size should
be the same irrespective of monitor resolution.
thanks and regards
pradish
|
|
|
|
|
What If the user changes the resolution after the program is initialized? I do not know if there's a remedy for this. However, while your program initializes, you could try reading the resolution and create a window then. You need to calculate the transformation co-ordinates according to every resolution scheme available. I think it might be a teadious job. What if the user uses custom DPI?
But don't worry, Microsoft has answered your question in the KB. LOL.
this[^] must help you.
Best Regards,
Rajesh R. Subramanian.
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
Hi
Thanks for replying
your link i went through was very informative.
thanks again,
regards
pradish
|
|
|
|
|
How to make a toolbar ctrl undockable in a dialog?
It's better if the toolbar is also resizable.
-- modified at 0:34 Tuesday 13th December, 2005
|
|
|
|
|
LoadLibrary of my DLL fails in Windows 2000 with error 127(The specified procedure could not be found.). Dependency walker showed that _vsnwprintf is missing in ntdll.dll on windows 2000. Google search suggested that I use StringCchVPrintfW instead and link to strsafe.lib statically. But I see that strsafe library inturn uses _vsnwprintf to implement StringCchVPrintfW.
Anyone knows what can be done at this point to resolve the problem of using _vsnwprintf on Windows 2000?
thanks!
|
|
|
|
|
I think it is in MSVCRT.DLL
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hello everyone!
Does anyone know how to use gotoxy() functions and such? I tried downloading a code for a game, but it'll give me errors when trying it on GCC! I tried making my own game with these functions, but it still tells me it doesn't exist... I don't want to use Windows-only console functions, I know how to use those, but I want to be cross-platform... Thanks!
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
|
just for the correction :
conio.h exists on Microsoft plateform, but not gotoxy() which is - as you said - implemented by borland...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
Kixdemp wrote: Does anyone know how to use gotoxy() functions and such?
Use SetConsoleCursorPosition() instead.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi,
if you are doing it on linux use the "curses.h" and you need to go to the screen mode from the text mode and execute in that mode ,but remember when you come out of it set it back to text mode ,posibly thats what they also do in game programming .
Regards
Farpointer
-- modified at 13:21 Tuesday 13th December, 2005
|
|
|
|
|
|
Is there a way to enumerate all of the DLL's that are loaded by an executable? I have an executable that loads a DLL that I wrote and I want to get a resource from within that DLL. Just like the 'Dependency Walker' that came with MSVC++6 does...
When I use LoadLibrary() on the executable file itself, it can't find the resource, nor get any address to functions within it using GetProcAddress(). I'm assuming the LoadLibrary function doesn't load the DLL's, even if they are linked into the executable at compile time (with an import library).
I want to be able to get a resource from this DLL, but I only have the executable to deal with and so I won't know where, or which version of the DLL is being used by the executable.
Thanks,
Tom
|
|
|
|
|
|
Thanks, this looks to be similiar to the EnumProcesses(), OpenProcess(), EnumProcessModules(), type of functions I have found since I posted.
However, in all cases, these functions need the process to be running to get a PID. Is there any way to figure out this information without having the process running? I don't want to run it, only want to examine it...
Thanks,
|
|
|
|
|
Gunn317 wrote: Is there any way to figure out this information without having the process running? I don't want to run it, only want to examine it...
Nothing comes to mind as of right away except for starting the suspended process and than grabbing his modules but if you'll figure out a better solution could you please tell me how to do it ?
--------------------------------
Human stupidity is infinite.
|
|
|
|
|
Well, I think I solved my original problem and so now I don't even need to have a DLL.
What I was trying to do have an .exe use a DLL that just contained a version info resource so I could determine what version of our libraries the .exe was built with. Just using LoadLibrary() on the .exe wouldn't give me any info on the resource, I guess because the DLL does not get loaded; only when it is executed. So I wanted to figure a way to find all the DLL's, search for my version DLL, use LoadLibrary() on it, then get the version resource...whew...
What I have finally figured out is that you can export functions from a .exe! So, I created a header file that the .exe includes (indirectly, by other includes, so it will *always* be included) that exports a function. Then, I can call LoadLibrary() on the .exe, use GetProcAddress() to get a pointer to the exported function, then call it to determine the version, walla! And *much* simpler...
See my following post showing the .h:
http://www.codeproject.com/script/comments/forums.asp?forumid=1647&select=1304933&df=100&msg=1304933#xx1304767xx
Thanks for your comments!
|
|
|
|
|
Hello everyone!
Can anyone PLEASE help me? Look:
http://sulfurmidis.com/mazzee.zip
OK... The code crashes at MazzeeGame.cpp at line 940. It seems that the game pointer in Mazzee.cpp is NULL at the time the Mazzee_MoveMonsters thread (in Mazzee.cpp) calls the Mazzee::MoveMonsters() method... But that can't be true, because, if I put a debug checkpoint at 263 in Mazzee.cpp, the game pointer has all of it's variables set up correctly! Why is this? Does anyone know? Thanks!
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
I think you'd be better off posting the line and a few lines of surrounding code, than getting someone to download a zip file.
My articles
BlackDice
|
|
|
|