Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /ooDialog/trunk/ooDialog/oodPropertySheetDialog.cpp [r9375] .. [r9376] Maximize Restore

  Switch to unified view

a/ooDialog/trunk/ooDialog/oodPropertySheetDialog.cpp b/ooDialog/trunk/ooDialog/oodPropertySheetDialog.cpp
...
...
289
 * @param result
289
 * @param result
290
 * @param name
290
 * @param name
291
 *
291
 *
292
 * @return INT_PRT
292
 * @return INT_PRT
293
 */
293
 */
294
INT_PTR getSetActiveValue(RexxThreadContext *c, pCPropertySheetDialog pcpsd, RexxObjectPtr result, CSTRING name)
294
intptr_t getSetActiveValue(RexxThreadContext *c, pCPropertySheetDialog pcpsd, RexxObjectPtr result, CSTRING name)
295
{
295
{
296
    INT_PTR ret = -2;
296
    intptr_t ret = -2;
297
297
298
    if ( c->IsPointer(result) )
298
    if ( c->IsPointer(result) )
299
    {
299
    {
300
        return (INT_PTR)c->PointerValue((RexxPointerObject)result);
300
        return (intptr_t)c->PointerValue((RexxPointerObject)result);
301
    }
301
    }
302
302
303
    int max = (int)pcpsd->pageCount;
303
    int max = (int)pcpsd->pageCount;
304
304
305
    int32_t index;
305
    int32_t index;
...
...
456
 * @param isImage
456
 * @param isImage
457
 * @param type
457
 * @param type
458
 *
458
 *
459
 * @return The handle to the image or the resource ID.
459
 * @return The handle to the image or the resource ID.
460
 */
460
 */
461
INT_PTR getImageOrID(RexxMethodContext *c, RexxObjectPtr self, RexxObjectPtr image, size_t argPos,
461
intptr_t getImageOrID(RexxMethodContext *c, RexxObjectPtr self, RexxObjectPtr image, size_t argPos,
462
                     bool *isImage, uint8_t *type)
462
                     bool *isImage, uint8_t *type)
463
{
463
{
464
    INT_PTR result = 0;
464
    intptr_t result = 0;
465
465
466
    if ( c->IsOfType(image, "IMAGE") )
466
    if ( c->IsOfType(image, "IMAGE") )
467
    {
467
    {
468
        POODIMAGE oodImage = rxGetOodImage(c, image, argPos);
468
        POODIMAGE oodImage = rxGetOodImage(c, image, argPos);
469
        if ( oodImage != NULL )
469
        if ( oodImage != NULL )
470
        {
470
        {
471
            *isImage = true;
471
            *isImage = true;
472
            *type = (uint8_t)oodImage->type;
472
            *type = (uint8_t)oodImage->type;
473
            result = (INT_PTR)oodImage->hImage;
473
            result = (intptr_t)oodImage->hImage;
474
        }
474
        }
475
    }
475
    }
476
    else
476
    else
477
    {
477
    {
478
        int32_t id = oodResolveSymbolicID(c->threadContext, self, image, -1, argPos, true);
478
        int32_t id = oodResolveSymbolicID(c->threadContext, self, image, -1, argPos, true);
...
...
1029
 * @param name
1029
 * @param name
1030
 */
1030
 */
1031
void doSetActiveCommon(RexxThreadContext *c, pCPropertySheetPage pcpsp, HWND hPage, CSTRING name)
1031
void doSetActiveCommon(RexxThreadContext *c, pCPropertySheetPage pcpsp, HWND hPage, CSTRING name)
1032
{
1032
{
1033
    pCPropertySheetDialog pcpsd = (pCPropertySheetDialog)pcpsp->cppPropSheet;
1033
    pCPropertySheetDialog pcpsd = (pCPropertySheetDialog)pcpsp->cppPropSheet;
1034
    INT_PTR reply = 0;
1034
    intptr_t reply = 0;
1035
1035
1036
    RexxObjectPtr result = c->SendMessage1(pcpsp->rexxSelf, name, pcpsd->rexxSelf);
1036
    RexxObjectPtr result = c->SendMessage1(pcpsp->rexxSelf, name, pcpsd->rexxSelf);
1037
1037
1038
    if ( goodReply(c, pcpsd->pcpbd, result, name) )
1038
    if ( goodReply(c, pcpsd->pcpbd, result, name) )
1039
    {
1039
    {
...
...
2424
    pCPropertySheetDialog pcpsd = (pCPropertySheetDialog)pCSelf;
2424
    pCPropertySheetDialog pcpsd = (pCPropertySheetDialog)pCSelf;
2425
2425
2426
    bool    isImage;
2426
    bool    isImage;
2427
    uint8_t type;
2427
    uint8_t type;
2428
2428
2429
    INT_PTR result = getImageOrID(context, pcpsd->rexxSelf, icon, 1, &isImage, &type);
2429
    intptr_t result = getImageOrID(context, pcpsd->rexxSelf, icon, 1, &isImage, &type);
2430
    if ( result != 0 )
2430
    if ( result != 0 )
2431
    {
2431
    {
2432
        if ( isImage )
2432
        if ( isImage )
2433
        {
2433
        {
2434
            if ( type != IMAGE_ICON )
2434
            if ( type != IMAGE_ICON )
...
...
2487
    }
2487
    }
2488
2488
2489
    bool    isImage;
2489
    bool    isImage;
2490
    uint8_t type;
2490
    uint8_t type;
2491
2491
2492
    INT_PTR result = getImageOrID(context, pcpsd->rexxSelf, header, 1, &isImage, &type);
2492
    intptr_t result = getImageOrID(context, pcpsd->rexxSelf, header, 1, &isImage, &type);
2493
    if ( result != 0 )
2493
    if ( result != 0 )
2494
    {
2494
    {
2495
        if ( isImage )
2495
        if ( isImage )
2496
        {
2496
        {
2497
            if ( type != IMAGE_BITMAP )
2497
            if ( type != IMAGE_BITMAP )
...
...
2621
    }
2621
    }
2622
2622
2623
    bool    isImage;
2623
    bool    isImage;
2624
    uint8_t type;
2624
    uint8_t type;
2625
2625
2626
    INT_PTR result = getImageOrID(context, pcpsd->rexxSelf, watermark, 1, &isImage, &type);
2626
    intptr_t result = getImageOrID(context, pcpsd->rexxSelf, watermark, 1, &isImage, &type);
2627
    if ( result != 0 )
2627
    if ( result != 0 )
2628
    {
2628
    {
2629
        if ( isImage )
2629
        if ( isImage )
2630
        {
2630
        {
2631
            if ( type != IMAGE_BITMAP )
2631
            if ( type != IMAGE_BITMAP )
...
...
3256
 */
3256
 */
3257
RexxMethod2(RexxObjectPtr, psdlg_indexToID, int32_t, index, CSELF, pCSelf)
3257
RexxMethod2(RexxObjectPtr, psdlg_indexToID, int32_t, index, CSELF, pCSelf)
3258
{
3258
{
3259
    pCPropertySheetDialog pcpsd = (pCPropertySheetDialog)pCSelf;
3259
    pCPropertySheetDialog pcpsd = (pCPropertySheetDialog)pCSelf;
3260
3260
3261
    INT_PTR result = -2;
3261
    intptr_t result = -2;
3262
3262
3263
    int max = (int)pcpsd->pageCount;
3263
    int max = (int)pcpsd->pageCount;
3264
3264
3265
    if ( index < -1 || index > max )
3265
    if ( index < -1 || index > max )
3266
    {
3266
    {
...
...
4305
4305
4306
    RexxObjectPtr result = c->SendMessage0(ppdi->rexxSelf, "DEFINEDIALOG");
4306
    RexxObjectPtr result = c->SendMessage0(ppdi->rexxSelf, "DEFINEDIALOG");
4307
4307
4308
    if ( ! c->CheckCondition() && pcdd->active != NULL )
4308
    if ( ! c->CheckCondition() && pcdd->active != NULL )
4309
    {
4309
    {
4310
        ppdi->pageID = (INT_PTR)pcdd->base;
4310
        ppdi->pageID = (intptr_t)pcdd->base;
4311
4311
4312
        // Set the number of dialog items field in the dialog template.
4312
        // Set the number of dialog items field in the dialog template.
4313
        ((DLGTEMPLATEEX *)pcdd->base)->cDlgItems = (WORD)pcdd->count;
4313
        ((DLGTEMPLATEEX *)pcdd->base)->cDlgItems = (WORD)pcdd->count;
4314
4314
4315
        return TheTrueObj;
4315
        return TheTrueObj;
...
...
4372
4372
4373
    result = c->SendMessage0(ppdi->rexxSelf, "DEFINEDIALOG");
4373
    result = c->SendMessage0(ppdi->rexxSelf, "DEFINEDIALOG");
4374
4374
4375
    if ( ! c->CheckCondition() && pcdd->active != NULL )
4375
    if ( ! c->CheckCondition() && pcdd->active != NULL )
4376
    {
4376
    {
4377
        ppdi->pageID = (INT_PTR)pcdd->base;
4377
        ppdi->pageID = (intptr_t)pcdd->base;
4378
4378
4379
        // Set the number of dialog items field in the dialog template.
4379
        // Set the number of dialog items field in the dialog template.
4380
        ((DLGTEMPLATEEX *)pcdd->base)->cDlgItems = (WORD)pcdd->count;
4380
        ((DLGTEMPLATEEX *)pcdd->base)->cDlgItems = (WORD)pcdd->count;
4381
4381
4382
        return TheTrueObj;
4382
        return TheTrueObj;
...
...
4396
4396
4397
    if ( ! loadResourceDLL(pcpbd, pcpbd->library) )
4397
    if ( ! loadResourceDLL(pcpbd, pcpbd->library) )
4398
    {
4398
    {
4399
        goto err_out;
4399
        goto err_out;
4400
    }
4400
    }
4401
    ppdi->pageID = (INT_PTR)ppdi->resID;
4401
    ppdi->pageID = (intptr_t)ppdi->resID;
4402
4402
4403
    return TheTrueObj;
4403
    return TheTrueObj;
4404
4404
4405
err_out:
4405
err_out:
4406
    // No underlying windows dialog can be created.  We still need to clean up
4406
    // No underlying windows dialog can be created.  We still need to clean up
...
...
4591
    }
4591
    }
4592
4592
4593
    bool    isImage;
4593
    bool    isImage;
4594
    uint8_t type;
4594
    uint8_t type;
4595
4595
4596
    INT_PTR result = getImageOrID(context, pcpsp->rexxSelf, icon, 1, &isImage, &type);
4596
    intptr_t result = getImageOrID(context, pcpsp->rexxSelf, icon, 1, &isImage, &type);
4597
    if ( result != 0 )
4597
    if ( result != 0 )
4598
    {
4598
    {
4599
        if ( isImage )
4599
        if ( isImage )
4600
        {
4600
        {
4601
            if ( type != IMAGE_ICON )
4601
            if ( type != IMAGE_ICON )