|
Hi,
I am facing problem while calling a dialog, which contains multiple radio buttons and "OK" and "Cancel" buttons.
But number of radio buttons came to know while runtime only, for this scenario, i tried to make using "Easysize" but it works only if number of radio buttons are fixed.
Can anyone suggest how to handle this situation ?
~Kris
|
|
|
|
|
You will need to add some code to iterate through all the controls in the dialog. Using the location and dimensions of each item you can calculate the maximum width and height required. Use that information to resize the dialog window.
|
|
|
|
|
Here is one of many examples that can be found on the web.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
I would design the UI for such a requirement by embedding the radio button is some sort of a list.
Here is an example - CQuickList[^]
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) (October 2009 - September 2013) Polymorphism in C
|
|
|
|
|
1. User login (Admin, Broker or Client)
2. Stock Trading. Clients can view shares prices and submit orders to brokers for
buying or selling
3. Brokers can issue the order; manage client’s finance and billings and offer
recommendations based on current prices and client history.
4. Stocks Activity Reports (By day, month or year)
please help me in this basic project and diagram
please
|
|
|
|
|
|
|
|
i need little help not someone work for me i need little project link to do good diagram
and thanks
|
|
|
|
|
Then you need to do some research into the different parts of the project: database, transactions, UI etc. There is no simple answer that can be posted in a forum such as this.
|
|
|
|
|
You haven't asked for help, you asked for a full solution.
If you want help, then you first need to do as much as possible by yourself, up to the point where you don't know how to proceed. Then tell us why you can't proceed and what, precisely, it is that you don't understand or don't know how to solve.
There's no point for us to provide a full fledged answer if we don't know what you already know - we might just be wasting our time telling you what you already know!
You may be unsure on how to start, maybe you believe if your design isn't perfect right from the start then you will ultimately fail. But that is not how software development works: software development never starts with a perfect design! Instead you start with what you think works best, and go on until you realize that you can't go on, or some detalis of your design are impractical. Then, based on what you've just learned, you correct your design. If all else fails, start new from scratch.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
Hi, it's for MT4 plattform?
|
|
|
|
|
Is there any way to insert some icons to an CTreeCtrl, but only on some icons, and other one's not ? If yes, how can I do that ?
|
|
|
|
|
you set the icon group via CTreeCtrl::SetImageList[^], and then use the offset into the list to set the icon for individual tree items. If you use an invalid offset then no icon will be displayed.
|
|
|
|
|
Yes, I try that, but remain there an ugly empty space (between tree line and tree text) ...
|
|
|
|
|
That's the space for the icon, nothing you can do about it. You could use an image that just contains a line so it extends to the actual tree item.
|
|
|
|
|
Hi
To say i am very noob to windows programming world.
We are trying to develop windows application + device driver with CEN XFS compliance.
http://en.wikipedia.org/wiki/CEN/XFS
simple architectural flow:
Windows Application
|
_____________________
| XFS APIs |
(CEN/XFS SDK DLL)
| |
| XFS SPIs |
|_____________________|---XFS Manager
|
|
Service providers (SP)
(DEVICE DRIVER)
To understand the SP's functionality, we recently took one of the device vendors SP's DLL for accessing their device and we were able to successfully communicate with their device using our windows application(Eclipse MINGW based).
Then we started to check for some sample SP source in internet to try our implementation. (https://drive.google.com/file/d/0B60pejPe6yiSejRGQ3JnLUl4dzA/view)
With the linked source we were able to compile and create an output DLL. But , when we tried to access the SP, I always return error.
With windows sample application, we just tried to open the device with call (WFSOPEN) which always returned (-15 WFS_ERR_INTERNAL_ERROR ) or (-29 WFS_ERR_INVALID_SERVPROV)
Trial FLow 1 :
Application Call to manager:
hResult = WFSOpen( "QuantumT", hApp,lpszAppID, dwTraceLevel,dwTimeOut,VER_SPI_REQUIRE,&SrvcVersion,&SPIVersion,&hService);
manager translates WFSOPEN call to SP's WFPOPEN call:
HRESULT WINAPI WFPOpen(HSERVICE hService, LPSTR lpszLogicalName, HAPP hApp, LPSTR lpszAppID, DWORD dwTraceLevel, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID, HPROVIDER hProvider, DWORD dwSPIVersionsRequired, LPWFSVERSION lpSPIVersion, DWORD dwSrvcVersionsRequired, LPWFSVERSION lpSrvcVersion)
With above call flow I get (-29 WFS_ERR_INVALID_SERVPROV) as an error for my application
Trial FLow 2 (Just removed WINAPI interface for WFPOPEN in SP):
Application Call to manager:
hResult = WFSOpen("QuantumT",hApp,lpszAppID,dwTraceLevel,dwTimeOut,VER_SPI_REQUIRE,&SrvcVersion,&SPIVersion,&hService);
manager translates WFSOPEN call to SP's WFPOPEN call
HRESULT WFPOpen(HSERVICE hService, LPSTR lpszLogicalName, HAPP hApp, LPSTR lpszAppID, DWORD dwTraceLevel, DWORD dwTimeOut, HWND hWnd,REQUESTID ReqID, HPROVIDER hProvider, DWORD dwSPIVersionsRequired, LPWFSVERSION lpSPIVersion, DWORD dwSrvcVersionsRequired, LPWFSVERSION lpSrvcVersion)
With above call flow I get (-15 WFS_ERR_INTERNAL_ERROR ) as an error for my application from manger even though i force SUCCESS as return from SP to manager
I am confused why MANAGER returns different error codes to application if WINAPI definition is removed from WFPOPEN.
Link for WINDOWS APPLICATION SAMPLE: https://drive.google.com/open?id=0B60pejPe6yiSUEp1N2xzdGlXWFE&authuser=0
Request some pointers on understanding this issue.
|
|
|
|
|
I googled the error message you mention and could not find it in the Windows API. It doesn't look like a Windows error message. I'm afraid the maker of the device might be the only one who could help you with this problem.
EDIT:
Perhaps this is a call stack corruption caused by removing the WINAPI definition. WINAPI simply means __stdcall which is the calling convention used by the Windows API.
The difficult we do right away...
...the impossible takes slightly longer.
modified 20-Nov-14 12:47pm.
|
|
|
|
|
So, you suspect this might the issue with SP code which i am currently working with??.
|
|
|
|
|
Well, since that is not a Windows error message, I can only assume it is specific to the library you are using.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Also i see some difference in Sp's DLL which i created and actual working vendors DLL
Difference noted using PE studio's exported sysmbols option
DLL Created by ME:
<pre lang="c++">_WFPCancelAsyncRequest@8,-,1,-,-,.rdata:0x00001096
_WFPClose@12,-,2,-,-,.rdata:0x00001005
_WFPDeregister@20,-,3,-,-,.rdata:0x00001140
_WFPExecute@24,-,4,-,-,.rdata:0x00001131
_WFPGetInfo@24,-,5,-,-,.rdata:0x000010EB
_WFPLock@16,-,6,-,-,.rdata:0x00001023
_WFPOpen@52,-,7,-,-,.rdata:0x0000102D
_WFPRegister@20,-,8,-,-,.rdata:0x00001073
_WFPSetTraceLevel@8,-,9,-,-,.rdata:0x0000113B
_WFPUnloadService@0,-,10,-,-,.rdata:0x0000100A
_WFPUnlock@12,-,11,-,-,.rdata:0x00001082
Vendor created DLL:
WFPCancelAsyncRequest,-,1,-,-,.rdata:0x0000C450
WFPClose,-,2,-,-,.rdata:0x0000C6E0
WFPDeregister,-,3,-,-,.rdata:0x0000C7F0
WFPExecute,-,4,-,-,.rdata:0x0000C970
WFPGetInfo,-,5,-,-,.rdata:0x0000DFA0
WFPLock,-,6,-,-,.rdata:0x0000E490
WFPOpen,-,7,-,-,.rdata:0x0000C030
WFPRegister,-,8,-,-,.rdata:0x0000E590
WFPSetTraceLevel,-,9,-,-,.rdata:0x0000E710
WFPUnloadService,-,10,-,-,.rdata:0x0000E770
WFPUnlock,-,11,-,-,.rdata:0x0000E8F0
What is the difference.Does export method differ??
|
|
|
|
|
You've hit the nail on the head! The ones on the bottom are exported like so:
extern "C"
{
}
The ones on the top are exported in C++ fashion, with name mangling.
Try exporting your functions as extern "C" .
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Thanks your tip help me to start some invetigation.All these days we were with LINUX. Migrating to windows seems little difficult for me.
Where should :
extern "C"
{
}<pre></pre>
be added??
Because SPITesh.H, the code has the expected tag...
#ifdef __cplusplus
extern "C" {
#endif
SPITEST_API HRESULT WINAPI WFPCancelAsyncRequest(HSERVICE hService, REQUESTID RequestID);
SPITEST_API HRESULT WINAPI WFPClose(HSERVICE hService, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPDeregister(HSERVICE hService, DWORD dwEventClass, HWND hWndReg, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPExecute(HSERVICE hService, DWORD dwCommand, LPVOID lpCmdData, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPGetInfo(HSERVICE hService, DWORD dwCategory, LPVOID lpQueryDetails, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPLock(HSERVICE hService, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPOpen(HSERVICE hService, LPSTR lpszLogicalName, HAPP hApp, LPSTR lpszAppID, DWORD dwTraceLevel, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID, HPROVIDER hProvider, DWORD dwSPIVersionsRequired, LPWFSVERSION lpSPIVersion, DWORD dwSrvcVersionsRequired, LPWFSVERSION lpSrvcVersion);
SPITEST_API HRESULT WINAPI WFPRegister(HSERVICE hService, DWORD dwEventClass, HWND hWndReg, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPSetTraceLevel(HSERVICE hService, DWORD dwTraceLevel);
SPITEST_API HRESULT WINAPI WFPUnloadService();
SPITEST_API HRESULT WINAPI WFPUnlock(HSERVICE hService, HWND hWnd, REQUESTID ReqID);
#ifdef __cplusplus
};
#endif
|
|
|
|
|
What you show inside SPITesh.H is the correct placement. Is that your file or the original vendor's file?
In Visual Studio, when you compile the code as C++, it should automatically define __cplusplus .
If it doesn't, then it might be that your source file extension is ".c" when it should be ".cpp".
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Yes, I sm trying to follow the same. but still it is doing no good.
https://drive.google.com/file/d/0B60pejPe6yiSejRGQ3JnLUl4dzA/view[^]
The link contains the project ref files i made sure all files are CPP and Extern C just for the headers.
What else should i look ifor?? is there some settings that i should set in VS 2010 Express
|
|
|
|
|