|
void CTestDlg::OnBnClickedButtonDlltest()
{
HWND myhWnd = this->m_hWnd;
typedef CDialog * (_stdcall *Connect)(HWND hWnd);
HINSTANCE hinstDLL=NULL;
hinstDLL = ::LoadLibrary("AntiSubmarine.dll");
if (hinstDLL) {
Connect Proc;
Proc = (Connect)GetProcAddress(hinstDLL,"ShowDllDlg");
if (Proc!=(Connect)NULL) {
m_pdlg = (CDialog *)Proc(myhWnd);
}
}
else {
AfxMessageBox("Not found dll !");
}
return;
}
if you create a modless dialog, don't free the library which include the dialog resource until you destroy the dialog, because that modless dialog is not block like mod dialog.
it's my pleasure to make friend with you.
|
|
|
|
|
Thank you very much for your answers.
I'll try it again. if there is any error, could you help me again? May I have your Emaill for contact in the future?
my Emaill: hailuolan@yahoo.com.cn
it's my pleasure to make friend with you.
|
|
|
|
|
Hi All,
In my program i need a combo box looks just like the one shown in the pic. I learned that i need to subclass it. But the prob i need to fix is the contents of each row as you can see that each row is divided into 3 portions. 1)image on the left,2)name of the file with bigger font,3) path to access that file in smaller font. Please tell me how can i achieve this divisions in one row.
image
Regards,
J
modified on Saturday, August 15, 2009 4:23 AM
|
|
|
|
|
Did you try using the CBS_OWNERDRAWFIXED or CBS_OWNERDRAWVARIABLE styles (See this[^] for details) on your combo box?
(btw your "image link" doesn't give me an image at all)
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Thanks, I have corrected the image link
|
|
|
|
|
I write bitmap.c display bitmap > 256 color on screen
But I have VGA card on board.Result bad color.
How to: display bitmap > 256 color on screen ?
Palette have ...color ?
Struct of bitmap:
Struct tagBITMAP{
Word w,h;
Byte *data;
Byte palette[256*3];
}BITMAP;
Or answer is:1.
Desktop> right button click\properties\Setting\Display:Plug &
Play on intel(R) 82845G GL/GE/PE/GV Graphics Controller
Color Qualtily:Hightest(32 bit)
2.I change 16 bit to 32 bit.how to do ?
write boot.asm -> compiler NASM-> strip header -. not copy to floppy disk,I copt to CD-ROM,normal as floppy.Can I do ?
Floppy is old man.clear it
Help me
How to:compile this code with NASM 2.
--End,vietnam not register on www.osdev.org.
Please,register osdev for me.Account:TUAN_OS
My Mail:thoong00biet@yahoo.com.vn
|
|
|
|
|
mark
it's my pleasure to make friend with you.
|
|
|
|
|
I write bitmap.c display bitmap > 256 color on screen
But I have VGA card on board.Result bad color.
How to: display bitmap > 256 color on screen ?
Palette have ...color ?
Struct of bitmap:
Struct tagBITMAP{
Word w,h;
Byte *data;
Byte palette[256*3];
}BITMAP;
Or answer is:1.
Desktop> click fải\properties\Setting\Display:Plug &
Play on intel(R) 82845G GL/GE/PE/GV Graphics Controller
Color Qualtily:Hightest(32 bit)
2.I change 16 bit to 32 bit.how to do ?
I write boot.asm->compiler->strip header->not copy to floppy,I copy to CD.I do it ?
Floppy is old man,not use it
Help me
How to:compile this code with NASM 2.
--End,vietnam not register on www.osdev.org.
Please,register osdev for me.Account:TUAN_OS
My Mail:thoong00biet@yahoo.com.vn
|
|
|
|
|
|
tuan1111 wrote: I write boot.asm->compiler->strip header->not copy to floppy,I copy to CD.I do it ?
Why go to all that trouble when you can use virtualization? You can just build your OS and boot directly into it with the VM.
I am a lean mean ground beef machine!!!
|
|
|
|
|
Hi,
changing from VC7 to VC8 I get this linker error:
1>aiunittest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __stdcall ping(int)" (__imp_?ping@@YGHH@Z) referenced in function _main
The above code worked fine with VC7. Any ideas?
Thanks,
Uli
|
|
|
|
|
Compare the contents of
Project Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies.
You're probably missing an entry in VC8.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I am successfully creating tree nodes using the TVINSERTSTRUCT. I have 4 levels of child nodes and need to add another nodes to the last one as siblings.
I can use GetNextItem to retrieve HTREEITEM ( verified by getting the node text sting) but I am unable to get the actual tree TVITEM item where I will need the LPARAM for further processing.
Here is the essence of the code:
HTREEITEM hTreeItem;
TVINSERTSTRUCT * pItem = new TVINSERTSTRUCT ();
// first child
hTreeItem = m_ctrlTree.GetNextItem(NULL, TVGN_CHILD );
strNode = m_ctrlTree.GetItemText(hTreeItem ); // TOK
do
{
hTreeItem = m_ctrlTree.GetNextItem(hTreeItem , TVGN_CHILD );
strNode = m_ctrlTree.GetItemText(hTreeItem );//TOK
m_ctrlTree.SelectItem( hTreeItem ); // did not help
if(!m_ctrlTree.GetItem(&pItem->item ))
TRACE ("Failed”);
|
|
|
|
|
Sorry - the editor went crazy again.
Thanks for reading and any contructive help as always will be appreciated.
Cheers Vaclav
|
|
|
|
|
Heya,
So I have to write a logger that emulates log4cxx, without all the awesome features. The main problem I am having is that it needs to be able to be accessed through a Macro with variable args. The Macro has to take variable args of different, unspecified types. I am not sure how this happens. I think I am going to have to rely on the compiler at some point, but I am stumped.
It is easier to show:
the macro:
LOG (Message m, ...)
the Message m comes from an enum (gen'd from xml). It is used like this:
LOG (UNEXPECTED_EVENT, "thread failure");
<< ERROR: UNEXPECTED EVENT: thread failure
LOG (TRACE);
<< TRACE
LOG (DEBUG_MESSAGE, "At line ", line);
<< DEBUG_MESSAGE: At line 7
The types and such are not specified. The format of the message coming out IS though. But it is missing type information.
In the XML the fmt strings are specified like this:
88 <item>
89 <message>CS_CommandHandlingUnknownException</message>
90 <severity>ERROR</severity>
91 <text>An exception was thrown while processing command %1%</text>
92 </item>
I am having problems doing a type-discovery. I am using the va_args structure to get the arguments from the macro:
59 void WriteToLog (Message m, ...)
60 {
61 va_list vlist;
62 char *cur_arg;
63 MessageBody msg_body = msg_map [m];
64
65 va_start (vlist, m);
66
67 for (int i = 0; i < msg_body.fmt_strings.size (); i++)
68 {
69 cur_arg = va_arg (vlist, char *);
70 std::cout << msg_body.fmt_strings[i] << " ";
71 std::cout << "'" << cur_arg << "'" << std::endl;
72
73 }
74 }
The msg_body is simply a container for the XML. I parsed out the sections of the string, so that they coincide with the number of args (cause if i didn't know how many args then all hell breaks loose).
Because I have to specify a type in the va_arg I am able to pull off char* fine, but everything else causes segfaults. any ideas on how to get this working? I think it might be time to go back to the drawing board. The one thing I can't change is the macro, nor the XML (le sad . Thanks in advance.
|
|
|
|
|
I think working with a friend we figured out a ghetto fix. And we keep typesafe
First we have objects that contain the information about the entry (type, severity, fmt). Then we overload the ',' operator for that object. This allows us to use the fact that the Macro is expanded into a comma separated list to our advantage. All we do is daisy chain the function calls.
I know what you're thinking: wow. that is ghetto.
It is. Without changing the implementation or specification of the log i couldn't think of a way to keep type safe.
I am still open to ideas.
|
|
|
|
|
Hello
When we take a mouse on any program button or etc. the windows show us a tool tip.
How can i get that tooltip text in my program ? In short i want to capture a tooltip displayed by
windows when i take my mouse over there.
Any hooking required?
Thanx in advance.
Jay.
|
|
|
|
|
Sorry I normally don't try to second guess other developers but could you explain why you are trying to do this? The only reason I ask is there may be a different approach than what I am thinking that would better suit your needs.
I am a lean mean ground beef machine!!!
|
|
|
|
|
Actually i want to capture all information of an office outlook items.
When i take mouse on any item of office outlook my program should give all information available for that item.I have developed some part of it with IAccessible interface.But right now i am facing one problem with the new push button on the office outlook,it gives same information for New button for "Mail" "Calender" "Task" "Contacts" etc. I observe that the tootip is different each time for new button when Any of this selected from the left side of outlook.So i want to capture that tooltip so i can identify the new button is different.
For you information Office outlook is 2003 and I am using vc++ 6.0 to develop this program.
Thanx
Jay.
|
|
|
|
|
Hi,
Is it possible to change the height of titlebar of all Dialogs which are used only in my application using WM_NCCALCSIZE or DrawCaption() and if there is any better way..pls let me know....please suggest me any sample which does the same....
|
|
|
|
|
Hi,
i tried using
BEGIN_MESSAGE_MAP(CMyDlg, CDialog)
ON_WM_NCCALCSIZE()
END_MESSAGE_MAP()
void CMyDlg::OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp)
{
CRect& rc = (CRect&)lpncsp->rgrc[0];
rc.top += 20; // Increase the height of tittle bar
CWnd::OnNcCalcSize(bCalcValidRects, lpncsp);
}
but the increased height of the title bar is not shown properly...and even the caption and the close button were not increased...(title bar was increased but not shown properly..)
|
|
|
|
|
kumar sanghvi wrote: rc.top += 20; // Increase the height of tittle bar
This looks as though it would shrink the height. Why not use the InflateRect() method?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
kumar sanghvi wrote: but the increased height of the title bar is not shown properly
This is because you are changing the bounding rectangle of the client area not the caption bar. The default window procedure will adjust this rectangle based on the height of the title bar, the height of the menu (if present) and any other non-client component managed by the window. You have however gotten one step close as you now have extra space reserved at the top of the window for your caption bar.
The next step is to handle the WM_NCPAINT message and draw your custom caption bar with the desired height.
I am a lean mean ground beef machine!!!
|
|
|
|
|
I need a "universal font",
1. which can display most of languages (charecters).
2. whose size can be changed smoothly (i.e. height can be 13, 14, 15 ... pixels).
font "MS Shell Dlg" looks good, but its size can not be changed smoothly.
Any suggestion?
Thanks
|
|
|
|
|
Arial Unicode MS[^]? Think that comes as standard with Windows.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|