|
Hi,Eveyone.
I want to load a bitmap into Button and PictureBox by Win32.Who know about this prolem,please help me.
Thanks !
|
|
|
|
|
HBITMAP bitmap;
HWND hButton;
HINSTANCE hInst;
...
...
bitmap=LoadBitmap (hInst,MAKEINTRESOURCE(IDB_BITMAP1));
hButton=CreateWindow("BUTTON","",WS_CHILD|WS_VISIBLE|BS_BITMAP,0,0,120,50,hWnd,NULL,hInst,NULL);
SendMessage(hButton,BM_SETIMAGE,(WPARAM)IMAGE_BITMAP,(LPARAM)bitmap);
maybe it is some helpful to you
|
|
|
|
|
I need someone who can help me...
the problem states..
input word: Ruby
output: ybuR
using stack operation pls....
|
|
|
|
|
we don't do homeworks here
|
|
|
|
|
push(R)
push(u)
push(b)
push(y)
pop(y)
pop(b)
pop(u)
pop(r)
VuNic
|
|
|
|
|
Hello everyone!
Alright... I need someone to guide me here... I'm makig a networked game, and I need a cross-platform (Win32 and Linux mostly) socket library with an easy-to-follow tutorial for that library, because I never used sockets before, and I'm kind of afraid of them... I've been looking at one called DataReel[^], but I couldn't find any tutorials for it... Can anyone help me? Thanks!
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
Try to see CSocket on MSDN. It's very easy to use.
Good Luck
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
|
|
crossplatform... see Beej's Guide to Network Programming Using Internet Sockets, http://beej.us/guide/bgnet/
|
|
|
|
|
Hi all,
I have a requirement to create an app that displays itself similar to how Trillian displays itself --- docking itself to the right had side of the desktop. My environment is Visual C++ (Visual Studio 2005).
I have searched the site for articles and found some relating to appbars and MFC but have had problems compiling. having said this i don't wish to use MFC controls or methods to do this.
Are there any known components that i can purchase to do this ? Or is there a way i achieve this natively through VS 2005?
Any help is much apreciated
10x
|
|
|
|
|
problem of compliling quadprog.m to generate quadprog.lib
when i use mcc -t -L ........
i need to use quadprog.m in c++ builder borland 6.0
am
|
|
|
|
|
ss2006 wrote: problem of compliling quadprog.m to generate quadprog.lib
when i use mcc -t -L ........
i need to use quadprog.m in c++ builder borland 6.0
check the matlab compiler manuals. I have not personally used it, though work with a few who have. You should be able to choose the option to compile the matlab formulas into a DLL. That DLL then can be used in borland or microsoft or any other windows program using any tutorial for using a DLL function.
http://www.mathworks.com/products/compiler/description4.html[^]
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Does any one know how to write a tftp client program using udp
socket programming?
Cheyi
|
|
|
|
|
|
Thanks, I did but there was nothing on tftp.
|
|
|
|
|
Hi to everyone, I connect locally to SQL Server 2000, using ODBC, without
problem. The problem is that I cannot connect to the SQL Server via a LAN.
How can I connect to SQL Server from a second PC via a network (with ODBC)?
Thank you!!!
|
|
|
|
|
I wonder if somebody could point me in the right direction.
I have a dialog containing a listview and a richedit control. Both of the cover nearly the whole dialog. Now I just had a great idea. Wouldn't it be more visually pleasing if the user was able to resize the controls. So I guess I need something inbetween the controls which the user can can drag, at the same time resizing the controls. Something similar to how the internal windows work inside MSVC.
I have seen this done in plenty of programs, but how did they do it?
|
|
|
|
|
waldermort wrote: I have seen this done in plenty of programs, but how did they do it?
it's called magic.
MFC does not have an automatic resizing framework ( me think it's one of its failing ) to be able to easilly resize dialogs ( mostly ) and their contents. Why ? ( my interpretation of it ) Because the resource editor is not pixel oriented, it's based on DLU ( dialog logical unit ) which lets the system do some resizing depending on the size of the font scaling ( big font vs. normal font ) and that once a dialog is designed, it's not easy to translate to pixel and keep the exact positioning.
ok, so, now, how is it done ? for simple layouts, manual resizing and positioning of the control is easy to do, handle the WM_SIZE message and recompute each control position and move them to position with do MoveWindow ( or SetWindowPos ).
for more complex layout, you can still do it manually, or you can go have a look at different resising classes and framework that exists, do a little search here on codeproject to find a couple of them. in general, each work well, but I think that they all have some sort of limitation that makes layout difficult.
At work, We are using the LayoutManager of Dundas, which works ok for some layout, but is a nightmare for others.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
But I thought the WM_SIZE message was sent when the size of the dialog is changed. I have already implemented resizing and reposition on the WM_SIZE, but the controls will always have a position and size relative to the edges of the dialog.
What I am trying to do is resize the Child windows on the dialog, without the dialog itself being affected. In theory one child window would become larger while the other becomes smaller to give space. I'm guessing I would need to place some sort of control bar between the two controls, and handle a mouse event for it. Though I know of no such control.
To make things even more difficult, this is a non MFC project.
|
|
|
|
|
There is an article here on CP about a splitter bar for dialogs that does not require the child controls to be CView derived. You can have a look for it here[^]. It may fit your purpose.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks for the suggestions. I have looked through and downloaded all of the splitter bar articles here on CP, all of them use MFC in some form or another. Either the control is derived from CView, CDialog, CSplitter or CWnd. Also after reading through the source codes, I think it would be a great task trying to convert them to a non-MFC project.
There is one article however, which deals with anchoring and resizing controls in non-MFC. Controls are usually anchored against the edges of the dialog, whereas here I would need to anchor the controls against each other, at the same time creating a splitter control.
It's a large task to incorporate into my nearly finished project, maybe I will just leave it for version 2. My boss is already complaining about the time.
|
|
|
|
|
I am writing an OpenGL program in visual c++.NET and I am reading a file and using the file as a texture. After I build the program using
Release build" and run the program by double clicking on it in windows explorer, everything works fine, but if I try to run the same program using debug->start from the visual studio menu bar, the texture file won't load. Is this a problem with my code or is visual c++ not loading the file on purpose.
pplshero54 gives his most thanks
|
|
|
|
|
#include "stdafx.h"
#include <windows.h>
int _tmain()
{
HANDLE hProcess;
DWORD Address;
hProcess = OpenProcess(PROCESS_ALL_ACCESS, TRUE, (DWORD)6E8);
if (hProcess == NULL)
{
printf("Main - hProcess Error.");
CloseHandle(hProcess);
return 0;
}
Address == VirtualAllocEx(
hProcess,
NULL,
sizeof("C:\\mydll.dll"),
MEM_COMMIT,
PAGE_EXECUTE_READWRITE);
if(Address == NULL)
{
printf("Main - VirtualAllocEx Error(return NULL).");
CloseHandle(hProcess);
return 0;
}
printf("Address: x%", Address);
if(WriteProcessMemory(hProcess,
(PVOID)Address,
"C:\\mydll.dll",
sizeof("C:\\mydll.dll"),
NULL) == NULL)
{
printf("Main - WriteProcessMemory Error (return NULL).");
CloseHandle(hProcess);
return 0;
}
CreateRemoteThread(hProcess
, NULL
, 0
, (LPTHREAD_START_ROUTINE)GetProcAddress(GetModuleHandle(TEXT("kernel32")), "LoadLibraryA")
, (LPVOID)Address
, 0
, NULL);
CloseHandle(hProcess);
return 0;
}
---------------end----------------
I get this error:
error C3861: 'VirtualAllocEx': identifier not found, even with argument-dependent lookup
warning C4312: 'type cast' : conversion from 'DWORD' to 'PVOID' of greater size
warning C4312: 'type cast' : conversion from 'DWORD' to 'LPVOID' of greater size
thx
thx
|
|
|
|
|
Did you install the latest Platform SDK? VirtualAllocEx should be defined in winbase.h which is included by windows.h.
DWORD Address;
to
LPVOID Address;
Address == VirtualAllocEx(
to
Address = VirtualAllocEx(
|
|
|
|